[alsa-devel] [PATCH] ALSA: usb-audio: 6fire: return correct XRUN indication

Takashi Iwai tiwai at suse.de
Sun Jul 21 11:55:52 CEST 2013


At Fri, 19 Jul 2013 18:26:53 +0200,
Eldad Zack wrote:
> 
> 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 at fogrefinery.com>

Thanks, applied now.


Takashi

> ---
>  sound/usb/6fire/pcm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/usb/6fire/pcm.c b/sound/usb/6fire/pcm.c
> index c5b9cac..60ac8fb 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(
>  	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;
> -- 
> 1.8.1.5
> 


More information about the Alsa-devel mailing list