Skip to contentSkip to conversation

ALSA: usb-audio: 6fire: return correct XRUN indication

PATCH Applied Eldad Zack 2 participants 2 messages Jul 19, 2013 – Jul 21, 2013 Sound

lore
Share & tools
lore

Eldad Zack

author
#0 lore raw

PATCH 1/1 ALSA: usb-audio: 6fire: 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/6fire/pcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/usb/6fire/pcm.c +1 -1
index c5b9cac..60ac8fb 100644
@@ -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;
Signature · 1 line
1.8.1.5
Applied
#1 lore raw

At Fri, 19 Jul 2013 18:26:53 +0200,

Quoted 8 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().

Caught by sparse.

Thanks, applied now.

Takashi

Quoted 20 lines
---
 sound/usb/6fire/pcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/usb/6fire/pcm.c +1 -1
index c5b9cac..60ac8fb 100644
@@ -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;
Signature · 1 line
1.8.1.5