Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Invalid PCM pointer with CMI8738 and pcm.c buffer underuns
@ 2014-04-28 21:28 Andoru
  2014-04-29  6:04 ` Takashi Iwai
  0 siblings, 1 reply; 27+ messages in thread
From: Andoru @ 2014-04-28 21:28 UTC (permalink / raw)
  To: alsa-devel

[Continued from here:
http://thread.gmane.org/gmane.linux.alsa.devel/122028/focus=122354 ]

> It's way too old.  Better to build the latest kernel.

The latest kernel available for my distro, or the latest kernel available
"from Linus"? I've already tried the former.

> You need to figure out the condition reproducing the issue.

For all I know (I'm not that knowledgeable on those things, mind you) this
happens completely at random. There hasn't been any pattern when the PC
would become unusable, and the OS unresponsive.

> For example, application may apply some strange buffer size and period
> size the hardware chip doesn't like. If so, changing the buffer size
> and/or period size may reduce the problem.

I'm not aware of any feature to change the buffer size in any of the
programs that cause the lock-ups.

> Meanwhile, you can try the patch below, too, which aligns the period

That patch is for kernel sources or for the above snapshots I mentioned? Or
perhaps there are more recent ALSA source codes?

^ permalink raw reply	[flat|nested] 27+ messages in thread
* Invalid PCM pointer with CMI8738 and pcm.c buffer underuns
@ 2014-04-20 15:04 Andoru
  2014-04-28 16:00 ` Takashi Iwai
  0 siblings, 1 reply; 27+ messages in thread
From: Andoru @ 2014-04-20 15:04 UTC (permalink / raw)
  To: alsa-devel

[Continued from here:
http://news.gmane.org/find-root.php?message_id=loom.20140406T010044%2d863%40post.gmane.org]

Since I didn't get any answer again, I decided to try and build the latest
ALSA snapshots myself (alsa-driver-1.0.25.3584.gb044d;
alsa-firmware-1.0.27.2.gf21a8; alsa-lib-1.0.27.2; alsa-oss-1.0.25.2.g39df1;
alsa-plugins-1.0.27.10.gb5917; alsa-utils-1.0.27.2.22.gb7ed4) and purge the
Debian ALSA packages to see if I could do something at compile time or if it
would fix the problems, but they're still there. The OS still slows down to
a crawl at random times and I still have the issue with the volume control
plus other quirks I mentioned in the previous threads...

^ permalink raw reply	[flat|nested] 27+ messages in thread
* Invalid PCM pointer with CMI8738 and pcm.c buffer underuns
@ 2014-04-10 19:05 andoru
  2014-04-12  4:38 ` Raymond Yau
  0 siblings, 1 reply; 27+ messages in thread
From: andoru @ 2014-04-10 19:05 UTC (permalink / raw)
  To: alsa-devel

Continued from here: http://article.gmane.org/gmane.linux.alsa.devel/121575

> 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

Okay, I not compiled my own kernel with CONFIG_SND_PCM_XRUN_DEBUG,
CONFIG_SND_VERBOSE_PROCFS, CONFIG_SND_DEBUG all enabled in the kernel
configuration, I have an xrun_debug file, but it doesn't seem to list
anything, then I also tried with cat instead of echo, and just a 0 showed up:

___________________________________________________________________
$ echo 11 > /proc/asound/card0/pcm0p/xrun_debug
bash: /proc/asound/card0/pcm0p/xrun_debug: Permission denied

# echo 11 > /proc/asound/card0/pcm0p/xrun_debug
bash: /proc/asound/card0/pcm0p/xrun_debug: Permission denied

$ cat /proc/asound/card0/pcm0p/xrun_debug
0
___________________________________________________________________

^ permalink raw reply	[flat|nested] 27+ messages in thread
* Invalid PCM pointer with CMI8738 and pcm.c buffer underuns
@ 2014-04-04 16:15 andoru
  2014-04-05  6:21 ` Raymond Yau
  0 siblings, 1 reply; 27+ messages in thread
From: andoru @ 2014-04-04 16:15 UTC (permalink / raw)
  To: alsa-devel

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.

^ permalink raw reply	[flat|nested] 27+ messages in thread
* Invalid PCM pointer with CMI8738 and pcm.c buffer underuns
@ 2014-03-26 16:02 andoru
       [not found] ` <CAN8ccib45znh-JbH57EhfbPNQg_fginmX9Tbr=yKMmd4D=iygQ@mail.gmail.com>
  0 siblings, 1 reply; 27+ messages in thread
From: andoru @ 2014-03-26 16:02 UTC (permalink / raw)
  To: alsa-devel

I've previously posted under ALSA's user mailing list so to avoid the
clutter, the details about what's happening is here:
http://article.gmane.org/gmane.linux.alsa.user/38258
http://article.gmane.org/gmane.linux.alsa.user/38260

There was no debug info under /proc/asound/card0/ so nothing to give from
there unless you guys need something specific.

Output of alsa-debug.sh:
http://www.alsa-project.org/db/?f=26187faadd47f3626029ba667cb004e74695f2b2

aplay returns:
________________________________________________________________________
$ aplay -vv 03\ paris\ match-\ Bikeride.wav
Playing WAVE '03 paris match- Bikeride.wav' : Signed 16 bit Little Endian,
Rate 44100 Hz, Stereo
Plug PCM: Direct Stream Mixing PCM
Its setup is:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 44100
  exact rate   : 44100 (44100/1)
  msbits       : 16
  buffer_size  : 4096
  period_size  : 1024
  period_time  : 23219
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 1024
  period_event : 0
  start_threshold  : 4096
  stop_threshold   : 4096
  silence_threshold: 0
  silence_size : 0
  boundary     : 1073741824
Hardware PCM card 0 'C-Media CMI8738' device 0 subdevice 0
Its setup is:
  stream       : PLAYBACK
  access       : MMAP_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 44100
  exact rate   : 44100 (44100/1)
  msbits       : 16
  buffer_size  : 4096
  period_size  : 1024
  period_time  : 23219
  tstamp_mode  : ENABLE
  period_step  : 1
  avail_min    : 1024
  period_event : 0
  start_threshold  : 1
  stop_threshold   : 1073741824
  silence_threshold: 0
  silence_size : 1073741824
  boundary     : 1073741824
  appl_ptr     : 0
  hw_ptr       : 0
#+                                                 | 00%
_____________________________________________________________________

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

end of thread, other threads:[~2014-04-29 14:26 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CAAvHfitJ2B1sr7_6h=ww_SVGgsuy4iNLGc3CjDyiNtwdpJTSUw@mail.gmail.com>
2014-04-01 11:37 ` Invalid PCM pointer with CMI8738 and pcm.c buffer underuns Clemens Ladisch
2014-04-01 18:48   ` andoru
2014-04-01 22:58     ` Raymond Yau
2014-04-02  2:24     ` andoru
2014-04-28 21:28 Andoru
2014-04-29  6:04 ` Takashi Iwai
2014-04-29 13:06   ` Andoru
2014-04-29 14:26     ` Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2014-04-20 15:04 Andoru
2014-04-28 16:00 ` Takashi Iwai
2014-04-29  1:12   ` Andoru
2014-04-10 19:05 andoru
2014-04-12  4:38 ` Raymond Yau
2014-04-12 17:56   ` Andoru
2014-04-12 23:38   ` Andoru
2014-04-04 16:15 andoru
2014-04-05  6:21 ` Raymond Yau
2014-04-05 18:29   ` andoru
2014-04-05 21:55     ` Raymond Yau
2014-04-05 23:16       ` andoru
2014-03-26 16:02 andoru
     [not found] ` <CAN8ccib45znh-JbH57EhfbPNQg_fginmX9Tbr=yKMmd4D=iygQ@mail.gmail.com>
     [not found]   ` <CAN8cciZkGx5XBO+u0b7V9YN8VU_rz8ckL8B=6oBFJr+-Yg8cxw@mail.gmail.com>
2014-03-26 23:23     ` Raymond Yau
2014-03-27 20:44       ` andoru
2014-03-28  4:46         ` Raymond Yau
2014-03-28  8:42           ` Clemens Ladisch
2014-03-28 14:28             ` andoru
2014-03-28 15:21               ` Clemens Ladisch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox