[linux-audio-user] snd-hdsp+cardbus+M6807 notebook=distortion -- FIXED!

Ivica Ico Bukvic ico at fuse.net
Sun Apr 18 00:37:31 BST 2004


Will do sometime towards the end of this coming week (have a horrible
deadline to deal with until this coming Thursday) :-).

Although I am pretty sure the latency is not the problem because in Windows
it was set to less than that and the card worked (as long as it is not 0,
i.e. I tested it at 0x20 or 32). The latency is supposed to be adjusted by
the hdsp driver, as Matthias (RME support guy) told me (and I quote):

<snip>

This equals a PCI latency timer entry of 32, as found in all usual
motherboard BIOS. Yes, on a notebook this entry isn't available in a
usual BIOS screen, and yes, some stupid manufacturers even forget to set
it, so it stays at 0 - which means the end of digital audio. We have set
it to 255, because some other devices steal away the PCI priority that
audio needs. As our hardware is limited to bursts of 16, we will never
use the 255, so do not hog the PCI bus.

> Upon connecting the HDSP cardbus it
> is throttled to 0xFF (or 255). This happens every time I reconnect the
> cardbus *except*:
> 
> If I leave the cardbus connected and suspend, then resume, the latency
> is left at 0x20 even after the card has been reinitialized suggesting
> that the RME hdsp cardbus does not reset the latency after its power
> managed resume (assuming that it even supports that), yet after brief
> testing (need to do more exhaustive tests) I've noticed no
> deterioriation in the sound quality.

Support for sleep mode is new, and it might well be that we overlooked
to set this value again on wakeup. But as you already noticed this
usually is no problem. Might be fixed in a later driver.

Regards
Matthias Carstens
RME

<end snip>

For this reason the latency is recommended to be 0xff as this way there is
least possibility of an xrun to occur due to some other PCI device
snatching-away the bus for too long.

I also tested in Windows by changing latency (before I knew what was the
problem) and nothing worked until I changed the two registers in question
(and *only* when I changed both of them accordingly). The Arima manufacturer
support guy Okoh (Arima manufacturers the eMachines M680x notebooks) is
working with me in order to fix the BIOS as it seems that in Windows after
suspend the pcmcia settings for those 2 registers change to 0x90 and 0x06
(even though upon reboot they are back to D0 and 04 -- the only settings
that work) suggesting problem with BIOS's ACPI, and this was what brought
this whole issue to my attention in the first place as it was easier to
track the problem in Windows where the soundcard worked at least some of the
time (before suspend). By comparing the changes, this was the only thing
that changed, plus the latency which was reverted to 0x20 after suspend but
did not affect the performance of the soundcard and is likely a bug in RME
driver (as Matthias has pointed out). Simple replugging of the soundcard
reverts the latency back to FF. Only after I thoroughly tested this in
Windows I tried applying the changes in Linux and they worked. Hence my log
I posted here a while ago was not very methodical.

Hope this helps!

Best wishes,

Ivica Ico Bukvic, composer & multimedia sculptor
http://meowing.ccm.uc.edu/~ico/
 
> -----Original Message-----
> From: Daniel Ritz [mailto:daniel.ritz at gmx.ch]
> Sent: Saturday, April 17, 2004 8:44 PM
> To: Tim Blechmann; ccheney at debian.org; Ivica Ico Bukvic
> Cc: linux-pcmcia at lists.infradead.org; Russell King; 'Thomas Charbonnel'
> Subject: Re: [linux-audio-user] snd-hdsp+cardbus+M6807 notebook=distortion
> -- FIXED!
> 
> could you guys test the attaches script after the card is inserted and the
> hdsp driver loaded? it adjusts latency timers to 255 (the PCI latency
> timer of the bridge, the cardbus latency timer of the bridge, the pci
> latency
> timer of the hdsp is already set to 255 by the driver).
> 
> just to be sure that's not the problem.
> 
> ico, i'm know it works for you with 0x04 at 0xc9, but please try anyway.
> 
> oh and please use a 2.6.5 kernel.
> 
> -daniel
> 
> 
> #!/bin/sh
> 
> # set lateny timers for the bridges
> CB=`lspci | grep CardBus | cut -d" " -f1`
> for i in $CB; do
> 	echo "setting latency timer for CB $i"
> 	setpci -s $i 0x0d.b=0xff > /dev/null
> 	setpci -s $i 0x1b.b=0xff > /dev/null
> 
> 	# for EnE only, others should ignore it
> 	setpci -s $i 0xc9.b=0x06 > /dev/null
> done
> 






More information about the linux-pcmcia mailing list