All of lore.kernel.org
 help / color / mirror / Atom feed
* soc underrun problem
@ 2009-03-18  4:56 dfoley
  2009-03-18  6:25 ` Takashi Iwai
  0 siblings, 1 reply; 5+ messages in thread
From: dfoley @ 2009-03-18  4:56 UTC (permalink / raw)
  To: alsa-devel

I'm currently having a problem with playing wave files

root@tsi-tpcxx:~# aplay /usr/share/sounds/alsa/Front_Center.wav
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
mapped channel 10 to 2
underrun!!! (at least 130.662 ms long)
underrun!!! (at least 140.809 ms long)

I've narrowed it down to the commit ed3da3d9a0ef13c6fe1414ec73c9c1be12747b62 in linux-next/sound-2.6-tiwai.git.
   ALSA: Rewrite hw_ptr updaters

The audio works fine, when I reverse this commit.

My hardware is: CPU s3c2410 @ 202.8Mhz codecs (ak4550 or tlv320)

Anyone else seeing this ?

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

* Re: soc underrun problem
  2009-03-18  4:56 soc underrun problem dfoley
@ 2009-03-18  6:25 ` Takashi Iwai
  2009-03-18 18:51   ` dfoley
  0 siblings, 1 reply; 5+ messages in thread
From: Takashi Iwai @ 2009-03-18  6:25 UTC (permalink / raw)
  To: dfoley; +Cc: alsa-devel

At Tue, 17 Mar 2009 21:56:06 -0700,
dfoley wrote:
> 
> I'm currently having a problem with playing wave files
> 
> root@tsi-tpcxx:~# aplay /usr/share/sounds/alsa/Front_Center.wav
> Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
> mapped channel 10 to 2
> underrun!!! (at least 130.662 ms long)
> underrun!!! (at least 140.809 ms long)
> 
> I've narrowed it down to the commit ed3da3d9a0ef13c6fe1414ec73c9c1be12747b62 in linux-next/sound-2.6-tiwai.git.
>    ALSA: Rewrite hw_ptr updaters
> 
> The audio works fine, when I reverse this commit.

Could you build with CONFIG_SND_DEBUG_XRUN and set below?
	echo 1 > /proc/asound/card0/pcm0p/xrun_debug

It will show you why the playback skips.  It means usually the pointer
callback is unstable.  The commit changed the xrun check more
strictly.


Takashi

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

* Re: soc underrun problem
  2009-03-18  6:25 ` Takashi Iwai
@ 2009-03-18 18:51   ` dfoley
  2009-03-19  7:40     ` Takashi Iwai
  2009-03-19  7:40     ` Takashi Iwai
  0 siblings, 2 replies; 5+ messages in thread
From: dfoley @ 2009-03-18 18:51 UTC (permalink / raw)
  Cc: alsa-devel

Takashi Iwai wrote:
> At Tue, 17 Mar 2009 21:56:06 -0700,
> dfoley wrote:
>> I'm currently having a problem with playing wave files
>>
>> root@tsi-tpcxx:~# aplay /usr/share/sounds/alsa/Front_Center.wav
>> Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
>> mapped channel 10 to 2
>> underrun!!! (at least 130.662 ms long)
>> underrun!!! (at least 140.809 ms long)
>>
>> I've narrowed it down to the commit ed3da3d9a0ef13c6fe1414ec73c9c1be12747b62 in linux-next/sound-2.6-tiwai.git.
>>    ALSA: Rewrite hw_ptr updaters
>>
>> The audio works fine, when I reverse this commit.
> 
> Could you build with CONFIG_SND_DEBUG_XRUN and set below?
> 	echo 1 > /proc/asound/card0/pcm0p/xrun_debug
> 
> It will show you why the playback skips.  It means usually the pointer
> callback is unstable.  The commit changed the xrun check more
> strictly.
> 
> 
> Takashi

root@tsi-tpcxx:~# echo 1 > /proc/asound/card0/pcm0p/xrun_debug
root@tsi-tpcxx:~# aplay /usr/share/sounds/alsa/Front_Center.wav
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
mapped channel 10 to 2
hda_codec: Lost interrupts? (stream=0, delta=20004, intr_ptr=2048)
XRUN: pcmC0D0p
underrun!!! (at least 58.490 ms long)
hda_codec: Lost interrupts? (stream=0, delta=20003, intr_ptr=2048)
XRUN: pcmC0D0p
underrun!!! (at least 58.254 ms long)
hda_codec: Lost interrupts? (stream=0, delta=20004, intr_ptr=2048)

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

* Re: soc underrun problem
  2009-03-18 18:51   ` dfoley
@ 2009-03-19  7:40     ` Takashi Iwai
  2009-03-19  7:40     ` Takashi Iwai
  1 sibling, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2009-03-19  7:40 UTC (permalink / raw)
  To: dfoley; +Cc: alsa-devel

At Wed, 18 Mar 2009 11:51:08 -0700,
dfoley wrote:
> 
> Takashi Iwai wrote:
> > At Tue, 17 Mar 2009 21:56:06 -0700,
> > dfoley wrote:
> >> I'm currently having a problem with playing wave files
> >>
> >> root@tsi-tpcxx:~# aplay /usr/share/sounds/alsa/Front_Center.wav
> >> Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
> >> mapped channel 10 to 2
> >> underrun!!! (at least 130.662 ms long)
> >> underrun!!! (at least 140.809 ms long)
> >>
> >> I've narrowed it down to the commit ed3da3d9a0ef13c6fe1414ec73c9c1be12747b62 in linux-next/sound-2.6-tiwai.git.
> >>    ALSA: Rewrite hw_ptr updaters
> >>
> >> The audio works fine, when I reverse this commit.
> > 
> > Could you build with CONFIG_SND_DEBUG_XRUN and set below?
> > 	echo 1 > /proc/asound/card0/pcm0p/xrun_debug
> > 
> > It will show you why the playback skips.  It means usually the pointer
> > callback is unstable.  The commit changed the xrun check more
> > strictly.
> > 
> > 
> > Takashi
> 
> root@tsi-tpcxx:~# echo 1 > /proc/asound/card0/pcm0p/xrun_debug
> root@tsi-tpcxx:~# aplay /usr/share/sounds/alsa/Front_Center.wav
> Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
> mapped channel 10 to 2
> hda_codec: Lost interrupts? (stream=0, delta=20004, intr_ptr=2048)
> XRUN: pcmC0D0p
> underrun!!! (at least 58.490 ms long)
> hda_codec: Lost interrupts? (stream=0, delta=20003, intr_ptr=2048)
> XRUN: pcmC0D0p
> underrun!!! (at least 58.254 ms long)
> hda_codec: Lost interrupts? (stream=0, delta=20004, intr_ptr=2048)

So, actually either the interrupt timing or the pointer callback is
wrong on your driver.

Try to add a debug print in your pointer callback to print the
returned value at each call (better together with runtime->period_size
and runtime->buffer_size to refer).


Takashi

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

* Re: soc underrun problem
  2009-03-18 18:51   ` dfoley
  2009-03-19  7:40     ` Takashi Iwai
@ 2009-03-19  7:40     ` Takashi Iwai
  1 sibling, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2009-03-19  7:40 UTC (permalink / raw)
  To: dfoley; +Cc: alsa-devel

At Wed, 18 Mar 2009 11:51:08 -0700,
dfoley wrote:
> 
> Takashi Iwai wrote:
> > At Tue, 17 Mar 2009 21:56:06 -0700,
> > dfoley wrote:
> >> I'm currently having a problem with playing wave files
> >>
> >> root@tsi-tpcxx:~# aplay /usr/share/sounds/alsa/Front_Center.wav
> >> Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
> >> mapped channel 10 to 2
> >> underrun!!! (at least 130.662 ms long)
> >> underrun!!! (at least 140.809 ms long)
> >>
> >> I've narrowed it down to the commit ed3da3d9a0ef13c6fe1414ec73c9c1be12747b62 in linux-next/sound-2.6-tiwai.git.
> >>    ALSA: Rewrite hw_ptr updaters
> >>
> >> The audio works fine, when I reverse this commit.
> > 
> > Could you build with CONFIG_SND_DEBUG_XRUN and set below?
> > 	echo 1 > /proc/asound/card0/pcm0p/xrun_debug
> > 
> > It will show you why the playback skips.  It means usually the pointer
> > callback is unstable.  The commit changed the xrun check more
> > strictly.
> > 
> > 
> > Takashi
> 
> root@tsi-tpcxx:~# echo 1 > /proc/asound/card0/pcm0p/xrun_debug
> root@tsi-tpcxx:~# aplay /usr/share/sounds/alsa/Front_Center.wav
> Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
> mapped channel 10 to 2
> hda_codec: Lost interrupts? (stream=0, delta=20004, intr_ptr=2048)
> XRUN: pcmC0D0p
> underrun!!! (at least 58.490 ms long)
> hda_codec: Lost interrupts? (stream=0, delta=20003, intr_ptr=2048)
> XRUN: pcmC0D0p
> underrun!!! (at least 58.254 ms long)
> hda_codec: Lost interrupts? (stream=0, delta=20004, intr_ptr=2048)

So, actually either the interrupt timing or the pointer callback is
wrong on your driver.

Try to add a debug print in your pointer callback to print the
returned value at each call (better together with runtime->period_size
and runtime->buffer_size to refer).


Takashi

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

end of thread, other threads:[~2009-03-19  7:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-18  4:56 soc underrun problem dfoley
2009-03-18  6:25 ` Takashi Iwai
2009-03-18 18:51   ` dfoley
2009-03-19  7:40     ` Takashi Iwai
2009-03-19  7:40     ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.