From: Eldad Zack Date: Tue, 23 Jul 2013 09:15:06 +0000 (+0200) Subject: ALSA: hiface: return correct XRUN indication X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=fee4b700a4e9e446151eb5a03874ca8666323113;p=sagit-ice-cold%2Fkernel_xiaomi_msm8998.git ALSA: hiface: return correct XRUN indication Return SNDRV_PCM_POS_XRUN (snd_pcm_uframes_t) instead of SNDRV_PCM_STATE_XRUN (snd_pcm_state_t) from the pointer function of hiface, as expected by snd_pcm_update_hw_ptr0(). Caught by sparse. Cc: Antonio Ospite Signed-off-by: Eldad Zack Cc: Signed-off-by: Takashi Iwai --- diff --git a/sound/usb/hiface/pcm.c b/sound/usb/hiface/pcm.c index 6430ed2a9f65..c21a3df9a0df 100644 --- a/sound/usb/hiface/pcm.c +++ b/sound/usb/hiface/pcm.c @@ -503,7 +503,7 @@ static snd_pcm_uframes_t hiface_pcm_pointer(struct snd_pcm_substream *alsa_sub) snd_pcm_uframes_t dma_offset; if (rt->panic || !sub) - return SNDRV_PCM_STATE_XRUN; + return SNDRV_PCM_POS_XRUN; spin_lock_irqsave(&sub->lock, flags); dma_offset = sub->dma_off;