Skip to content

Commit

Permalink
ALSA: snd-usb-caiaq: Lock on stream start/unpause
Browse files Browse the repository at this point in the history
Fix a bug which can result in white noise from the driver after stream
start or unpause.

Signed-off-by: Mark Hills <mark@pogo.org.uk>
Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Mark Hills authored and Takashi Iwai committed Oct 30, 2009
1 parent 3702b08 commit ac9dd9d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sound/usb/caiaq/audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,14 @@ static void
activate_substream(struct snd_usb_caiaqdev *dev,
struct snd_pcm_substream *sub)
{
spin_lock(&dev->spinlock);

if (sub->stream == SNDRV_PCM_STREAM_PLAYBACK)
dev->sub_playback[sub->number] = sub;
else
dev->sub_capture[sub->number] = sub;

spin_unlock(&dev->spinlock);
}

static void
Expand Down

0 comments on commit ac9dd9d

Please sign in to comment.