alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ALSA: usb-audio: hiface: return correct XRUN indication
@ 2013-07-22 17:38 Eldad Zack
  2013-07-22 20:09 ` Clemens Ladisch
  2013-07-22 21:47 ` Antonio Ospite
  0 siblings, 2 replies; 4+ messages in thread
From: Eldad Zack @ 2013-07-22 17:38 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, 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.

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;
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ALSA: usb-audio: hiface: return correct XRUN indication
  2013-07-22 17:38 [PATCH] ALSA: usb-audio: hiface: return correct XRUN indication Eldad Zack
@ 2013-07-22 20:09 ` Clemens Ladisch
  2013-07-22 21:47 ` Antonio Ospite
  1 sibling, 0 replies; 4+ messages in thread
From: Clemens Ladisch @ 2013-07-22 20:09 UTC (permalink / raw)
  To: Eldad Zack; +Cc: Takashi Iwai, alsa-devel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ALSA: usb-audio: hiface: return correct XRUN indication
  2013-07-22 17:38 [PATCH] ALSA: usb-audio: hiface: return correct XRUN indication Eldad Zack
  2013-07-22 20:09 ` Clemens Ladisch
@ 2013-07-22 21:47 ` Antonio Ospite
  2013-07-23  9:11   ` Eldad Zack
  1 sibling, 1 reply; 4+ messages in thread
From: Antonio Ospite @ 2013-07-22 21:47 UTC (permalink / raw)
  To: Eldad Zack; +Cc: Takashi Iwai, alsa-devel

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

-- 
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?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ALSA: usb-audio: hiface: return correct XRUN indication
  2013-07-22 21:47 ` Antonio Ospite
@ 2013-07-23  9:11   ` Eldad Zack
  0 siblings, 0 replies; 4+ messages in thread
From: Eldad Zack @ 2013-07-23  9:11 UTC (permalink / raw)
  To: Antonio Ospite, Clemens Ladisch; +Cc: Takashi Iwai, alsa-devel



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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-07-23  9:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-22 17:38 [PATCH] ALSA: usb-audio: hiface: return correct XRUN indication Eldad Zack
2013-07-22 20:09 ` Clemens Ladisch
2013-07-22 21:47 ` Antonio Ospite
2013-07-23  9:11   ` Eldad Zack

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).