Linux sound drivers for the ThinkPad 390E

This is an addendum to my ThinkPad 390E page. It adds some details on getting the ESS Solo 1 sound card to work.

Three options | ALSA details | Opensound details

Three options

As of kernel version 2.2.16 Linux kernel package offers "experimental" support for the ESS Solo 1. The options at this point seem to be

  1. Use the native support in a new kernel. Choose modular support for the Solo at kernel config time. Hamlet Batista gave me these lines for /etc/conf.modules, which seem to work pretty well:
    alias char-major-14 soundcore
    alias sound-slot-0 esssolo1.o                     #sound card
    alias sound-service-0-0 esssolo1.o                #/dev/mixer
    alias sound-service-0-1 esssolo1.o                #/dev/sequencer
    alias sound-service-0-3 esssolo1.o                #/dev/dsp
    alias sound-service-1-3esssolo1.o                 #/dev/dsp1 (if relevant)
    
  2. Use the ALSA drivers (details below).
  3. If full "out of the box" support for sound is an immediate priority, use the commercial "Opensound" drivers, at $30 (details below).

ALSA details

The 0.5.10 release of ALSA works very well on the ThinkPad, if you have a new enough BIOS. My ThinkPad came with version R00_H1 of the BIOS and ALSA sound did not work very well. Following a tip from Adam Spiers I updated the BIOS to version R01_A3, using the diskette image provided by IBM, spsdila3.exe (check at their ThinkPad 390E page), and now it all works nicely.

Compiling and installing

I downloaded the source for the ALSA suite from their website at www.alsa-project.org. Note that the current ALSA material is designed for 2.2 series kernels; 2.0 is not supported (I actually run linux 2.4.1). I have the source code in various subdirectories of /usr/src/alsa. I compiled and installed thus:

cd /usr/src/alsa
cd alsa-driver-0.5.10
./configure --with-sequencer=yes --with-oss=yes --with-cards=es1938
make ; make install
./snddevices
cd ../alsa-lib-0.5.10
./configure  --disable-static
make ; make install
cd ../alsa-utils-0.5.10
./configure
make ; make install

modules.conf

The loading of the alsa modules is controlled by the Linux module config file. On my system this is /etc/modules.conf, and the relevant section reads as follows:
# ALSA native device support
post-install snd-card-es1938 /usr/sbin/alsactl restore
alias char-major-116 snd
options snd snd_major=116 snd_cards_limit=1
alias snd-card-0 snd-card-es1938
# OSS/Lite setup
alias char-major-14 soundcore
alias sound-slot-0 snd-card-0
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-12 snd-pcm-oss

asound.conf

The program alsactl reads /etc/asound.conf on startup. My file reads like this:
# ALSA driver configuration
# This configuration is generated with the alsactl program.

soundcard("card1") {
  mixer("ESS Solo-1") {
    element("Master Switch",0,100,Switch1(on,on))
    ; Voice 0 : Min 0 Max 63
    ; Voice 1 : Min 0 Max 63
    element("Master Volume",0,200,Volume1(62,63))
    ; Voice 0 : Min 0 Max 15
    ; Voice 1 : Min 0 Max 15
    element("Aux Input Volume",0,200,Volume1(15,15))
    ; Voice 0 : Min 0 Max 15
    ; Voice 1 : Min 0 Max 15
    element("CD Input Volume",0,200,Volume1(15,15))
    ; Voice 0 : Min 0 Max 15
    ; Voice 1 : Min 0 Max 15
    element("MONO Input Volume",0,200,Volume1(15,15))
    ; Voice 0 : Min 0 Max 15
    ; Voice 1 : Min 0 Max 15
    element("FM Input Volume",0,200,Volume1(15,15))
    ; Voice 0 : Min 0 Max 15
    ; Voice 1 : Min 0 Max 15
    element("Line Input Volume",0,200,Volume1(0,0))
    ; Voice 0 : Min 0 Max 15
    ; Voice 1 : Min 0 Max 15
    element("MIC Input Volume",0,200,Volume1(0,0))
    ; Voice 0 : Min 0 Max 15
    ; Voice 1 : Min 0 Max 15
    element("PCM1 Input Volume",0,200,Volume1(15,15))
    ; Voice 0 : Min 0 Max 15
    ; Voice 1 : Min 0 Max 15
    element("Aux Volume",0,200,Volume1(15,15))
    ; Voice 0 : Min 0 Max 15
    ; Voice 1 : Min 0 Max 15
    element("CD Volume",0,200,Volume1(15,15))
    ; Voice 0 : Min 0 Max 15
    ; Voice 1 : Min 0 Max 15
    element("MONO Volume",0,200,Volume1(15,15))
    ; Voice 0 : Min 0 Max 15
    ; Voice 1 : Min 0 Max 15
    element("FM Volume",0,200,Volume1(15,15))
    ; Voice 0 : Min 0 Max 15
    ; Voice 1 : Min 0 Max 15
    element("Line Volume",0,200,Volume1(0,0))
    ; Voice 0 : Min 0 Max 15
    ; Voice 1 : Min 0 Max 15
    element("MIC Volume",0,200,Volume1(0,0))
    ; Voice 0 : Min 0 Max 15
    ; Voice 1 : Min 0 Max 15
    element("PCM1 Volume",0,200,Volume1(15,15))
    ; The 3D effect has an on/off switch.
    ; Space : Min 0 Max 63
    element("3D Effect",0,600,_3D_Effect1(sw=off,space=0))
    element("Record Monitor",0,401,Mux2(element("3D Effect",0,600)))
    ; Voice 0 : Min 0 Max 15
    ; Voice 1 : Min 0 Max 15
    element("Input Gain Volume",0,200,Volume1(15,15))
    element("Input MUX",0,401,Mux2(element("Line",0,0)))
  }
}

You can modify the configuration (volume levels etc.) by using alsamixer, which comes in the alsa utils package, or the GUI mixer gamix (a separate download) and then save it to file by doing alsactl store at the command prompt.

Opensound details

The ESS Solo 1 is well supported by the commercial sound system for Linux from www.opensound.com. A license for the system costs $30; you can download the system for free for a limited evaluation period. I decided it was worth the money to have full-featured sound support.

If you just want recreational sound support, but wish to devote your working time to other matters, give OSS your $30, relax and listen!

Installation of the Opensound system (OSS) is well described in the documentation that comes with the package. I add here one little trick. By default, you start OSS by running, as root, a script named "soundon", and remove the sound modules with the "soundoff" command. This contrasts with the standard procedure using the ALSA drivers (and also the ossfree drivers that come with the Linux kernel), whereby the sound modules are loaded automatically on demand, and unloaded after a while if they are not being used. I prefer this automagic behavior. You can get it with Opensound with a little fiddling. Below is a shell script which sets things up. I suggest you use it only (a) if you know what you're doing, and (b) after reading the script carefully and seeing how it might have to be modified for your system.

#!/bin/sh

# script to make the commercial opensound driver for the ESS Solo 1
# use the kmod procedure for on-demand loading, and unloading, of
# kernel modules

# modify the three lines below if need be
OSSDIR=/opt/oss
MODCONF=/etc/conf.modules
MODDIR=/lib/modules/$(uname -r)

# symlink the oss modules directory to a suitable place
ln -s $OSSDIR/modules $MODDIR/oss

# modify the module configuration file
cp $MODCONF $MODCONF.bak
cat $MODCONF | grep -v char-major-14 | grep -v snd > $MODCONF.tmp
echo "# osslinux" >> $MODCONF.tmp
echo "alias char-major-14 solo" >> $MODCONF.tmp
echo "post-install solo $OSSDIR/ossauto" >> $MODCONF.tmp
echo "path[oss]=$MODDIR" >> $MODCONF.tmp
mv $MODCONF.tmp $MODCONF

# prepare the "ossauto" script referenced above
echo "#!/bin/sh" > $OSSDIR/ossauto
echo "exec $OSSDIR/sndconf - $OSSDIR <$OSSDIR/devices.cfg >/dev/null" \
  >> $OSSDIR/ossauto
chmod 755 $OSSDIR/ossauto

# to get depmod to work right we have to move all other sound 
# modules out of the way
mkdir $MODDIR/sound-bak
mv $MODDIR/misc/soundcore.o $MODDIR/sound-bak
# this is for an alsa installation -- you may have to modify
mv $MODDIR/misc/*snd* $MODDIR/sound-bak

depmod -a

After running this script (or something similar) you should be able to use sound programs and have the Opensound modules auto-load.

Allin Cottrell (cottrell@ricardo.ecn.wfu.edu) February, 2001