[alsa-devel] [PATCH] ALSA: usb-audio: 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 6fire, as expected by snd_pcm_update_hw_ptr0().
Caught by sparse.
Signed-off-by: Eldad Zack eldad@fogrefinery.com --- sound/usb/hiface/pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/usb/hiface/pcm.c b/sound/usb/hiface/pcm.c index 6430ed2..c21a3df 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;
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().
^^^^^ ???
Regards, Clemens
On Mon, 22 Jul 2013 19:38:24 +0200 Eldad Zack eldad@fogrefinery.com 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@fogrefinery.com
I too was going to send this one, I verified that the fix is OK, thanks Eldad for anticipating me.
Would you please fix the commit message as Clemens pointed out?
Regards, Antonio
On Mon, 22 Jul 2013, Antonio Ospite wrote:
On Mon, 22 Jul 2013 19:38:24 +0200 Eldad Zack eldad@fogrefinery.com 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@fogrefinery.com
I too was going to send this one, I verified that the fix is OK, thanks Eldad for anticipating me.
Would you please fix the commit message as Clemens pointed out?
Oops - sure, will send it out corrected in a moment.
Cheers, Eldad
participants (3)
-
Antonio Ospite
-
Clemens Ladisch
-
Eldad Zack