Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 219279 Details for
Bug 304629
media-libs/alsa-libs leaks FDs
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch from LaunchPad
dont_leak_timer_fd_on_pcm_slave_close.patch (text/plain), 1.60 KB, created by
James Brown
on 2010-02-11 21:00:29 UTC
(
hide
)
Description:
Patch from LaunchPad
Filename:
MIME Type:
Creator:
James Brown
Created:
2010-02-11 21:00:29 UTC
Size:
1.60 KB
patch
obsolete
>commit a256766c10c52cb6667de8a65f5cbb332fad4cc7 >Author: Jaroslav Kysela <perex@perex.cz> >Date: Mon Dec 21 09:09:42 2009 +0100 > > pcm: Close event timer in pcm_hw plugin > > Dan McCombs discovered that snd_pcm_close() invocations are not leading > to associated timers being closed, which results in successively more > timers being created but not freed. > > Original patch from Daniel T Chen <crimsun@ubuntu.com>. > > BugLink: https://bugs.launchpad.net/bugs/451893 > > Signed-off-by: Jaroslav Kysela <perex@perex.cz> > >diff --git a/src/pcm/pcm_hw.c b/src/pcm/pcm_hw.c >index 2095b01..b557912 100644 >--- a/src/pcm/pcm_hw.c >+++ b/src/pcm/pcm_hw.c >@@ -338,18 +338,6 @@ static int snd_pcm_hw_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params) > return 0; > } > >-static int snd_pcm_hw_hw_free(snd_pcm_t *pcm) >-{ >- snd_pcm_hw_t *hw = pcm->private_data; >- int fd = hw->fd, err; >- if (ioctl(fd, SNDRV_PCM_IOCTL_HW_FREE) < 0) { >- err = -errno; >- SYSMSG("SNDRV_PCM_IOCTL_HW_FREE failed"); >- return err; >- } >- return 0; >-} >- > static void snd_pcm_hw_close_timer(snd_pcm_hw_t *hw) > { > if (hw->period_timer) { >@@ -421,6 +409,20 @@ static int snd_pcm_hw_change_timer(snd_pcm_t *pcm, int enable) > } else { > snd_pcm_hw_close_timer(hw); > pcm->fast_ops = &snd_pcm_hw_fast_ops; >+ hw->period_event = 0; >+ } >+ return 0; >+} >+ >+static int snd_pcm_hw_hw_free(snd_pcm_t *pcm) >+{ >+ snd_pcm_hw_t *hw = pcm->private_data; >+ int fd = hw->fd, err; >+ snd_pcm_hw_change_timer(pcm, 0); >+ if (ioctl(fd, SNDRV_PCM_IOCTL_HW_FREE) < 0) { >+ err = -errno; >+ SYSMSG("SNDRV_PCM_IOCTL_HW_FREE failed"); >+ return err; > } > return 0; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 304629
: 219279