You are not logged in.

#1 2009-09-01 15:20:50

krolpl
Member
Registered: 2008-11-27
Posts: 9

Compile alsa-driver for XFI

Hi I needed driver for SB-Xfi so I have compiled new alsa-driver (1.0.21) from alsa-project page, I have added snd-ctxfi to my modules in /etc/rc.conf module loads without any problem:
lsmod|grep '^snd' | column -t

snd_usb_audio       86304  2
snd_usb_lib         17252  1   snd_usb_audio
snd_rawmidi         21856  1   snd_usb_lib
snd_hwdep           7656   1   snd_usb_audio
snd_seq_dummy       2696   0
snd_seq_oss         31168  0
snd_seq_midi_event  7012   1   snd_seq_oss
snd_seq             53744  5   snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_seq_device      6768   4   snd_rawmidi,snd_seq_dummy,snd_seq_oss,snd_seq
snd_pcm_oss         40352  0
snd_mixer_oss       17540  2   snd_pcm_oss
snd_ctxfi           96244  0
snd_pcm             73672  3   snd_usb_audio,snd_pcm_oss,snd_ctxfi
snd_timer           21100  2   snd_seq,snd_pcm
snd                 58436  13  snd_usb_audio,snd_rawmidi,snd_hwdep,snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_ctxfi,snd_pcm,snd_timer
snd_page_alloc      8876   1   snd_pcm

I have set XFi as my default card in /etc/modprobe.conf but I still cant see that card in alsamixer. Any ideas?

Offline

#2 2009-09-01 18:53:51

s3kt0r
Member
Registered: 2009-01-20
Posts: 208

Re: Compile alsa-driver for XFI

I have a Xfi too, and it's working with the driver available here. Give it a spin if you haven't already.
I'll try installing alsa-driver too, maybe create a pkgbuild.

edit:
I wanted to come up with a pkgbuild for all of this real quick, I just had to modify a existing pkgbuild in abs, just changed package versions. Also I removed both patches on alsa-utils, it wouldn't build otherwise, maybe because original pkgbuild and patches was for 1.0.20.
Created all pkgs except alsa-oss (latest version on repo is the same as on alsa website), including the one for alsa-driver. Installed all of that, after reboot it recognized the Xfi, loaded snd-ctxfi no problems, I could even select it as my main soundboard, but it would crash both video and audio player, even aplay. Now I'm back at ctxfi from AUR.
I still have those pkgbuilds, but they're nothing much, you can also do it, I'm sure. There could also be something I'm not doing right. By the way, what ./configure options did you use on alsa-driver? I used ./configure --with-cards=ctxfi --with-oss=yes --with=sequencer=yes . Maybe missing something here that could be making applications that use the soundcard crash?

edit2:
Seeing another post here on the forums, you are aware that ctxfi is going to be in the next kernel version, 2.6.31? smile

Last edited by s3kt0r (2009-09-01 23:55:30)


box1: Arch (linux-3.17-rc5)
box2: Gentoo (linux-3.17-rc5)
wm: subtle

Offline

#3 2009-09-02 14:11:43

krolpl
Member
Registered: 2008-11-27
Posts: 9

Re: Compile alsa-driver for XFI

s3kt0r wrote:

I have a Xfi too, and it's working with the driver available here. Give it a spin if you haven't already.
I'll try installing alsa-driver too, maybe create a pkgbuild.

edit:
I wanted to come up with a pkgbuild for all of this real quick, I just had to modify a existing pkgbuild in abs, just changed package versions. Also I removed both patches on alsa-utils, it wouldn't build otherwise, maybe because original pkgbuild and patches was for 1.0.20.
Created all pkgs except alsa-oss (latest version on repo is the same as on alsa website), including the one for alsa-driver. Installed all of that, after reboot it recognized the Xfi, loaded snd-ctxfi no problems, I could even select it as my main soundboard, but it would crash both video and audio player, even aplay. Now I'm back at ctxfi from AUR.
I still have those pkgbuilds, but they're nothing much, you can also do it, I'm sure. There could also be something I'm not doing right. By the way, what ./configure options did you use on alsa-driver? I used ./configure --with-cards=ctxfi --with-oss=yes --with=sequencer=yes . Maybe missing something here that could be making applications that use the soundcard crash?

edit2:
Seeing another post here on the forums, you are aware that ctxfi is going to be in the next kernel version, 2.6.31? smile

Thanks, I will wait for 2.6.31, it seems that compiling alsa is too much for me smile

Offline

#4 2009-09-10 12:37:31

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,616
Website

Re: Compile alsa-driver for XFI

After having waited over a year for official ctxfi support, I only discovered this after skimming the changelog for kernel 2.6.31. I wish I had discovered this sooner but I'm still too impatient to wait for kernel to hit the official repos to test it, so here's a working PKGBUILD:

PKGBUILD

# Contributor: Xyne
pkgname=snd-ctxfi
_projectname=alsa-driver
pkgver=1.0.21
pkgrel=4
pkgdesc="Alsa driver for the Creative's Sound Blaster X-Fi soundcard series (EMU20K1, EMU20K2)"
arch=('i686' 'x86_64')
url="http://www.creative.com/"
license=('GPL2' 'custom:CEULA')
depends=('kernel26')
conflicts=('kernel26>=2.6.31')
install=snd-ctxfi.install
source=(ftp://ftp.alsa-project.org/pub/driver/${_projectname}-${pkgver}.tar.bz2)
md5sums=('3ee5ec5357f237dc78847feb85d8560d')

build() {
  cd "$srcdir/${_projectname}-${pkgver}"
  ./configure --with-isapnp=no --with-cards=ctxfi,ca0106,hda-intel --with-moddir=/lib/modules/$(uname -r)/updates/alsa || return 1
  make || return 1
  make DESTDIR="$pkgdir" install-modules || return 1
}

snd-ctxfi.install

KERNEL_VERSION=$(uname -r)

post_install() {
  depmod -v $KERNEL_VERSION &> /dev/null
  modprobe snd-ctxfi &> /dev/null
  echo "==> Add 'snd-ctxfi' to the MODULES array of /etc/rc.conf"
}

post_upgrade() {
  post_install $1
}

pre_remove() {
  modprobe -r snd-ctxfi &> /dev/null
}

post_remove() {
  depmod -v $KERNEL_VERSION &> /dev/null
}

There's no point in adding this to the AUR as it will be obsolete very soon. I'm only posting it here for those of you who don't want to wait any longer.

Note that I've added a line to make this conflict with kernel26>=2.6.31. Although it's not a proper conflict, this should keep people from forgetting about it and leaving useless clutter on the system.

Offline

#5 2009-09-10 15:39:07

yodo
Member
From: Germany
Registered: 2008-02-02
Posts: 71

Re: Compile alsa-driver for XFI

I'm curious about the implemented driver... I could not really find a feature list, only posts that claim its far superior to the creative release. Which I read was quite weak (no surround, bad sound quality...).
Does 5.1 really work now? - I'm thinking about buying a X-FI if its a real option now.

Last edited by yodo (2009-09-10 15:40:31)

Offline

#6 2009-09-11 12:54:18

Kn3cHt
Member
From: Germany
Registered: 2007-10-26
Posts: 13

Re: Compile alsa-driver for XFI

yodo wrote:

I'm curious about the implemented driver... I could not really find a feature list, only posts that claim its far superior to the creative release. Which I read was quite weak (no surround, bad sound quality...).
Does 5.1 really work now? - I'm thinking about buying a X-FI if its a real option now.

Yes, 5.1 really works on my X-Fi XtremeGamer! big_smile Sound is great too. smile

But there is no default upmix for stereo sources, like the onboard hda-intel card had. neutral
To "fix" this just put this into "/etc/asound.conf" or "~/.asoundrc"

pcm.20to51 {
     type route
     slave.pcm surround51
     slave.channels 6
     ttable.0.0 1
     ttable.1.1 1
     ttable.0.2 1
     ttable.1.3 1
     ttable.0.4 0.5
     ttable.1.4 0.5
     ttable.0.5 0.5
     ttable.1.5 0.5
hint {
    show on
    description "Upmix Stereo to 5.1" 
}  
}

pcm.!default {
    type             plug
    slave.pcm       "20to51"
}

Most programs will have 5.1 sound after this. To make it work with phonon, you have to change the device it uses to output sound to "Upmix Stereo to 5.1"

Offline

#7 2009-09-11 16:56:08

warnec
Member
From: Poland
Registered: 2009-06-22
Posts: 166

Re: Compile alsa-driver for XFI

Can you guys take a look here?

http://bbs.archlinux.org/viewtopic.php? … 21#p617621

Is it normal? When will it work?

Offline

#8 2009-10-28 15:51:23

ST.x
Member
From: Sydney, Australia
Registered: 2008-01-25
Posts: 363
Website

Re: Compile alsa-driver for XFI

Using

pcm.!default {
type plug
slave.pcm "surround51"
slave.channels 6
route_policy duplicate
}

Also works for upmixing to 5.1.

Offline

#9 2009-10-28 20:32:22

brebs
Member
Registered: 2007-04-03
Posts: 3,401

Re: Compile alsa-driver for XFI

Those 2 upmixing methods to 5.1 are rubbish compromises. Upmix properly to 5.1, using the tweeters *as* tweeters, and outputting bass to only the subwoofer. You get noticeably better-quality audio.

Offline

#10 2009-12-17 07:25:20

depierce
Member
From: Simi Valley, CA
Registered: 2007-07-24
Posts: 14

Re: Compile alsa-driver for XFI

brebs wrote:

Those 2 upmixing methods to 5.1 are rubbish compromises. Upmix properly to 5.1, using the tweeters *as* tweeters, and outputting bass to only the subwoofer. You get noticeably better-quality audio.

brebs, I love you.  Big hugs!

Offline

#11 2010-02-12 00:05:47

yodo
Member
From: Germany
Registered: 2008-02-02
Posts: 71

Re: Compile alsa-driver for XFI

Kn3cHt wrote:

Most programs will have 5.1 sound after this. To make it work with phonon, you have to change the device it uses to output sound to "Upmix Stereo to 5.1"

That works fine, thank you! But I'm curious about the "proper" upmix linked by brebs.
Too bad it ends with an error:

speaker-test -D upmix_20to51 -c 2 -t wav

speaker-test 1.0.22

Playback device is upmix_20to51
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 43 to 5461
Period size range from 3 to 2730
Using max buffer size 5460
Periods = 4
speaker-test: pcm_plug.c:388: snd_pcm_plug_change_channels: Assertion `snd_pcm_format_linear(slv->format)' failed.
Aborted

Any idea how to fix that?

And is there a way to use this upmix + lowpass file system wide? (e.g. as phonon device in KDE)? Or is it necesarry to configure every audioplayer?

Apart from that the subwoofer is relatively quiet, although is works (with Kn3cHt's Method). Is it possible to push the volume a bit via asoundrc? Center/LFE is maxed in kmix.

Last edited by yodo (2010-02-12 12:20:28)

Offline

Board footer

Powered by FluxBB