[alsa-devel] Invalid PCM pointer with CMI8738 and pcm.c buffer underuns
Continued from here: http://article.gmane.org/gmane.linux.alsa.devel/121379
After a few days now I finally got VLC to log everything that happens, and finally the bug reappeared, and unlike previously thought, it happens when I watch a video as well. But unfortunately VLC didn't give anything specific that happened at the time, just some vague ALSA errors about broken pipes (at line 394) : http://pastebin.com/NgZiG9yX
At the time I added the video to VLC's queue I was doing something in the background (which I don't remember now unfortunately), but this has happened even when listening to something without doing anything in the background, and not having any background-running apps except Transmission.
Also interestingly lately I've heard a few crackles/pops when listening to stuff, followed by a second or so of silence then back to normal when I would run CPU intensive stuff. At those points I thought the bug would be invoked again, but it didn't happen so.
I still have the crackling problem, not able to change the PCM channel volume and screeching on audio that has clipped portions or very high frequency waves.
Can anyone give me any instructions on what I could do to further diagnose this problem? And more importantly, as I stated in the linked post above, how could I shut down the sound daemon/server/whatever so I could bring back the OS to stability without restarting.
2014-04-05 0:15 GMT+08:00 andoru andoru.blah@gmail.com:
Continued from here: http://article.gmane.org/gmane.linux.alsa.devel/121379
After a few days now I finally got VLC to log everything that happens, and finally the bug reappeared, and unlike previously thought, it happens when I watch a video as well. But unfortunately VLC didn't give anything specific that happened at the time, just some vague ALSA errors about broken pipes (at line 394) : http://pastebin.com/NgZiG9yX
At the time I added the video to VLC's queue I was doing something in the background (which I don't remember now unfortunately), but this has happened even when listening to something without doing anything in the background, and not having any background-running apps except Transmission.
Also interestingly lately I've heard a few crackles/pops when listening to stuff, followed by a second or so of silence then back to normal when I would run CPU intensive stuff. At those points I thought the bug would be invoked again, but it didn't happen so.
I still have the crackling problem, not able to change the PCM channel volume and screeching on audio that has clipped portions or very high frequency waves.
alsa debug: final HW setup: ACCESS: RW_INTERLEAVED FORMAT: S16_LE SUBFORMAT: STD SAMPLE_BITS: 16 FRAME_BITS: 32 CHANNELS: 2 RATE: 44100 PERIOD_TIME: 40000 PERIOD_SIZE: 1764 PERIOD_BYTES: 7056 PERIODS: (9 10) BUFFER_TIME: (371519 371520) BUFFER_SIZE: 16384 BUFFER_BYTES: 65536
does the hardware really support (16384/1764) 9.27 periods ?
does the error occur in the last period ?
Can anyone give me any instructions on what I could do to further diagnose this problem? And more importantly, as I stated in the linked post above, how could I shut down the sound daemon/server/whatever so I could bring back the OS to stability without restarting.
Do the clippping occur with oss emulation which use power of 2 period size
or
add
snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)
Raymond Yau <superquad.vortex2 <at> gmail.com> writes:
does the hardware really support (16384/1764) 9.27 periods? does the error occur in the last period ?
I have no idea, how do I find out? What last period?
Do the clippping occur with oss emulation which use power of 2 period size
or
add
snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)
Add that line where? I'm not sure if I'm using oss emulation. _______________________________________________________________________
does the hardware really support (16384/1764) 9.27 periods? does the error occur in the last period ?
I have no idea, how do I find out? What last period?
http://www.alsa-project.org/main/index.php/XRUN_Debug
# Enable basic debugging and dump stack, check hardware pointer on the period update # Usefull to just see, if PCM stream is stopped for a reason (usually wrong audio process timing from scheduler) # And to check the values from driver
echo 11 > /proc/asound/card0/pcm0p/xrun_debug
Check the system log whether the hwptr position are correct in first nine periods and xrun occur on 10th period since the buffer contain 9.27 periods when running vlc?
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/plain/Documenta...
cat /proc/asound/card0/cmipci
What is the model of your sound card ?
Does it support 4 and 6 channels in windows ?
Raymond Yau <superquad.vortex2 <at> gmail.com> writes:
http://www.alsa-project.org/main/index.php/XRUN_Debug
# Enable basic debugging and dump stack, check hardware pointer on the period update # Usefull to just see, if PCM stream is stopped for a reason (usually wrong audio process timing from scheduler) # And to check the values from driver
echo 11 > /proc/asound/card0/pcm0p/xrun_debug
Argh, seems the kernel I'm using doesn't have the debug options. Any other ways around this?
Check the system log whether the hwptr position are correct in first nine periods and xrun occur on 10th period since the buffer contain 9.27 periods when running vlc?
Which system log? Or maybe this is related to the above? I can't find anything in any file under /var/log/ that contains anything you're talking about.
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/plain/Documenta...
/sound/alsa/CMIPCI.txt
cat /proc/asound/card0/cmipci
What is the model of your sound card ?
____________________________________________________ $ cat /proc/asound/card0/cmipci C-Media CMI8738 (model 55) at 0xe000, irq 18
00: 02 00 01 00 04: d0 0d 00 00 08: 83 00 09 00 0c: 00 00 01 0a 10: c0 00 00 00 14: 00 60 c0 00 18: 00 01 80 0e 1c: 00 00 ee ee 20: 10 40 f9 00 24: 8f ff ff 06 90: 20 09 00 00 ____________________________________________________
Does it support 4 and 6 channels in windows ?
6 channels. I don't use more than 2 channels anyway.
participants (2)
-
andoru
-
Raymond Yau