All of lore.kernel.org
 help / color / mirror / Atom feed
* cmipci and sound skipping ?
@ 2010-03-13 20:11 Matija Nalis
  2010-03-15 12:17 ` Clemens Ladisch
  0 siblings, 1 reply; 5+ messages in thread
From: Matija Nalis @ 2010-03-13 20:11 UTC (permalink / raw)
  To: alsa-devel

My card is "Asonic C-Media8738, 4 channel" and mostly works with snd_cmipci
driver - it is just that (even on completely unloaded system) the sound is
(very annoyingly) skipping. The speaker-test application throws out "Write
error: -32,Broken pipe" errors on every skip (usually every 5-30 times a
wav is played). mpg321 is much worse (every few seconds it clips the sample)
making the listening to music unedurable.

I'm using Debian Lenny with kernel 2.6.26 (also tried 2.6.32, no change)
I've upgraded to the latest snapshot of driver, lib and utils as
recommended, the bug is still there. When driver is compiled with debug, on
every skip it throws out lines in dmesg with info as:

ALSA pcm_lib.c:316: BUG: pcmC0D0p:0, pos = 4294918144, buffer size = 16384, period size = 1024

Note that the pos is *always* the same (4294918144 = 0xffff4000 = -16384) which might be important.

I've reported the problem in bug #4899 at
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4899
(alsa-info.sh and more is attached there)

There I got pointer to contact the alsa-devel list with XRUN_Debug info.

So here it is. When I enable it with "echo 101 > /proc/asound/card0/pcm0p/xrun_debug"
I get the following output :

[33802.573395] ALSA pcm_lib.c:249: hwptr log: pcmC0D0p:0: j=4302816904, pos=1037/1024/16384, hwptr=230413/229376
[33802.573395] ALSA pcm_lib.c:249: hwptr log: pcmC0D0p:0: j=4302816909, pos=2052/1024/16384, hwptr=230413/229376
[33802.573395] ALSA pcm_lib.c:249: hwptr log: pcmC0D0p:0: j=4302816909, pos=2053/1024/16384, hwptr=231428/229376
[33802.573395] ALSA pcm_lib.c:249: hwptr log: pcmC0D0p:0: j=4302816909, pos=2053/1024/16384, hwptr=231429/229376
[33802.573395] ALSA pcm_lib.c:249: hwptr log: pcmC0D0p:0: j=4302816909, pos=2053/1024/16384, hwptr=231429/229376
[33802.573395] ALSA pcm_lib.c:249: hwptr log: pcmC0D0p:0: j=4302816909, pos=2053/1024/16384, hwptr=231429/229376
[33802.573395] ALSA pcm_lib.c:249: hwptr log: pcmC0D0p:0: j=4302816909, pos=2061/1024/16384, hwptr=231429/229376
[33802.573395] ALSA pcm_lib.c:249: hwptr log: pcmC0D0p:0: j=4302816909, pos=2061/1024/16384, hwptr=231437/229376
[33802.573395] ALSA pcm_lib.c:249: hwptr log: pcmC0D0p:0: j=4302816914, pos=3076/1024/16384, hwptr=231437/229376
[33802.573395] ALSA pcm_lib.c:249: hwptr log: pcmC0D0p:0: j=4302816914, pos=3076/1024/16384, hwptr=232452/229376
[33802.573395] ALSA pcm_lib.c:316: BUG: pcmC0D0p:0, pos = 4294918144, buffer size = 16384, period size = 1024
[33802.573395] ALSA pcm_lib.c:415: PCM: hw_ptr skipping! (pos=0, delta=13308, period=1024, jdelta=0/69/0, hw_ptr=232452/232452)
[33806.867658] ALSA pcm_lib.c:316: BUG: pcmC0D0p:0, pos = 4294918144, buffer size = 16384, period size = 1024
[33806.867666] ALSA pcm_lib.c:415: PCM: hw_ptr skipping! (pos=0, delta=16380, period=1024, jdelta=0/85/0, hw_ptr=425988/425988)

Also it seems that enabling xrun_debug kludges around the bug - the
annoying skipping (and "Write error: -32,Broken pipe" errors in
speaker-test) disappears or at least becomes almost inaudiable.

Would some other xrun_debug setting be more useful to give better insight ?
Anything else I can provide or test to help debug the problem ?

Please CC: me as I'm not subscribed to the list.

-- 
Opinions above are GNU-copylefted.

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

end of thread, other threads:[~2010-03-24  6:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-13 20:11 cmipci and sound skipping ? Matija Nalis
2010-03-15 12:17 ` Clemens Ladisch
2010-03-15 19:35   ` Matija Nalis
2010-03-23  8:36     ` Clemens Ladisch
     [not found]       ` <20100323201749.GA4675@eagle102.home.lan>
2010-03-24  6:57         ` Clemens Ladisch

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.