# nvidia wrecks alsa?

## cerddwr

I originally posted this in Multimedia, but further experimenting suggests a kernel problem.

My system uses the M-Audio 2496 card with alsa compiled as a kernel module.  It was working perfectly until I did emerge -uD world.  Now it plays all sound files at very slow speed and correspondingly low pitch.  I mean _really_ slow, something like a quarter or less of the proper speed.  It is the same whether I use mplayer, mpg123, audacious, or play an open .wav or .mp3 file in audacity.

I can get something approaching the proper speed and pitch, but unsteady sound, if I do

```
 $ mpg123 -r 11025 file.mp3 
```

but setting a frequency ought not to be necessary.

There are no error messages on booting or when I try to play a file.

Part of the world upgrade involved moving from Kernel 2.6.18-r8 to 2.6.20-r4 (gentoo-sources, compiled manually). If I boot from my earlier 2.6.18-r8 kernel, the sound works properly.

I have now installed the 2.6.21-r4 gentoo-sources (~amd64) and compiled the kernel using the "make oldconfig" procedure.  On rebooting with the new kernel to a console, I ran alsaconf as root, then was able successfully to play a sound file (as user) with mpg123.  So far, so good!

To get X up and running again I then did the following:

```
# emerge nvidia-drivers

# update-modules

# /etc/init.d/xdm restart 
```

I then tried to play an mp3 file using audacious and got an error message that /dev/dsp could not be opened.  So I ran alsaconf again.  After that the problem was back: once again slow, low-frequency, unusable sound, whatever program I used to try to play the file.

Therefore installing the nvidia drivers has messed up the sound.  Any ideas as to how nvidia can mess up alsa?  For now I'm sticking with my 2.6.18 kernel!

----------

## PaulBredbury

 *cerddwr wrote:*   

> until I did emerge -uD world

 

Every newbie says this, and seems to think that by saying it we will instantly create a psychic connection and know exactly what occurred. Not true. Show what happened:

```
genlop -l
```

There's a ton of useful debugging info which you're not showing. Follow wiki for starters.

----------

## wyvern5

Try configuring 2.6.21 from scratch. Keep a log of the changes you make -- you may be surprised how few things you actually *need*. That's how I do it -- no possibility of kernel config issues when I go from 2.6.x to 2.6.x+1.

----------

## cerddwr

I never expected anyone to make a psychic connection, I merely thought that someone might have encountered the problem before.

Following the instructions in the wiki:

```
cat /proc/asound/cards

 0 [M2496          ]: ICE1712 - M Audio Audiophile 24/96

                      M Audio Audiophile 24/96 at 0xc880, irq 17
```

```
cat /etc/modules.d/alsa

# Alsa kernel modules' configuration file.

# ALSA portion

# OSS/Free portion

##

## IMPORTANT:

## You need to customise this section for your specific sound card(s)

## and then run `update-modules' command.

## Read alsa-driver's INSTALL file in /usr/share/doc for more info.

##

##  ALSA portion

## alias snd-card-0 snd-interwave

## alias snd-card-1 snd-ens1371

##  OSS/Free portion

## alias sound-slot-0 snd-card-0

## alias sound-slot-1 snd-card-1

##

# OSS/Free portion - card #1

##  OSS/Free portion - card #2

## alias sound-service-1-0 snd-mixer-oss

## alias sound-service-1-3 snd-pcm-oss

## alias sound-service-1-12 snd-pcm-oss

alias /dev/mixer snd-mixer-oss

alias /dev/dsp snd-pcm-oss

alias /dev/midi snd-seq-oss

# Set this to the correct number of cards.

# --- BEGIN: Generated by ALSACONF, do not edit. ---

# --- ALSACONF version 1.0.14rc2 ---

alias snd-card-0 snd-ice1712

alias sound-slot-0 snd-ice1712

# --- END: Generated by ALSACONF, do not edit. ---
```

```
grep SND /usr/src/linux/.config | grep "="

CONFIG_SND=m

CONFIG_SND_TIMER=m

CONFIG_SND_PCM=m

CONFIG_SND_RAWMIDI=m

CONFIG_SND_OSSEMUL=y

CONFIG_SND_MIXER_OSS=m

CONFIG_SND_PCM_OSS=m

CONFIG_SND_PCM_OSS_PLUGINS=y

CONFIG_SND_MPU401_UART=m

CONFIG_SND_AC97_CODEC=m

CONFIG_SND_ICE1712=m

grep SOUND /usr/src/linux/.config | grep "="

CONFIG_SOUND=m
```

```
uname -a

Linux linux 2.6.21-gentoo-r4 #1 Thu Jul 26 15:26:57 BST 2007 x86_64 AMD Athlon(tm) 64 Processor 3500+ AuthenticAMD GNU/Linux
```

```
ls -l /usr/src

total 20

lrwxrwxrwx  1 root root   23 2007-07-26 15:15 linux -> linux-2.6.21-gentoo-r4/

drwxr-xr-x 20 root root 4096 2007-06-07 14:29 linux-2.6.18-gentoo-r4

drwxr-xr-x 20 root root 4096 2007-07-24 12:12 linux-2.6.20-gentoo-r8

drwxr-xr-x 20 root root 4096 2007-07-26 15:27 linux-2.6.21-gentoo-r4

drwxr-xr-x  7 root root 4096 2007-03-29 14:44 rpm
```

```
emerge -pv alsa-driver

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild  N    ] media-sound/alsa-driver-1.0.14_rc2-r1  USE="midi oss -debug" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci -ad1816a -ad1848 -ad1848-lib -ad1889 -adlib -als100 -als300 (-aoa) (-aoa-fabric-layout) (-aoa-onyx) (-aoa-soundbus) (-aoa-soundbus-i2s) (-aoa-tas) (-aoa-toonie) (-armaaci) (-asihpi) (-at91-soc) (-at91-soc-eti-b1-wm8731) (-au1x00) -au8810 -au8820 -au8830 -azt2320 -azt3328 -cmi8330 -cs4231 -cs4231-lib -cs4232 -cs4236 -cs4281 -cs46xx (-cs5535audio) -darla20 -darla24 -dt019x -dummy -echo3g -emu10k1 -es1688 -es18xx -es968 -fm801-tea575x -gina20 -gina24 -gusclassic -gusextreme -gusmax (-harmony) -hdsp -hdspm -ice1712 -ice1724 -indigo -indigodj -indigoio -interwave -interwave-stb -korg1212 -layla20 -layla24 -loopback -mia -miro -mixart -mona -mpu401 -msnd-pinnacle -mtpav -mts64 -nm256 -opl3sa2 -opti92x-ad1848 -opti92x-cs4231 -opti93x -pc98-cs4232 -pcsp -pcxhr -pdaudiocf -pdplus -portman2x4 (-powermac) (-pxa2xx-i2sound) (-pxa2xx-soc) (-pxa2xx-soc-corgi) (-pxa2xx-soc-poodle) (-pxa2xx-soc-spitz) (-pxa2xx-soc-tosa) -riptide -rme32 -rme96 -rme9652 -s3c2410 -sa11xx-uda1341 -sb16 -sb8 -sbawe -seq-dummy -serial-u16550 -sgalaxy -soc -sonicvibes -sscape (-sun-amd7930) (-sun-cs4231) (-sun-dbri) -usb-usx2y -virmidi -vx222 -vxpocket -wavefront" 0 kB
```

For the following I have included only the 2.6.21 modules:

```
find /lib/modules/ -type f | xargs ls -l

-rw-r--r-- 1 root root    6509 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/arch/x86_64/kernel/cpuid.ko

-rw-r--r-- 1 root root    7254 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/arch/x86_64/kernel/msr.ko

-rw-r--r-- 1 root root   12985 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/acpi/button.ko

-rw-r--r-- 1 root root    8290 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/acpi/fan.ko

-rw-r--r-- 1 root root   41038 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/acpi/processor.ko

-rw-r--r-- 1 root root   21582 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/acpi/thermal.ko

-rw-r--r-- 1 root root   17785 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/char/agp/via-agp.ko

-rw-r--r-- 1 root root   19061 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/char/rtc.ko

-rw-r--r-- 1 root root    8128 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/cpufreq/cpufreq_stats.ko

-rw-r--r-- 1 root root    8052 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/cpufreq/cpufreq_userspace.ko

-rw-r--r-- 1 root root    6546 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/cpufreq/freq_table.ko

-rw-r--r-- 1 root root    5860 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/hwmon/hwmon.ko

-rw-r--r-- 1 root root    9497 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/i2c/busses/i2c-nforce2.ko

-rw-r--r-- 1 root root   29731 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/i2c/i2c-core.ko

-rw-r--r-- 1 root root  130902 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/ieee1394/ieee1394.ko

-rw-r--r-- 1 root root   45547 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/ieee1394/ohci1394.ko

-rw-r--r-- 1 root root   36884 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/ieee1394/raw1394.ko

-rw-r--r-- 1 root root   61354 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/input/mouse/psmouse.ko

-rw-r--r-- 1 root root    9688 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/input/mouse/sermouse.ko

-rw-r--r-- 1 root root   12364 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/mmc/mmc_block.ko

-rw-r--r-- 1 root root   34607 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/mmc/mmc_core.ko

-rw-r--r-- 1 root root   29350 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/mmc/wbsd.ko

-rw-r--r-- 1 root root   57289 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/net/forcedeth.ko

-rw-r--r-- 1 root root    8125 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/net/mii.ko

-rw-r--r-- 1 root root   14729 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/net/tun.ko

-rw-r--r-- 1 root root   10859 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/rtc/rtc-cmos.ko

-rw-r--r-- 1 root root   13268 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/rtc/rtc-core.ko

-rw-r--r-- 1 root root   10524 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/rtc/rtc-dev.ko

-rw-r--r-- 1 root root    5836 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/rtc/rtc-lib.ko

-rw-r--r-- 1 root root   19184 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/scsi/scsi_tgt.ko

-rw-r--r-- 1 root root   21874 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/scsi/sr_mod.ko

-rw-r--r-- 1 root root   29998 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/serial/8250.ko

-rw-r--r-- 1 root root   37275 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/serial/8250_pci.ko

-rw-r--r-- 1 root root   19442 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/serial/8250_pnp.ko

-rw-r--r-- 1 root root   26945 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/serial/serial_core.ko

-rw-r--r-- 1 root root   21261 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/usb/class/usblp.ko

-rw-r--r-- 1 root root  186373 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/usb/core/usbcore.ko

-rw-r--r-- 1 root root   39900 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/usb/host/ehci-hcd.ko

-rw-r--r-- 1 root root   27037 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/usb/host/ohci-hcd.ko

-rw-r--r-- 1 root root   22791 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/usb/input/usbhid.ko

-rw-r--r-- 1 root root   34347 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/usb/storage/libusual.ko

-rw-r--r-- 1 root root   47253 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/drivers/usb/storage/usb-storage.ko

-rw-r--r-- 1 root root   15739 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/fs/binfmt_misc.ko

-rw-r--r-- 1 root root  329313 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/fs/cifs/cifs.ko

-rw-r--r-- 1 root root    8519 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/fs/exportfs/exportfs.ko

-rw-r--r-- 1 root root   70379 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/fs/fat/fat.ko

-rw-r--r-- 1 root root  100192 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/fs/lockd/lockd.ko

-rw-r--r-- 1 root root   13605 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/fs/msdos/msdos.ko

-rw-r--r-- 1 root root  142168 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/fs/nfsd/nfsd.ko

-rw-r--r-- 1 root root  178204 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/fs/nfs/nfs.ko

-rw-r--r-- 1 root root    7554 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/fs/nls/nls_ascii.ko

-rw-r--r-- 1 root root    8196 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/fs/nls/nls_iso8859-15.ko

-rw-r--r-- 1 root root    7570 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/fs/nls/nls_iso8859-1.ko

-rw-r--r-- 1 root root    4270 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/fs/nls/nls_utf8.ko

-rw-r--r-- 1 root root  136842 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/fs/ntfs/ntfs.ko

-rw-r--r-- 1 root root  276286 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/fs/reiserfs/reiserfs.ko

-rw-r--r-- 1 root root   88372 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/fs/smbfs/smbfs.ko

-rw-r--r-- 1 root root   16740 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/fs/vfat/vfat.ko

-rw-r--r-- 1 root root    3975 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/net/802/p8022.ko

-rw-r--r-- 1 root root    6725 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/net/802/psnap.ko

-rw-r--r-- 1 root root   63666 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/net/bridge/bridge.ko

-rw-r--r-- 1 root root   15796 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/net/ipv4/inet_diag.ko

-rw-r--r-- 1 root root    3862 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/net/ipv4/tcp_diag.ko

-rw-r--r-- 1 root root    7041 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/net/ipv4/tunnel4.ko

-rw-r--r-- 1 root root    5462 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/net/ipv4/xfrm4_mode_beet.ko

-rw-r--r-- 1 root root    4663 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/net/ipv4/xfrm4_mode_transport.ko

-rw-r--r-- 1 root root    5456 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/net/ipv4/xfrm4_mode_tunnel.ko

-rw-r--r-- 1 root root  358673 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/net/ipv6/ipv6.ko

-rw-r--r-- 1 root root   14788 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/net/ipv6/sit.ko

-rw-r--r-- 1 root root    5194 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/net/ipv6/xfrm6_mode_beet.ko

-rw-r--r-- 1 root root    4791 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/net/ipv6/xfrm6_mode_transport.ko

-rw-r--r-- 1 root root    5469 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/net/ipv6/xfrm6_mode_tunnel.ko

-rw-r--r-- 1 root root   45785 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/net/key/af_key.ko

-rw-r--r-- 1 root root   11468 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/net/llc/llc.ko

-rw-r--r-- 1 root root   22009 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/net/packet/af_packet.ko

-rw-r--r-- 1 root root  216213 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/net/sunrpc/sunrpc.ko

-rw-r--r-- 1 root root    7855 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/security/capability.ko

-rw-r--r-- 1 root root    9170 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/security/commoncap.ko

-rw-r--r-- 1 root root    4955 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/sound/ac97_bus.ko

-rw-r--r-- 1 root root   25139 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/sound/core/oss/snd-mixer-oss.ko

-rw-r--r-- 1 root root   56858 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/sound/core/oss/snd-pcm-oss.ko

-rw-r--r-- 1 root root   80333 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/sound/core/snd.ko

-rw-r--r-- 1 root root   14344 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/sound/core/snd-page-alloc.ko

-rw-r--r-- 1 root root   95281 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/sound/core/snd-pcm.ko

-rw-r--r-- 1 root root   31549 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/sound/core/snd-rawmidi.ko

-rw-r--r-- 1 root root   31550 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/sound/core/snd-timer.ko

-rw-r--r-- 1 root root   11142 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/sound/drivers/mpu401/snd-mpu401-uart.ko

-rw-r--r-- 1 root root   13124 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/sound/i2c/other/snd-ak4xxx-adda.ko

-rw-r--r-- 1 root root   13337 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/sound/i2c/snd-cs8427.ko

-rw-r--r-- 1 root root    8462 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/sound/i2c/snd-i2c.ko

-rw-r--r-- 1 root root  187803 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/sound/pci/ac97/snd-ac97-codec.ko

-rw-r--r-- 1 root root   91819 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/sound/pci/ice1712/snd-ice1712.ko

-rw-r--r-- 1 root root    6345 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/sound/pci/ice1712/snd-ice17xx-ak4xxx.ko

-rw-r--r-- 1 root root   11575 2007-07-26 15:27 /lib/modules/2.6.21-gentoo-r4/kernel/sound/soundcore.ko

-rw-r--r-- 1 root root   29252 2007-07-26 17:34 /lib/modules/2.6.21-gentoo-r4/modules.alias

-rw-r--r-- 1 root root      69 2007-07-26 17:34 /lib/modules/2.6.21-gentoo-r4/modules.ccwmap

-rw-r--r-- 1 root root   11330 2007-07-26 17:34 /lib/modules/2.6.21-gentoo-r4/modules.dep

-rw-r--r-- 1 root root     369 2007-07-26 17:34 /lib/modules/2.6.21-gentoo-r4/modules.ieee1394map

-rw-r--r-- 1 root root     141 2007-07-26 17:34 /lib/modules/2.6.21-gentoo-r4/modules.inputmap

-rw-r--r-- 1 root root   11785 2007-07-26 17:34 /lib/modules/2.6.21-gentoo-r4/modules.isapnpmap

-rw-r--r-- 1 root root      74 2007-07-26 17:34 /lib/modules/2.6.21-gentoo-r4/modules.ofmap

-rw-r--r-- 1 root root   19573 2007-07-26 17:34 /lib/modules/2.6.21-gentoo-r4/modules.pcimap

-rw-r--r-- 1 root root     253 2007-07-26 17:34 /lib/modules/2.6.21-gentoo-r4/modules.seriomap

-rw-r--r-- 1 root root   28754 2007-07-26 17:34 /lib/modules/2.6.21-gentoo-r4/modules.symbols

-rw-r--r-- 1 root root   31864 2007-07-26 17:34 /lib/modules/2.6.21-gentoo-r4/modules.usbmap

-rw-r--r-- 1 root root 7407555 2007-07-26 17:31 /lib/modules/2.6.21-gentoo-r4/video/nvidia.ko
```

```
genlop -l | tail

     Sun Jul 22 17:56:34 2007 >>> media-sound/alsa-headers-1.0.14_rc2

     Sun Jul 22 17:58:24 2007 >>> media-libs/alsa-lib-1.0.14_rc2

     Sun Jul 22 17:59:03 2007 >>> media-sound/alsa-utils-1.0.14_rc2-r3

     Thu Jul 26 15:14:59 2007 >>> sys-kernel/gentoo-sources-2.6.21-r4

     Thu Jul 26 17:32:21 2007 >>> x11-drivers/nvidia-drivers-1.0.8776-r1

     Thu Jul 26 18:54:38 2007 >>> www-client/mozilla-launcher-1.56

     Thu Jul 26 18:55:24 2007 >>> dev-libs/nspr-4.6.5-r1

     Thu Jul 26 18:57:46 2007 >>> dev-libs/nss-3.11.5

     Thu Jul 26 19:36:02 2007 >>> mail-client/mozilla-thunderbird-2.0.0.4

     Thu Jul 26 19:39:36 2007 >>> x11-plugins/enigmail-0.95.0

     Fri Jul 27 09:57:44 2007 >>> app-portage/genlop-0.30.7
```

I hope this is enough from genlop as the output is enormous.

----------

## Akkara

Perhaps something in X is playing sounds at 11KHz causing the card to set to that rate.

Try envy24control (might need to emerge alsa-tools).  Click on Hardware Settings and check what Actual Rate reports as the sampling rate.  If it is not what's needed (typically 44.1 or 48 KHz) you can try changing it by pressing the appropriate radio button.  If it doesn't change it means something's holding the card open and need to find out what.

----------

## cerddwr

Thank you Akkara, for that helpful tip.  envy24control reported a frequency of 8000.  Unticking the "locked" box and clicking on the 44100 radio button restored the sound to normal.  However the problem comes back after rebooting, so I shall have to look more deeply into why this is occurring.  Clearly, something is being overwritten at boot-up.

So, partly solved.

----------

## crumbs516

I have the same slow sound problem. It takes several seconds to play a single second of a sound file.  I have observed in Audacious and totem movie player using different file formats. 

I followed the wiki when nothing else worked http://gentoo-wiki.com/HOWTO_Compile_Kernel_with_ALSA. I've also read posts 571828 and 572525. Changing 

```
defaults.pcm.dmx.rate 44100
```

 from 48000 in /usr/share/alsa/alsa.conf didn't solve the problem.

Ideas are appreciated after reviewing the relevant information attached below.

uname -a

```
Linux batcave 2.6.22-gentoo-r5 #7 SMP Fri Sep 14 00:22:43 CDT 2007 x86_64 AMD Athlon(tm) 64 Processor 3200+ AuthenticAMD GNU/Linux
```

relevant grub entry

```
title=Gentoo Linux 2.6.22-r5

kernel-2.6.22-gentoo-r5

root (hd1,2)

kernel /boot/kernel-2.6.22-gentoo-r5 root=/dev/sda3 doscsi video=vesafb:ypan,1280x1024-16@75

```

grep SND /usr/src/linux/.config | grep "="

```

CONFIG_SND=m

CONFIG_SND_TIMER=m

CONFIG_SND_PCM=m

CONFIG_SND_RAWMIDI=m

CONFIG_SND_SEQUENCER=m

CONFIG_SND_OSSEMUL=y

CONFIG_SND_MIXER_OSS=m

CONFIG_SND_PCM_OSS=m

CONFIG_SND_PCM_OSS_PLUGINS=y

CONFIG_SND_SEQUENCER_OSS=y

CONFIG_SND_RTCTIMER=m

CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y

CONFIG_SND_SUPPORT_OLD_API=y

CONFIG_SND_MPU401_UART=m

CONFIG_SND_AC97_CODEC=m

CONFIG_SND_ICE1712=m

CONFIG_SND_ICE1724=m

CONFIG_SND_INTEL8X0=m

CONFIG_SND_INTEL8X0M=m

CONFIG_SND_AC97_POWER_SAVE=y

```

grep SOUND /usr/src/linux/.config | grep "="

```
CONFIG_SOUND=m
```

alsa-driver is masked in package.mask

cat /etc/modules.d/alsa

```

# Alsa kernel modules' configuration file w/o comments

alias /dev/mixer snd-mixer-oss

alias /dev/dsp snd-pcm-oss

alias /dev/midi snd-seq-oss

alias char-major-14 soundcore

alias /dev/dsp1 snd-pcm-oss

alias char-major-116 snd

alias snd-card-0 snd-ice1712

alias sound-slot-0 snd-ice1712

alias sound-service-0-0 snd-mixer-oss

alias sound-service-0-1 snd-seq-oss

alias sound-service-0-3 snd-pcm-oss

alias sound-service-0-8 snd-seq-oss

alias sound-service-0-12 snd-pcm-oss

options snd cards_limit=1

```

 cat /proc/asound/cards

```

 0 [M2496          ]: ICE1712 - M Audio Audiophile 24/96

                      M Audio Audiophile 24/96 at 0x8000, irq 17

 1 [CK8S           ]: NFORCE - NVidia CK8S

                      NVidia CK8S with ALC850 at irq 21

```

cat /proc/interrupts

```

           CPU0       

  0:     343633   IO-APIC-edge      timer

  1:          2   IO-APIC-edge      i8042

  6:          5   IO-APIC-edge      floppy

  9:          0   IO-APIC-fasteoi   acpi

 12:          4   IO-APIC-edge      i8042

 14:      12151   IO-APIC-edge      ide0

 15:         48   IO-APIC-edge      ide1

 17:       1310   IO-APIC-fasteoi   ICE1712

 20:          5   IO-APIC-fasteoi   ehci_hcd:usb1

 21:          0   IO-APIC-fasteoi   sata_nv, NVidia CK8S

 22:      18083   IO-APIC-fasteoi   sata_nv, ohci_hcd:usb3

 23:     136719   IO-APIC-fasteoi   ohci_hcd:usb2, eth1

NMI:          0 

LOC:     343618 

ERR:          0

```

amixer

```

Simple mixer control 'IEC958',0

  Capabilities: enum

  Items: 'PCM Out' 'H/W In 0' 'H/W In 1' 'H/W In 2' 'H/W In 3' 'H/W In 4' 'H/W In 5' 'H/W In 6' 'H/W In 7' 'IEC958 In L' 'IEC958 In R' 'Digital Mixer'

  Item0: 'PCM Out'

Simple mixer control 'IEC958 Multi',0

  Capabilities: cvolume cswitch

  Capture channels: Front Left - Front Right

  Limits: Capture 0 - 96

  Front Left: Capture 0 [0%] [off]

  Front Right: Capture 0 [0%] [off]

Simple mixer control 'IEC958 Multi',1

  Capabilities: cvolume cswitch

  Capture channels: Front Left - Front Right

  Limits: Capture 0 - 96

  Front Left: Capture 0 [0%] [off]

  Front Right: Capture 0 [0%] [off]

Simple mixer control 'IEC958',1

  Capabilities: enum

  Items: 'PCM Out' 'H/W In 0' 'H/W In 1' 'H/W In 2' 'H/W In 3' 'H/W In 4' 'H/W In 5' 'H/W In 6' 'H/W In 7' 'IEC958 In L' 'IEC958 In R' 'Digital Mixer'

  Item0: 'PCM Out'

Simple mixer control 'ADC',0

  Capabilities: volume volume-joined

  Playback channels: Mono

  Capture channels: Mono

  Limits: 0 - 163

  Mono: 103 [63%] [-12.00dB]

Simple mixer control 'ADC',1

  Capabilities: volume volume-joined

  Playback channels: Mono

  Capture channels: Mono

  Limits: 0 - 163

  Mono: 103 [63%] [-12.00dB]

Simple mixer control 'DAC',0

  Capabilities: volume volume-joined

  Playback channels: Mono

  Capture channels: Mono

  Limits: 0 - 127

  Mono: 103 [81%] [-12.00dB]

Simple mixer control 'DAC',1

  Capabilities: volume volume-joined

  Playback channels: Mono

  Capture channels: Mono

  Limits: 0 - 127

  Mono: 103 [81%] [-12.00dB]

Simple mixer control 'Deemphasis',0

  Capabilities: enum

  Items: '44.1kHz' 'Off' '48kHz' '32kHz'

  Item0: '44.1kHz'

Simple mixer control 'H/W',0

  Capabilities: enum

  Items: 'PCM Out' 'H/W In 0' 'H/W In 1' 'H/W In 2' 'H/W In 3' 'H/W In 4' 'H/W In 5' 'H/W In 6' 'H/W In 7' 'IEC958 In L' 'IEC958 In R' 'Digital Mixer'

  Item0: 'PCM Out'

Simple mixer control 'H/W',1

  Capabilities: enum

  Items: 'PCM Out' 'H/W In 0' 'H/W In 1' 'H/W In 2' 'H/W In 3' 'H/W In 4' 'H/W In 5' 'H/W In 6' 'H/W In 7' 'IEC958 In L' 'IEC958 In R' 'Digital Mixer'

  Item0: 'PCM Out'

Simple mixer control 'H/W Multi',0

  Capabilities: cvolume cswitch

  Capture channels: Front Left - Front Right

  Limits: Capture 0 - 96

  Front Left: Capture 0 [0%] [-144.00dB] [off]

  Front Right: Capture 0 [0%] [-144.00dB] [off]

Simple mixer control 'H/W Multi',1

  Capabilities: cvolume cswitch

  Capture channels: Front Left - Front Right

  Limits: Capture 0 - 96

  Front Left: Capture 0 [0%] [-144.00dB] [off]

  Front Right: Capture 0 [0%] [-144.00dB] [off]

Simple mixer control 'Multi',0

  Capabilities: pvolume pswitch

  Playback channels: Front Left - Front Right

  Limits: Playback 0 - 96

  Mono:

  Front Left: Playback 0 [0%] [-144.00dB] [off]

  Front Right: Playback 0 [0%] [-144.00dB] [off]

Simple mixer control 'Multi',1

  Capabilities: pvolume pswitch

  Playback channels: Front Left - Front Right

  Limits: Playback 0 - 96

  Mono:

  Front Left: Playback 0 [0%] [-144.00dB] [off]

  Front Right: Playback 0 [0%] [-144.00dB] [off]

Simple mixer control 'Multi',2

  Capabilities: pvolume pswitch

  Playback channels: Front Left - Front Right

  Limits: Playback 0 - 96

  Mono:

  Front Left: Playback 0 [0%] [-144.00dB] [off]

  Front Right: Playback 0 [0%] [-144.00dB] [off]

Simple mixer control 'Multi',3

  Capabilities: pvolume pswitch

  Playback channels: Front Left - Front Right

  Limits: Playback 0 - 96

  Mono:

  Front Left: Playback 0 [0%] [-144.00dB] [off]

  Front Right: Playback 0 [0%] [-144.00dB] [off]

Simple mixer control 'Multi',4

  Capabilities: pvolume pswitch

  Playback channels: Front Left - Front Right

  Limits: Playback 0 - 96

  Mono:

  Front Left: Playback 0 [0%] [-144.00dB] [off]

  Front Right: Playback 0 [0%] [-144.00dB] [off]

Simple mixer control 'Multi',5

  Capabilities: pvolume pswitch

  Playback channels: Front Left - Front Right

  Limits: Playback 0 - 96

  Mono:

  Front Left: Playback 0 [0%] [-144.00dB] [off]

  Front Right: Playback 0 [0%] [-144.00dB] [off]

Simple mixer control 'Multi',6

  Capabilities: pvolume pswitch

  Playback channels: Front Left - Front Right

  Limits: Playback 0 - 96

  Mono:

  Front Left: Playback 0 [0%] [-144.00dB] [off]

  Front Right: Playback 0 [0%] [-144.00dB] [off]

Simple mixer control 'Multi',7

  Capabilities: pvolume pswitch

  Playback channels: Front Left - Front Right

  Limits: Playback 0 - 96

  Mono:

  Front Left: Playback 0 [0%] [-144.00dB] [off]

  Front Right: Playback 0 [0%] [-144.00dB] [off]

Simple mixer control 'Multi',8

  Capabilities: pvolume pswitch

  Playback channels: Front Left - Front Right

  Limits: Playback 0 - 96

  Mono:

  Front Left: Playback 0 [0%] [-144.00dB] [on]

  Front Right: Playback 0 [0%] [-144.00dB] [on]

Simple mixer control 'Multi',9

  Capabilities: pvolume pswitch

  Playback channels: Front Left - Front Right

  Limits: Playback 0 - 96

  Mono:

  Front Left: Playback 0 [0%] [-144.00dB] [on]

  Front Right: Playback 0 [0%] [-144.00dB] [on]

Simple mixer control 'Multi Track Internal Clock',0

  Capabilities: enum

  Items: '8000' '9600' '11025' '12000' '16000' '22050' '24000' '32000' '44100' '48000' '64000' '88200' '96000' 'IEC958 Input'

  Item0: '8000'

Simple mixer control 'Multi Track Internal Clock Default',0

  Capabilities: enum

  Items: '8000' '9600' '11025' '12000' '16000' '22050' '24000' '32000' '44100' '48000' '64000' '88200' '96000'

  Item0: '8000'

Simple mixer control 'Multi Track Peak',0

  Capabilities: volume

  Playback channels: Front Left - Front Right - Rear Left - Rear Right - Front Center - Woofer - Side Left - Side Right - Rear Center - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ?

  Capture channels: Front Left - Front Right - Rear Left - Rear Right - Front Center - Woofer - Side Left - Side Right - Rear Center - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ?

  Limits: 0 - 255

  Front Left: 0 [0%]

  Front Right: 0 [0%]

  Rear Left: 0 [0%]

  Rear Right: 0 [0%]

  Front Center: 0 [0%]

  Woofer: 0 [0%]

  Side Left: 0 [0%]

  Side Right: 0 [0%]

  Rear Center: 0 [0%]

  ?: 0 [0%]

  ?: 0 [0%]

  ?: 0 [0%]

  ?: 0 [0%]

  ?: 0 [0%]

  ?: 0 [0%]

  ?: 0 [0%]

  ?: 0 [0%]

  ?: 0 [0%]

  ?: 0 [0%]

  ?: 0 [0%]

  ?: 0 [0%]

  ?: 0 [0%]

Simple mixer control 'Multi Track Rate Locking',0

  Capabilities: pswitch pswitch-joined

  Playback channels: Mono

  Mono: Playback [on]

Simple mixer control 'Multi Track Rate Reset',0

  Capabilities: pswitch pswitch-joined

  Playback channels: Mono

  Mono: Playback [on]

Simple mixer control 'Multi Track Volume Rate',0

  Capabilities: volume volume-joined

  Playback channels: Mono

  Capture channels: Mono

  Limits: 0 - 255

  Mono: 0 [0%]

```

----------

## crumbs516

I wasn't able to fix the problem using other methods so I used the suggestion to downgrade the kernel verison to at least 2.6.18. Here's a quick code version of what I did that worked. The code below assumes that you already followed the gentoo ALSA guide and set up sound configuration files.

```

# get an old enough kernel

emerge "<=sys-kernel/gentoo-sources-2.6.19-r1"

# prepare the new kernel

cd /usr/src/

rm /usr/src/linux

ln -s linux-2.6.16-gentoo-r13 linux

cd /usr/src/linux

make clean; make menuconfig

# copy the new config files

cp /usr/src/linux/.config /boot/config-linux-2.6.16-gentoo-r13

cp /usr/src/linux/.config /mnt/backup/kernel_files/config-linux-2.6.16-gentoo-r13

# prepare a new modules file

# copy an old modules file

cp /etc/modules.autoload.d/kernel-2.6.19-gentoo-r5 /etc/modules.autoload.d/kernel-2.6.16-gentoo-r13

# remove all the modules and change the header kernel name

vi /etc/modules.autoload.d/kernel-2.6.16-gentoo-r13

# compile the new kernel and backup it up/move to bootable space

make && make modules_install;

cp /usr/src/linux/arch/x86_64/boot/bzImage /boot/kernel-2.6.16-gentoo-r13;

cp /boot/kernel-2.6.16-gentoo-r13 /mnt/backup/kernel_files/;

# update modules

find /lib/modules/2.6.16-gentoo-r13/ -type f -iname '*.o' -or -iname '*.ko'  | sed 's/\//\n/g' | grep '\.' | grep 'o$' | sed 's/\.ko$//' | sed 's/\.o$//' >> /etc/modules.autoload.d/kernel-2.6.16-gentoo-r13

update-modules;

depmod -a;

# update grub and reboot to test

vi /boot/grub/grub.conf

grub-install /dev/hdc

shutdown -r now

```

----------

## crumbs516

Previously I had downgraded the kernel. That worked fine until HAL required a newer kernel, so I decided to try to fix the audio again. I can get audio to play in mpg123 just fine but then the slow problem comes back after boot. I'd really appreciate some suggestions for how to get the audio to stop breaking on reboot. I've tried to be as complete as possible where I deviated from the ALSA howto wiki entry.

What I did to get the MAudio Audiophile 2496 Card to "Mostly" Work:

updated kernel to 2.6.23-gentoo-r6

setup ALSA by following http://gentoo-wiki.com/HOWTO_ALSA_Complete_%28includes_dmix%29

```
rm /etc/asound.state

rm /var/lib/alsa/asound.state

vi /usr/share/alsa/alsa.conf 

    #  change "defaults.pcm.dmx.rate 48000" to "defaults.pcm.dmx.rate 44100"

/etc/init.d/alsasound restart

mpg123 song.mp3;   # works

aplay -d plug:dmix sound.wav;   # works

madplay -v sound.mp3;   # Error: audio: esd_open_sound() failed

audacious;   # no play. error posted elsewhere as continuation of another post

```

What has to be done each time I boot to remove slow sound. I'd really appreciate suggestions on how to fix this problem. I got this idea from the note on the ALSA wiki about "No Sound, Mixers Adjusted: When switching between built-in ALSA, kernel modules, and alsa-driver..."

```

/etc/init.d/alsasound stop

rm /var/lib/alsa/asound.state 

/etc/init.d/alsasound restart

alsamixer;  # set ADC,ADC1 channels to 50%

mpg123 sound.mp3; # works

```

When I rerun alsamixer the DAC channels are set at 65 even though when I first run alsamixer to fix the sound problem I leave them at zero. What is changing them and also destroying the sound sampling?

Below are potentially relevant files

/etc/asound.conf

```

pcm.!default {

   type hw

   card 0

   }

ctl.!default {

   type hw

   card 0

   }

```

/etc/conf.d/alsasound

```

ENABLE_OSS_EMUL="yes"

RESTORE_ON_START="yes"

SAVE_ON_STOP="yes"

```

~/.asoundrc

```

pcm.intel8x0 {

    type hw

    card 1

}

ctl.intel8x0 {

    type hw

    card 1

}

#pcm.ice1712 {

#   type hw

#   card 0

#   }

#ctl.ice1712 {

#   type hw

#   card 0

#   }

# bindings are cool. This says, that only the first

# two channels are to be used by dmix, which is enough for

# (most) oss apps and also lets multichannel chios work

# much faster:

bindings {

        0 0   # from 0 => to 0

        1 1   # from 1 => to 1

}

# our ICE1712 dmix:

pcm.ossmix {

    type dmix

    ipc_key 1024

    slave {

        pcm "hw:0,0"

        period_time 0

        period_size 1024

        buffer_size 4096        # buffer size < 6653, but pow(x, 2)

#        rate 44100              # we want to play CDs only

    }

    bindings {

        0 0

                1 1

        }

}

# Everything shall be dmixed, so redefine "default":

pcm.!default {

    type plug

    slave.pcm "ossmix"

}

# OSS via aoss should d(mix)stroyed:

pcm.dsp0 {

    type plug

    slave.pcm "ossmix"

}

ctl.mixer0 {

    type hw

    card 0

}

## softvolume per forum post 433310: ALSA trouble: Audiophile 2496 / ICE1712 (Envy24) 

pcm.softvol {

        type softvol

        slave {

           pcm "plughw:0,0"

           }

        control {

           name PCM

           card 0

           }

} 

```

----------

## Jaglover

 *Quote:*   

> until I did emerge -uD world

 

People who do not run dispatch-conf (or etc-conf) after that will encounter some trouble.

----------

## PaulBredbury

 *crumbs516 wrote:*   

> alsamixer;  # set ADC,ADC1 channels to 50%

 

That can be done by running amixer.

```
man amixer

amixer set ...
```

----------

## crumbs516

Yes, it may be true that amixer can perform similar functions to alsamixer. But the alsamixer step isn't necessarily part of the problem.

The problem is that every time I reboot some setting is changed and ALSA plays sound at the wrong sample rate. Reseting the alsa state and unmuting sound with alsamixer removes the problem, but it is annoying to have to log in as root at console to fix the sound.

----------

## red-wolf76

```
Simple mixer control 'Multi Track Internal Clock',0

  Capabilities: enum

  Items: '8000' '9600' '11025' '12000' '16000' '22050' '24000' '32000' '44100' '48000' '64000' '88200' '96000' 'IEC958 Input'

  Item0: '8000'

Simple mixer control 'Multi Track Internal Clock Default',0

  Capabilities: enum

  Items: '8000' '9600' '11025' '12000' '16000' '22050' '24000' '32000' '44100' '48000' '64000' '88200' '96000'

  Item0: '8000' 
```

Try setting "Item0" to 44100.

----------

