ALSA: usb-audio: 6fire: return correct XRUN indication
authorEldad Zack <eldad@fogrefinery.com>
Fri, 19 Jul 2013 16:26:53 +0000 (18:26 +0200)
committerTakashi Iwai <tiwai@suse.de>
Sun, 21 Jul 2013 09:55:22 +0000 (11:55 +0200)
Return SNDRV_PCM_POS_XRUN (snd_pcm_uframes_t) instead of
SNDRV_PCM_STATE_XRUN (snd_pcm_state_t) from the pointer
function of 6fire, as expected by snd_pcm_update_hw_ptr0().

Caught by sparse.

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/6fire/pcm.c

index 2aa4e13063a8d8d0ab3f5fea2c0849251739ff47..3d2551cc10f2f6fc191acea154ff2a2bc303b09e 100644 (file)
@@ -543,7 +543,7 @@ static snd_pcm_uframes_t usb6fire_pcm_pointer(
        snd_pcm_uframes_t ret;
 
        if (rt->panic || !sub)
-               return SNDRV_PCM_STATE_XRUN;
+               return SNDRV_PCM_POS_XRUN;
 
        spin_lock_irqsave(&sub->lock, flags);
        ret = sub->dma_off;