Merge tag 'usb-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
[firefly-linux-kernel-4.4.55.git] / sound / usb / misc / ua101.c
index a1bab149df4d06ab1ba9fb4c725c19974841eb5d..9581089c28c5e5300930476ee16774543095ed74 100644 (file)
@@ -613,24 +613,14 @@ static int start_usb_playback(struct ua101 *ua)
 
 static void abort_alsa_capture(struct ua101 *ua)
 {
-       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);
-       }
+       if (test_bit(ALSA_CAPTURE_RUNNING, &ua->states))
+               snd_pcm_stop_xrun(ua->capture.substream);
 }
 
 static void abort_alsa_playback(struct ua101 *ua)
 {
-       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);
-       }
+       if (test_bit(ALSA_PLAYBACK_RUNNING, &ua->states))
+               snd_pcm_stop_xrun(ua->playback.substream);
 }
 
 static int set_stream_hw(struct ua101 *ua, struct snd_pcm_substream *substream,