[PlanetCCRMA] f7: jack/alsa crackle w/ cardbus and hdsp multiface

Fernando Pablo Lopez-Lezcano nando@ccrma.Stanford.EDU
Tue Jul 10 21:50:01 2007

On Tue, 10 Jul 2007, Scott Davidson wrote:
> Fernando Lopez-Lezcano wrote:
>> On Sat, 2007-07-07 at 10:20 -0700, Scott Davidson wrote:
>>> Hello,
>>> I recently upgraded from fc5 to f7 and have since been having problems
>>> using a Multiface II card with the cardbus adapter. The output from any
>>> jack app is choppy and there is background crackle as well. Jack/Alsa
>>> both work fine on the internal laptop card. From the /var/log/messages
>>> output, it looks like there *might* be a hardware/pci problem:
>>> Some interesting dmesg output:
>>> (if I boot with the default arguments)
>>> PCI: Bus #03 (-#06) is hidden behind transparent bridge #02 (-#02) (try
>>> 'pci=assign-busses')
>>> PCI: Cannot allocate resource region 0 of device 0000:02:03.0
>>> (if I boot the kernel with 'lapic pci=assign-busses, i still get)
>>> PCI: Cannot allocate resource region 0 of device 0000:02:03.0
>>> I'm not sure if that is a red herring, but that happens to be the
>>> location of the cardbus bridge. I've been testing this using PureData
>>> and their sin wave sound card test, but all jack applications seem to
>>> exhibit this problem.  I've tried recording the output directly from  PD
>>> and playing it back on the internal card, and the artifacts are found in
>>> the recording. I've also tried disabling drm and selinux with no luck.
>>> This occurs on both the stock kernels and the rt-kernels (with either
>>> the default alsa, or the kernel module Fernando just made). From looking
>>> at the IRQs, it looks like IRQ10 is pretty full, but that seemed to work
>>> fine for FC5.
>> Exact same hardware as before? It does look like a kernel problem in the
>> mainline kernel.
> Yes, it's the same hardware that was working on FC5.
>>> Is anyone using successfully using hdsp/multiface on F7 using the CCRMA
>>> repo packages? Does anyone have any additional troubleshooting ideas?
>> I used one briefly to test it in my laptop. I was running 64x2 with no
>> problems, but the test was not very long.
>> The only thing that jumps at me from the data in the email are the
>> latencies of the pci bus cards. The pci cards that have them are set to
>> 128 and the hdsp is set to 255. Is that because you tried to optimize
>> them?
>> I normally see latencies on the order of 64... If you lower them, does
>> it make any difference?
> Those are the default pci latency timer settings. As you suggested, I
> lowered the latencies on several devices:
> 00:01.0 PCI bridge: Intel Corporation 82855PM Processor to AGP
> Controller (rev 21)
> Latency: 16 (was 128)
> 01:00.0 VGA compatible controller: ATI Technologies Inc RV350 [Mobility
> Radeon 9600 M10]
> Latency: 20 (was 128)
> 02:03.0 CardBus bridge: ENE Technology Inc CB1410 Cardbus Controller
> (rev 01)
> Latency: 32 (was 168)
> 03:00.0 Multimedia audio controller: Xilinx Corporation RME Hammerfall
> DSP (rev 32)
> Latency: 64 (was 255)
> I set everything else to latency = 0, including ethernet, wireless, and
> firewire (which I don't currently use anyways).  Unfortunately,  this
> doesn't seem to have any effect on the symptoms.  Does setpci perhaps
> require either a system reboot or a restart of alsa?

AFAIK the effect is immediate. A reboot will erase it...

> (btw, is /etc/rc.d/init.d/alsasound missing in F7? I saw a few threads 
> on this for FC6, but there didn't seem to be a resolution).

"alsasound" was never used by Fedora but only by Planet CCRMA. I don't 
provide it anymore (it was part of the extra kernel modules from the time 
alsa was not part of the mainline kernel - Fedora uses a different way to 
modprobe the kernel modules relevant to the existing hardware).

> In any event, are these new values more reasonable for a laptop? I did 
> find a few informative links on this issue, and it sounds like many 
> people swear by tweaking those latency values 
> (http://www.sabi.co.uk/Notes/linuxSoundLatency.html, which also includes 
> links to other pci latency pages, if anyone is interested).

Sometimes that can help. The absolute values don't matter as much as the 
relative proportions so that one peripherial does not "hog" pci bandwidth.
> Anyways, I will try disabling devices one-by-one this weekend, and if
> that doesn't help, I'll probably try building an older kernel.

You could download and install (with "rpm -ivh", _not_ '-Uvh') the old fc5 
kernel. Hmmm, most probably it will not work as the configuration of the 
disk subsystem has changed a lot between fc6 and fc7.

I don't know what would be the best way to report this to lkml...
-- Fernando