# sound card help

## Wizumwalt

Hi all,

I have a SB X-Fi which I see many ppl have gotten running just fine using the latest ebuild, and installed fine for me. I have made alsa a 'M' in my kernel now. I'm running the 2.6.25-gentoo-r7 kernel.

I can't tell if my sound card is being found which I think is my problem. Here's some more info and if anyone has ideas, much appreciated.

```

# lspci | grep -i audio

00:1b.0 Audio device: Intel Corporation 631xESB/632xESB High Definition Audio Controller (rev 09)

03:00.0 Audio device: Creative Labs Device 000b (rev 03)

```

My /etc/make.conf has:

```

ALSA_CARDS="ctxfi"

```

```

# lsmod

Module                  Size  Used by

nvidia               8102032  24 

ctxfi                  52456  0 

snd_pcm                72904  1 ctxfi

snd_timer              21712  1 snd_pcm

snd                    52552  3 ctxfi,snd_pcm,snd_timer

soundcore               8608  1 snd

i2c_core               21984  1 nvidia

snd_page_alloc         10064  1 snd_pcm

```

A dmesg shows:

```

ctatc: Card not recognised

CTALSA: probe of 0000:03:00.0 failed with error -2

```

If I were to run an *.mp3, I'd get the following error ...

```

$ madplay music.mp3 

MPEG Audio Decoder 0.15.2 (beta) - Copyright (C) 2000-2004 Robert Leslie et al.

ALSA lib pcm_hw.c:1240:(_snd_pcm_hw_open) Invalid value for card

audio: No such file or directory

```

Well, I have ALSA as a module in the kernel, but when trying to compile the alsa-driver-1.0.18, I get a message saying it's already in the kernel. I don't understand why that is.

```

 # emerge alsa-driver

Calculating dependencies... done!

>>> Verifying ebuild Manifests...

>>> Emerging (1 of 1) media-sound/alsa-driver-1.0.18 to /

 * alsa-driver-1.0.18.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...             [ ok ]

 * checking ebuild checksums ;-) ...                                      [ ok ]

 * checking auxfile checksums ;-) ...                                     [ ok ]

 * checking miscfile checksums ;-) ...                                    [ ok ]

 * checking alsa-driver-1.0.18.tar.bz2 ;-) ...                            [ ok ]

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found kernel object directory:

 *     /lib/modules/2.6.25-gentoo-r7/build

 * Found sources for kernel version:

 *     2.6.25-gentoo-r7

 * Checking for suitable kernel configuration options...

 *   ALSA is already compiled into the kernel. This is the recommended configuration, don't emerge alsa-driver.

 * Please check to make sure these options are set correctly.

 * Failure to do so may cause unexpected problems.

 * Once you have satisfied these options, please try merging

 * this package again.

 * 

 * ERROR: media-sound/alsa-driver-1.0.18 failed.

```

----------

## MaximeG

Hi,

When you set an option to "M" in the kernel, it will compile it from the kernel sources and makes it a module (which can be unloaded and loaded in the kernel at will, and so on). But it will be compiled/installed when you will compile your kernel doing : 

```
make && make modules-install
```

Emerging the media-sound/alsa-driver is another kernel module, providing as a different package. It's indeed conflicting with the kernel one and its a perfectly normal behaviour.

You have to ask yourself whether you want to use the module provided by the kernel package or the one provided by the "media-sound/alsa-driver" package.

Regards,

Maxime

----------

## d2_racing

Hi, you should use the kernel module.

Also, can you post this :

```

# update-pciids

# lspci

```

----------

## Wizumwalt

 *d2_racing wrote:*   

> Hi, you should use the kernel module.
> 
> Also, can you post this :
> 
> ```
> ...

 

```

# update-pciids 

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

100  155k  100  155k    0     0  26849      0  0:00:05  0:00:05 --:--:-- 33923

Done.

# lspci

00:00.0 Host bridge: Intel Corporation 5000X Chipset Memory Controller Hub (rev 12)

00:02.0 PCI bridge: Intel Corporation 5000 Series Chipset PCI Express x4 Port 2 (rev 12)

00:03.0 PCI bridge: Intel Corporation 5000 Series Chipset PCI Express x4 Port 3 (rev 12)

00:04.0 PCI bridge: Intel Corporation 5000X Chipset PCI Express x16 Port 4-7 (rev 12)

00:05.0 PCI bridge: Intel Corporation 5000 Series Chipset PCI Express x4 Port 5 (rev 12)

00:06.0 PCI bridge: Intel Corporation 5000 Series Chipset PCI Express x4 Port 6 (rev 12)

00:07.0 PCI bridge: Intel Corporation 5000 Series Chipset PCI Express x4 Port 7 (rev 12)

00:10.0 Host bridge: Intel Corporation 5000 Series Chipset FSB Registers (rev 12)

00:10.1 Host bridge: Intel Corporation 5000 Series Chipset FSB Registers (rev 12)

00:10.2 Host bridge: Intel Corporation 5000 Series Chipset FSB Registers (rev 12)

00:11.0 Host bridge: Intel Corporation 5000 Series Chipset Reserved Registers (rev 12)

00:13.0 Host bridge: Intel Corporation 5000 Series Chipset Reserved Registers (rev 12)

00:15.0 Host bridge: Intel Corporation 5000 Series Chipset FBD Registers (rev 12)

00:16.0 Host bridge: Intel Corporation 5000 Series Chipset FBD Registers (rev 12)

00:1b.0 Audio device: Intel Corporation 631xESB/632xESB High Definition Audio Controller (rev 09)

00:1c.0 PCI bridge: Intel Corporation 631xESB/632xESB/3100 Chipset PCI Express Root Port 1 (rev 09)

00:1d.0 USB Controller: Intel Corporation 631xESB/632xESB/3100 Chipset UHCI USB Controller #1 (rev 09)

00:1d.1 USB Controller: Intel Corporation 631xESB/632xESB/3100 Chipset UHCI USB Controller #2 (rev 09)

00:1d.2 USB Controller: Intel Corporation 631xESB/632xESB/3100 Chipset UHCI USB Controller #3 (rev 09)

00:1d.3 USB Controller: Intel Corporation 631xESB/632xESB/3100 Chipset UHCI USB Controller #4 (rev 09)

00:1d.7 USB Controller: Intel Corporation 631xESB/632xESB/3100 Chipset EHCI USB2 Controller (rev 09)

00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev d9)

00:1f.0 ISA bridge: Intel Corporation 631xESB/632xESB/3100 Chipset LPC Interface Controller (rev 09)

00:1f.1 IDE interface: Intel Corporation 631xESB/632xESB IDE Controller (rev 09)

00:1f.2 SATA controller: Intel Corporation 631xESB/632xESB SATA AHCI Controller (rev 09)

00:1f.3 SMBus: Intel Corporation 631xESB/632xESB/3100 Chipset SMBus Controller (rev 09)

01:00.0 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express Upstream Port (rev 01)

01:00.3 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express to PCI-X Bridge (rev 01)

02:00.0 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express Downstream Port E1 (rev 01)

02:01.0 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express Downstream Port E2 (rev 01)

05:0b.0 SCSI storage controller: LSI Logic / Symbios Logic SAS1068 PCI-X Fusion-MPT SAS (rev 01)

06:00.0 Audio device: Creative Labs Device 000b (rev 03)

07:00.0 VGA compatible controller: nVidia Corporation GeForce 8800 GT (rev a2)

0b:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5752 Gigabit Ethernet PCI Express (rev 02)

0c:02.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit Ethernet (rev 10)

0c:0a.0 FireWire (IEEE 1394): Texas Instruments TSB43AB22/A IEEE-1394a-2000 Controller (PHY/Link)

```

----------

## d2_racing

Hi, so you have a sound blaster  :Razz: 

Can you post your emerge --info plz.

The error message is there when you have your alsa configuration inside the kernel and you want to install also the alsa package.

So you need to choose only one, not both.

----------

## Wizumwalt

 *d2_racing wrote:*   

> Hi, so you have a sound blaster 
> 
> Can you post your emerge --info plz.
> 
> The error message is there when you have your alsa configuration inside the kernel and you want to install also the alsa package.
> ...

 

But I do not have the alsa-drivers emerged. So that part was a mistake earlier trying to emerge them, but since they didn't emerge, I figure I'm ok, but still have something wrong. I'm guessing the 'alsa' shouldn't be in my USE var, so I'll take it out and retry the 'emerge xfi-drivers'.

Here's my --info

```

# emerge --info

Portage 2.1.4.5 (default-linux/amd64/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.26-gentoo-r3 x86_64)

=================================================================

System uname: 2.6.26-gentoo-r3 x86_64 Intel(R) Xeon(R) CPU 5130 @ 2.00GHz

Timestamp of tree: Wed, 26 Nov 2008 01:45:01 +0000

app-shells/bash:     3.2_p33

dev-java/java-config: 1.3.7, 2.1.6

dev-lang/python:     2.4.4-r14, 2.5.2-r7

dev-python/pycrypto: 2.0.1-r6

dev-util/cmake:      2.4.6-r1

sys-apps/baselayout: 1.12.11.1

sys-apps/sandbox:    1.2.18.1-r2

sys-devel/autoconf:  2.13, 2.61-r2

sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1

sys-devel/binutils:  2.18-r3

sys-devel/gcc-config: 1.4.0-r4

sys-devel/libtool:   1.5.26

virtual/os-headers:  2.6.23-r3

ACCEPT_KEYWORDS="amd64"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=nocona -O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"

CXXFLAGS="-march=nocona -O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="http://gentoo.mirrors.tera-byte.com/ ftp://mirrors.tera-byte.com/pub/gentoo ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ ftp://ftp.gtlib.gatech.edu/pub/gentoo http://www.gtlib.gatech.edu/pub/gentoo http://mirror.datapipe.net/gentoo ftp://mirror.datapipe.net/gentoo http://mirror.phy.olemiss.edu/mirror/gentoo"

MAKEOPTS="-j3"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/local/portage"

SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"

USE="X acl alsa amd64 apm arts avahi avi berkdb bzip2 cairo cdr cli cracklib crypt ctxfi cups dbus dri dvd encode f77 fortran gdbm gif gnome gpm gtk gtk2 hal hda-intel iconv imlib ipv6 isdnlog java jpeg jpg kde mdnsresponder-compat midi mmx motif mpeg mudflap mysql ncurses nls nptl nptlonly nsplugin nvidia oggvorbis opengl openmp oss pam pcre perl png pppd python qt qt3 qt4 readline reflection sdl session source spl sse sse2 ssl svg symlink tcpd tiff unicode xml2 xorg zlib" ALSA_CARDS="ctxfi" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

```

----------

## Wizumwalt

Removed 'alsa' from the USE var in /etc/make.conf, re-emerged xfi-drivers and 'modprobe ctxfi'. Still can't get audio to play. 

Linux Kernel Configuration v2.6.26-gentoo-r3 -> Device Drivers -> Sound

(M) Sound Card Support

(M) Advanced Linux Sound Architecture

(M) Sequencer support 

(M) OSS Mixer API

(M) OSS PCM (digital audio) API

```
 

# lsmod

Module                  Size  Used by

ctxfi                  52456  0 

snd_seq                49824  0 

snd_pcm_oss            26336  0 

snd_mixer_oss          16576  1 snd_pcm_oss

nvidia               8101040  24 

snd_pcm                65352  2 ctxfi,snd_pcm_oss

snd_timer              21648  2 snd_seq,snd_pcm

snd                    54536  6 ctxfi,snd_seq,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer

soundcore               8544  1 snd

i2c_core               21920  1 nvidia

snd_page_alloc         10064  1 snd_pcm

```

```

# emerge -s alsa-driver

Searching...   

[ Results for search key : alsa-driver ]

[ Applications found : 1 ]

 

*  media-sound/alsa-driver

      Latest version available: 1.0.18

      Latest version installed: [ Not Installed ]

      Size of files: 2,751 kB

      Homepage:      http://www.alsa-project.org/

      Description:   Advanced Linux Sound Architecture kernel modules

      License:       GPL-2

```

----------

## MaximeG

Hi,

Have you tried the gentoo alsa guide : http://www.gentoo.org/doc/en/alsa-guide.xml. It deals with issues caused by moving from alsa-driver module to in kernel module, code 3.12.

Maxime

----------

## Wizumwalt

Yeah, but my problem seems to be before any of that. I can't get the kernel to recognize the card and display it's output in dmesg. The kernel doesn't contain the code for the driver, and alsa doesn't have it either. I emerged the xfi-drivers package which placed it in the /libs, and that gets inserted w/ modprobe, ... but I feel I'm missing something. 

For example, this error is from my dmesg output ... 

```

ctatc: Card not recognised

CTALSA: probe of 0000:06:00.0 failed with error -2

```

And this is from trying to use it ...

```

$ madplay my.mp3 

MPEG Audio Decoder 0.15.2 (beta) - Copyright (C) 2000-2004 Robert Leslie et al.

ALSA lib pcm_hw.c:1240:(_snd_pcm_hw_open) Invalid value for card

audio: No such file or directory

```

Anyone, any ideas?

----------

## swimmer

Perhaps you should try another pci-slot?

----------

## Wizumwalt

Yeah, tried several slots. Same results.

----------

## MaximeG

Hi,

Did it use to work with previous kernel version/different settings ?

And, why not trying to install the ebuild instead of the kernel version?

Regards,

Maxime

----------

## halzen

Im having the exact same problems with more or less the exact same hardware.

If you get it working let me know! (and if i get it working ill let you know)

h.

----------

## TKIII

I had about the same problem, I have an intel high definition audio card. Try running madplay or another music player as root, if the audio plays add your user to the audio group and restart. That fixed my problem of *Quote:*   

> ALSA lib pcm_hw.c:1240:(_snd_pcm_hw_open) Invalid value for card
> 
> audio: No such file or directory

 

----------

## DirtyHairy

If you can't manage to get ALSA working with this card, you can try to get it to work with OSS4. They have been supporting XFi cards for a while now. and it seems to work well.

----------

