[alsa-devel] [PATCH] ALSA: fireworks/bebob/dice/oxfw: fix substreams counting at vmalloc failure

Clemens Ladisch clemens at ladisch.de
Sat Aug 29 08:46:24 CEST 2015


Takashi Sakamoto wrote:
> In PCM core, when hw_params() in each driver returns error, the state of
> PCM substream is kept as 'open'. In this case, current drivers for sound
> units on IEEE 1394 bus doesn't decrement substream counter in hw_free()
> correctly. This causes these drivers to keep streams even if not
> required.
>
> This commit fixes this bug. When snd_pcm_lib_alloc_vmalloc_buffer()
> fails, hw_params function in each driver returns without incrementing the
> counter.
>
> Reported-by: Takashi Iwai <tiwai at suse.de>
> Signed-off-by: Takashi Sakamoto <o-takashi at sakamocchi.jp>

Acked-by: Clemens Ladisch <clemens at ladisch.de>

> ---
>  sound/firewire/bebob/bebob_pcm.c         | 20 ++++++++++++++++----
>  sound/firewire/dice/dice-pcm.c           | 18 ++++++++++++++----
>  sound/firewire/fireworks/fireworks_pcm.c | 18 ++++++++++++++----
>  sound/firewire/oxfw/oxfw-pcm.c           | 17 +++++++++++++----
>  4 files changed, 57 insertions(+), 16 deletions(-)


More information about the Alsa-devel mailing list