[alsa-devel] Backported sbxfi driver (UNTESTED!)
xarteras at nostalgicnetworxx.org
Thu Oct 16 14:56:20 CEST 2008
Takashi Iwai wrote:
> At Thu, 16 Oct 2008 12:03:41 +0000 (UTC),
> Jan Wolf wrote:
>> Takashi Iwai <tiwai <at> suse.de> writes:
>>> $SUBJECT is now on my sound-unstable git tree:
>>> together with other experimental patches.
>>> If you're using 2.6.27-rc* git tree, pull the master branch of the
>>> tree above into yours, and run make oldconfig. That is,
>>> % cd /your/git-tree
>>> % git pull git://...../sound-unstable-2.6.git master
>>> If you are not using 2.6.27-rc*, or not familiar with git, you can try
>>> alsa-driver-unstable snapshot tarball available at
>>> Run configure, make and make install as usual ALSA-driver tarball.
>>> (I didn't check whether the tarball correctly includes the sbxfi
>>> stuff. It should have been generated automatically. If not, wait
>>> for a while. If it still doesn't include sbxfi code, please report.
>>> I'll fix it tomorrow morning.)
>>> The driver is built only for 2.6.26 or later. If you have an older
>>> kernel, edit alsa-driver*/kconfig-vers and change the version of
>>> CONFIG_SND_SBXFI to 2.6.24 or whatever you want. Then run
>>> ./gitcompile, instead of configure in this case to update the
>>> configure script.
>>> The driver is totally untested. It's just compiled without errors,
>>> but not reviewed after a quick writing. So, don't expect it ever runs
>>> at the first try. A crash is highly possible.
>>> There are some build conditions found in sound/pci/sbxfi/sbxfi.c,
>>> starting with XXX_*. You can change it if you want. As default, it's
>>> for non-fullduplex but accept different rates. Not sure whether this
>>> works at all.
>>> Any test- (and better debugging-) reports are appreciated.
>> I finally managed to play music over xmms with this driver.
>> I needed to modify something, because most music is 44100Hz and the driver did
>> not work with this rate.
>> < #undef XXX_48K_ONLY
>> < #define XXX_CONT_RATE
>>> #define XXX_48K_ONLY
>>> #undef XXX_CONT_RATE
>>> case 44100:
>>> ratec = 0x4c;
>> It also needs to run in 48000Hz mode or else it will playback way to slow.
> So, XXX_96K_ONLY doesn't work well?
Interesting, XXX_96K_ONLY also works, just XXX_CONT_RATE doesn't.
>> I think this flag in ratec switches to 96KHz mode in the X-Fi, in windows this
>> mode is only available in Audio creation mode, so it must be handled in a
>> special way somehow.
> Thanks, good to know ;)
It's just speculation on my part, but as I just played around with the
flag it didn't seem to do anything, at least with 44100Hz input.
Otherwise the code I patched in just makes sure ratec is set at all when
playing back at 44100Hz, otherwise playback in xmms just hangs.
> And, which X-Fi model do you have?
> Please show the lspci -nv output, too.
I've got the X-Fi Elite Pro.
That's The one with the external In/Out box.
Speaking of which, the headphone jack on it does not output a signal
yet, the signal only goes to line out.
There's some relais on the card that seem to switch these, they click
multiple times with the windows driver and not all all with yours, I
think that's the reason :)
And lspci outputs:
05:08.0 Multimedia audio controller : Creative Labs SB X-Fi
Subsystem: Creative Labs Device [1102:0022]
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium
>TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 32 (1000ns min, 1250ns max), Cache Line Size: 32 bytes
Interrupt: pin A routed to IRQ 18
Region 0: I/O ports at b400 [size=32]
Region 1: Memory at c5000000 (64-bit, non-prefetchable) [size=2M]
Region 3: Memory at c0000000 (64-bit, non-prefetchable) [size=64M]
Capabilities:  Power Management version 2
Flags: PMEClk- DSI+ D1+ D2+ AuxCurrent=0mA
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
Capabilities:  Message Signalled Interrupts: Mask- 64bit+
Address: 0000000000000000 Data: 0000
Kernel driver in use: SB-XFi
More information about the Alsa-devel