diff options
Diffstat (limited to 'sound/usb/6fire/pcm.c')
-rw-r--r-- | sound/usb/6fire/pcm.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sound/usb/6fire/pcm.c b/sound/usb/6fire/pcm.c index c5b9cac37dc4..3d2551cc10f2 100644 --- a/sound/usb/6fire/pcm.c +++ b/sound/usb/6fire/pcm.c | |||
@@ -543,7 +543,7 @@ static snd_pcm_uframes_t usb6fire_pcm_pointer( | |||
543 | snd_pcm_uframes_t ret; | 543 | snd_pcm_uframes_t ret; |
544 | 544 | ||
545 | if (rt->panic || !sub) | 545 | if (rt->panic || !sub) |
546 | return SNDRV_PCM_STATE_XRUN; | 546 | return SNDRV_PCM_POS_XRUN; |
547 | 547 | ||
548 | spin_lock_irqsave(&sub->lock, flags); | 548 | spin_lock_irqsave(&sub->lock, flags); |
549 | ret = sub->dma_off; | 549 | ret = sub->dma_off; |
@@ -639,17 +639,25 @@ int usb6fire_pcm_init(struct sfire_chip *chip) | |||
639 | void usb6fire_pcm_abort(struct sfire_chip *chip) | 639 | void usb6fire_pcm_abort(struct sfire_chip *chip) |
640 | { | 640 | { |
641 | struct pcm_runtime *rt = chip->pcm; | 641 | struct pcm_runtime *rt = chip->pcm; |
642 | unsigned long flags; | ||
642 | int i; | 643 | int i; |
643 | 644 | ||
644 | if (rt) { | 645 | if (rt) { |
645 | rt->panic = true; | 646 | rt->panic = true; |
646 | 647 | ||
647 | if (rt->playback.instance) | 648 | if (rt->playback.instance) { |
649 | snd_pcm_stream_lock_irqsave(rt->playback.instance, flags); | ||
648 | snd_pcm_stop(rt->playback.instance, | 650 | snd_pcm_stop(rt->playback.instance, |
649 | SNDRV_PCM_STATE_XRUN); | 651 | SNDRV_PCM_STATE_XRUN); |
650 | if (rt->capture.instance) | 652 | snd_pcm_stream_unlock_irqrestore(rt->playback.instance, flags); |
653 | } | ||
654 | |||
655 | if (rt->capture.instance) { | ||
656 | snd_pcm_stream_lock_irqsave(rt->capture.instance, flags); | ||
651 | snd_pcm_stop(rt->capture.instance, | 657 | snd_pcm_stop(rt->capture.instance, |
652 | SNDRV_PCM_STATE_XRUN); | 658 | SNDRV_PCM_STATE_XRUN); |
659 | snd_pcm_stream_unlock_irqrestore(rt->capture.instance, flags); | ||
660 | } | ||
653 | 661 | ||
654 | for (i = 0; i < PCM_N_URBS; i++) { | 662 | for (i = 0; i < PCM_N_URBS; i++) { |
655 | usb_poison_urb(&rt->in_urbs[i].instance); | 663 | usb_poison_urb(&rt->in_urbs[i].instance); |