Ogrim.no

Programing, Hacking, and the likes

E-MU 1820 in Debian

| Comments

As I recently installed Debian on my main workstation, I wanted to make my beloved E-MU 1820 sound card work. The audio quality is much better than the integrated sound card on the motherboard, probably because of better digital-analog converters and more power to drive my headphones. The sound card did not work out of the box, so I had to start poking for data. We can get useful hardware information using lspci.

1
lspci -nn

This gave a lot of output, so I used grep to find my sound card.

1
lspci -nn | grep Creative

gave the following:

1
01:09.0 Multimedia audio controller [0401]: Creative Labs SB Audigy [1102:0004] (rev 03)

Notice the 1102:0004, which is the PCI id. Next I looked it up in Debians device database: http://wiki.debian.org/DeviceDatabase/PCI Strangely it did not match completely, closest find in the database was 1102:7004. The output led me to search for debian 1102:0004, which gave just what I needed: a handy guide to compile and install the driver from scratch. Follow the guide and be on your way: http://wiki.debian.org/snd-emu10k1 When using sudo, I have to qualify modprobe to /sbin/modprobe. If you are elevated by su, you can call modprobe directly.

Upon completing the guide, I restarted my system and was able to get the sound working by poking around in the Alsa mixer. I had to select the correct hardware and output settings. To change the default card we can modify the alsa.conf or alsa-base.conf (depending on what you have present) in /etc/modprobe.d/

List your sound cards with:

1
cat /proc/asound/modules

Append alsa.conf or alsa-base.conf with:

1
options snd_emu10k1=0

After rebooting the system, the clock rate had reset from 44.1Khz to 48Khz. This made the sound distorted. To fix it, set the clock rate with the following command:

1
amixer -c 1 set 'Clock Internal Rate' 44100

Notice that -c 1 corresponds to the sound card from /proc/asound/modules. Just add this command to /etc/rc.local to run it upon login. You must add the command before the exit 0, as that must be the last command in the file. This will ensure that the clock rate is set to 44.1Khz every time you log in.

Lastly, I want to mention a useful tool for poking around with the routing matrix: emutrix. In the end, I did not need this tool to playback audio. However, if you are doing recording, it seems very useful to work out the routing. There are detailed installation instructions here: http://code.google.com/p/emutrix/wiki/InstallGuide Just make sure you check it out from the svn-repo, as the releases does not support multiple sound cards (which every motherboard has this these days (increasingly on graphics card too, through HDMI)).

Update 31th August

Using emutrix, I poked around a bit to fix output to my loudspeakers. Only headphones was working previously. Thanks to emutrix, it was very fast and simple to determine the routing, before writing the commands. I now have this in my rc.local as well:

1
2
3
4
5
6
7
8
amixer -c 1 sset 'Dock DAC1 Left' 'DSP 0'
amixer -c 1 sset 'Dock DAC1 Right' 'DSP 1'
amixer -c 1 sset 'Dock DAC2 Left' 'DSP 0'
amixer -c 1 sset 'Dock DAC2 Right' 'DSP 1'
amixer -c 1 sset 'Dock DAC3 Left' 'DSP 0'
amixer -c 1 sset 'Dock DAC3 Right' 'DSP 1'
amixer -c 1 sset 'Dock DAC4 Left' 'DSP 0'
amixer -c 1 sset 'Dock DAC4 Right' 'DSP 1'

Comments