mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-03 17:40:04 +00:00
ALSA: ua101: Fix unlocked snd_pcm_stop() call
snd_pcm_stop() must be called in the PCM substream lock context. Cc: <stable@vger.kernel.org> Acked-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
5b9ab3f732
commit
9538aa46c2
1 changed files with 12 additions and 2 deletions
|
@ -613,14 +613,24 @@ static int start_usb_playback(struct ua101 *ua)
|
|||
|
||||
static void abort_alsa_capture(struct ua101 *ua)
|
||||
{
|
||||
if (test_bit(ALSA_CAPTURE_RUNNING, &ua->states))
|
||||
unsigned long flags;
|
||||
|
||||
if (test_bit(ALSA_CAPTURE_RUNNING, &ua->states)) {
|
||||
snd_pcm_stream_lock_irqsave(ua->capture.substream, flags);
|
||||
snd_pcm_stop(ua->capture.substream, SNDRV_PCM_STATE_XRUN);
|
||||
snd_pcm_stream_unlock_irqrestore(ua->capture.substream, flags);
|
||||
}
|
||||
}
|
||||
|
||||
static void abort_alsa_playback(struct ua101 *ua)
|
||||
{
|
||||
if (test_bit(ALSA_PLAYBACK_RUNNING, &ua->states))
|
||||
unsigned long flags;
|
||||
|
||||
if (test_bit(ALSA_PLAYBACK_RUNNING, &ua->states)) {
|
||||
snd_pcm_stream_lock_irqsave(ua->playback.substream, flags);
|
||||
snd_pcm_stop(ua->playback.substream, SNDRV_PCM_STATE_XRUN);
|
||||
snd_pcm_stream_unlock_irqrestore(ua->playback.substream, flags);
|
||||
}
|
||||
}
|
||||
|
||||
static int set_stream_hw(struct ua101 *ua, struct snd_pcm_substream *substream,
|
||||
|
|
Loading…
Reference in a new issue