ALSA troubles, triggered by CPU usage? [edit: CPUfreq]
Hey everyone... got some problems here getting sound working (in particular, mixing)
First:
-I've set up my 'default' ALSA device to use dmix/dsnoop, as well as my dsp0 (OSS) emulated device, although the situation was exactly the same without dsnoop.
-Kernel 2.6.16.17, ALSA compiled into kernel and OSS emulation modules compiled into kernel
-alsa-util 1.0.11rc2, alsa-lib 1.0.11rc2, alsa-oss 1.0.11rc3, all compiled from source (1.0.11rc2 chosen to match kernel ALSA version)
-esd.conf includes "-d default" as a startup option
OK, the problem is:
When an application uses the 'default' device, or else uses OSS and is launched using aoss (i.e. any application using dmix), any time the CPU load increases to 70% or higher for longer than about 0.5 second (maybe shorter, I don't know), all sound output is cut, and any application using dmix either:
a) hangs
b) gives an error
c) goes into sort of 'silent fast-forward'
If the application is then restarted (after CPU load goes back down), it can again output sound.
I think this may be related to another problem:
When NOT using dmix, i.e. selected device hw:0,0, and CPU usage rises to a similar level, sound output momentarily 'skips' (pauses for a split second; for xmms, music then skips ahead by around 30 seconds), and then resumes playing ordinarily after a moment. I tested this first by switching desktops using 3ddesk (3D pager, very cool), and then later using a shell script running a tight loop:
while [ 1 ]
do
echo SPAM
done
The sound skips for a moment, and then resumes playing smoothly/indefinitely while the 'SPAM' loop is still running. However, when using dmix, the sound simply cuts out.
Similarly, I have ESD configured to go through dmix, and when applications run through ESD, anytime the CPU load goes high, the applications simply hang; running 'killall esd' then restores sound/unhangs the applications, and 'ps -e' shows that ESD is again running. Attempting to run arts through ALSA gave an error message about not allowing input on 'default' (That's why I put dsnoop in, I haven't re-tried arts with ALSA yet), and running through ESD doesn't work: initializing arts puts CPU load up to 100% for a few seconds, and ESD hangs; killing ESD then causes arts to give an error about device/hardware configuration and quit.
Does anyone know what might be causing this problem? I'd REALLY appreciate any help/suggestions, I've been googling all day for info linking ALSA/dmix failures with high CPU usage, and I haven't found anything yet.. I've been trying to get Linux working on this laptop for a month now, and this is pretty much the last thing I need to have everything running smoothly.
Thanks in advance,
-Hunter2
Last edited by Hunter2; 06-12-2006 at 08:05 AM.
Reason: More info
|