Thursday, June 10, 2010

ALSA, dmix, and X-Fi

I was having all sort of issues getting my SoundBlaster X-Fi working properly using the snd-ctxfi module. First off, I got something about "invalid sw-parameters," and once I had fixed that by going through dmix I lost the ability to have multiple streams playing at once.

Eventually I found a middle ground that had everything working, with the bonus of pretty sweet upmixing, all by putting this in my asound.conf:

pcm.!default {
type plug
slave {
pcm "duplex"
channels 6
}
ttable {
0.0 1
1.1 1
0.2 1
1.3 1
0.4 0.5
1.4 0.5
0.5 0.5
1.5 0.5
}
}

pcm.snd_card {
type hw
card 0 # SoundBlaster X-Fi
}
pcm.s51 {
type plug
slave {
pcm "surround51"
rate 48000
channels 6
}
}



pcm.duplex {
type asym
playback.pcm "s51"
capture.pcm "snd_card"
}

It looks like pushing everything through surround51 (though not directly) works perfectly.