Skip to contentSkip to conversation

ALSA: usb-audio: hiface: return correct XRUN indication

PATCH Superseded Eldad Zack 3 participants 4 messages Jul 22, 2013 – Jul 23, 2013 Sound

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Eldad Zack

author
#0 lore raw

PATCH 1/1 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.

---
 sound/usb/hiface/pcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/usb/hiface/pcm.c +1 -1
index 6430ed2..c21a3df 100644
@@ -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;
Signature · 1 line
1.8.1.5
#1 lore raw
Quoted 3 lines · Eldad Zack

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

#2 lore raw
In reply to Eldad Zack
Quoted 7 lines · On Mon, 22 Jul 2013 19:38:24 +0200 Eldad Zack <[email protected]> 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.

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

Signature · 6 lines
Antonio Ospite
http://ao2.it

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
author
#3 lore raw
Quoted 7 lines · Antonio Ospite
Quoted 4 lines · On Mon, 22 Jul 2013 19:38:24 +0200 Eldad Zack <[email protected]> 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().

Quoted 8 lines
Quoted 3 lines

Caught by sparse.

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