[PlanetCCRMA] Jack crackle...

David Fraser davidf@sjsoft.com
Sun Mar 14 08:57:01 2004

Fernando Pablo Lopez-Lezcano wrote:

>>>>>>Generally, but there are different ways to write to soundcards under ALSA,
>>>>>>and jack uses a particular one. Or something like that - I'm a bit hazy on
>>>>>>the details :)
>>>>>I'm using the same "card" without any of the described problems...
>>>>Interesting, what driver are you using for it?
>>>Same as you, snd-intel8x0. What gives "/sbin/lsmod",
>>>"more /proc/asound/version" and "more /proc/version" ?
>>I've put the relevant output of these below ... (do I need more from lsmod?)
>>I also have been having problems with jack sometimes producing silence 
>>... restarting jack sometimes fixes it, sometimes not.
>>Through this though I did notice that I had newer versions of alsa-libs 
>>and alsa-utils than the rest of alsa...
>>but changing these to the same versions (latest from ccrma) did not 
>>affect the problem...
>>[root@scir bin]# lsmod | grep snd
>>snd-seq                47632   0  (unused)
>>snd-intel8x0           23460   3
>>snd-pcm                87392   2  [snd-intel8x0]
>>snd-timer              20068   0  [snd-seq snd-pcm]
>>snd-ac97-codec         50712   0  [snd-intel8x0]
>>snd-mpu401-uart         5256   0  [snd-intel8x0]
>>snd-rawmidi            19008   0  [snd-mpu401-uart]
>>snd-seq-device          6332   0  [snd-seq snd-rawmidi]
>>snd                    44676   1  [snd-seq snd-intel8x0 snd-pcm 
>>snd-timer snd-ac97-codec snd-mpu401-uart snd-rawmidi snd-seq-device]
>>soundcore               6500   0  [snd]
>>snd-page-alloc         10356   0  [snd-intel8x0 snd-pcm]
>>[root@scir bin]# cat /proc/asound/version
>>Advanced Linux Sound Architecture Driver Version 0.9.6.
>>Compiled on Sep 11 2003 for kernel 2.4.20-20.1.caps.rh90 with versioned 
>This is quite old... both the kernel and sound drivers. Current
>planetedge version is:
>>cat /proc/asound/version
>Advanced Linux Sound Architecture Driver Version 1.0.3.
>Compiled on Feb 29 2004 for kernel 2.4.25-1.ll.rh90.ccrmasmp (SMP) with
>versioned symbols.
>(or kernel 2.4.20-30.1.caps.rh90.ccrma for the capabilities enabled
>RedHat kernel). 
>>[root@scir bin]# cat /proc/version
>>Linux version 2.4.20-20.1.caps.rh90 (root@cmn19.Stanford.EDU) (gcc 
>>version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)) #1 Wed Sep 10 12:51:47 
>>PDT 2003
>>[root@scir bin]# rpm -qa | egrep '^alsa'
>You seem to have a rather unorthodox mix of packages :-)
>alsa-utils, alsa-driver, alsa-kernel*, alsa-lib* and alsa-tools should
>all be the same version for best results. While a mix of versions may
>work we would never know if that is the problem. Let me guess, you are
>probably using freshrpms as well, which has a newer version of the alsa
>driver (but no kernel modules for the custom Planet CCRMA kernels). 
Yes, good guess ... I fixed this but it didn't help...

>I would suggest upgrading to the latest kernel and kernel sound drivers,
>at least the previous paragraph output of /proc/asound/version suggests
>you are using a quite old kernel module set. 
>I you want to use the RedHat kernels you would need to:
>  apt-get install planetccrma-core-redhat
>for the capabilities enabled RedHat kernel or
>  apt-get install planetccrma-core
>for the Planet CCRMA kernel. 
Thanks, I did this but it hasn't resolved the problem... (took me a few 
days to get to a point where I could upgrade my kernel.
Then had to deal with my proprietary nvidia network drivers :-)).
I now have kernel 2.4.22-1.2140.nptl.caps.rhfc1.ccrma and everything is 
consistent (alsa, jack, etc) with planetccrma.

>You will probably get conflicts, I don't know how apt will react with
>your mix of packages. Let me know and I'll help you navigate around
Managed to sort out the package stuff, thanks. However somehow in the 
process my rpm database stopped responding ...
whenever I did anything with apt-get or rpm (even trying rpmdb 
--rebuilddb) I got the following error:
rpmdb: unable to join the environment
error: db4 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages index using db3 - Resource temporarily 
unavailable (11)
error: cannot open Packages database in /var/lib/rpm

Well that had me worried, I was about to abandon RedHat/Fedora ...
But I have now discovered that setting LD_ASSUME_KERNEL=2.2.5 allows rpm 
to work.
So on I go...

>BTW, I don't think you mentioned trying different Jack buffer size (!=
>1024) and number of periods (> 2), did you do that?
No this is interesting, and I have started trying to adjust these settings.
They definitely seem to affect the sound of the crackle, so it seems 
that this is the real problem.
However its a bit tricky playing around with the settings.
For example, if I set the rate to 44100, then I get a message that the 
playback rate != the capture rate
But I tried setting the rate to 48000 and when I tried to play a 44100 
rate file through XMMS, my system crashed.
I would presume that the greater the period * the number of periods (-p 
and -n) the less likely the crackle.
However, I haven't been able to find a combination that prevents the 
distortion, and it seems that p*n has a limit of 5120 or so.
Nothing I've tried in this range seems to work, and I get xruns of 
around 0.02 msecs repeatedly.
Anyway I'll keep on trying to change settings etc.
Thanks for the suggestions...