mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-21 00:42:16 +00:00
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>
This commit is contained in:
parent
3702b08228
commit
ac9dd9d384
@ -62,10 +62,14 @@ static void
|
|||||||
activate_substream(struct snd_usb_caiaqdev *dev,
|
activate_substream(struct snd_usb_caiaqdev *dev,
|
||||||
struct snd_pcm_substream *sub)
|
struct snd_pcm_substream *sub)
|
||||||
{
|
{
|
||||||
|
spin_lock(&dev->spinlock);
|
||||||
|
|
||||||
if (sub->stream == SNDRV_PCM_STREAM_PLAYBACK)
|
if (sub->stream == SNDRV_PCM_STREAM_PLAYBACK)
|
||||||
dev->sub_playback[sub->number] = sub;
|
dev->sub_playback[sub->number] = sub;
|
||||||
else
|
else
|
||||||
dev->sub_capture[sub->number] = sub;
|
dev->sub_capture[sub->number] = sub;
|
||||||
|
|
||||||
|
spin_unlock(&dev->spinlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user