diff options
author | Mark Hills <mark@pogo.org.uk> | 2009-10-24 07:59:36 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-10-30 07:29:42 -0400 |
commit | ac9dd9d384b018f1e1c5a9a2686ab5605ce55818 (patch) | |
tree | 4fad8ff7d5702231f0e01a4bd568d26b934223a1 /sound | |
parent | 3702b082281929cf1bdf14f67eb0619aab58b496 (diff) |
ALSA: snd-usb-caiaq: Lock on stream start/unpause
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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/usb/caiaq/audio.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/usb/caiaq/audio.c b/sound/usb/caiaq/audio.c index e76017cd5acf..86b2c3b92df5 100644 --- a/sound/usb/caiaq/audio.c +++ b/sound/usb/caiaq/audio.c | |||
@@ -62,10 +62,14 @@ static void | |||
62 | activate_substream(struct snd_usb_caiaqdev *dev, | 62 | activate_substream(struct snd_usb_caiaqdev *dev, |
63 | struct snd_pcm_substream *sub) | 63 | struct snd_pcm_substream *sub) |
64 | { | 64 | { |
65 | spin_lock(&dev->spinlock); | ||
66 | |||
65 | if (sub->stream == SNDRV_PCM_STREAM_PLAYBACK) | 67 | if (sub->stream == SNDRV_PCM_STREAM_PLAYBACK) |
66 | dev->sub_playback[sub->number] = sub; | 68 | dev->sub_playback[sub->number] = sub; |
67 | else | 69 | else |
68 | dev->sub_capture[sub->number] = sub; | 70 | dev->sub_capture[sub->number] = sub; |
71 | |||
72 | spin_unlock(&dev->spinlock); | ||
69 | } | 73 | } |
70 | 74 | ||
71 | static void | 75 | static void |