Translation(s): [:DebianEeePCFrench/HowTo/Sound:French] [:DebianEeePCGerman/HowTo/Sound:German] [:DebianEeePCPortuguese/HowTo/Sound:Portuguese]

Sound for most Eee PC models with Alsa should ‘just work’. The following are tips to make it work optimally for certain applications or to work around problems with specific models.

?TableOfContents

Model 901, 1000 and 1000H front Microphone

See [#head-847b48cb34f949d53644217dd51e50a01d262131 Install latest Alsa release candidate] below.

Alsamixer

If you’re setting up your system to use an application like Ekiga to do VoIP/video conferencing then you will probably want to know how to use [:AlsaMixer:alsamixer] utility to access the low-level mixer channels on your audio card. There are GUI versions of alsamixer, but the alsamixer program is almost always installed by default. It is provided by the alsa-utils package.

To use it open up a terminal and use the 'alsamixer' program. It has three views (Playback settings, Capture settings, all settings) and you can switch between them with the tab button. You can press left arrow key or right arrow key to move from mixer to mixer and up arrow and down arrow key to change volumes. The m button will toggle mute for the devices that support it and space bar will toggle capture status for settings that support that. The '?' button will show the help dialog for more controls.

For the EeePC’s microphone you’ll probably want to adjust these settings: use the tab button to select the all view.

Arrow over to the capture setting and toggle it on using the space bar. Make sure the volume is around 70 %.

Make sure that i-mic (internal mic) is selected as the input source. (If i-mic doesn’t appear, try Front Mic.) Press up and down arrow to select input device.

Arrow over to the i-mic mixer settings. Set the volume at 70 % and then set the i-mic boost to 33 %.

That should give a good basis for playing around with your own settings till you get it perfect. The i-mic boost should be set to zero or 33 %. Anything above that and I get horrible sound distortion through Ekiga.

For testing audio performance Audacity is a good choice. Make sure that you go through the preferences and it is setup to use ["ALSA"].

GNOME Sound Recorder application from gnome-media is ok for doing recording. You just have to make sure that the codec it uses is either WAV, ["MP3"], or speex when doing the recording. The default is to use Ogg/Vorbis and the EeePC isn’t quite fast enough to do that encoding in real-time leading to very bad sound quality.

ALSA configuration

This can improve performance for your sound system when playing multiple sounds, recording to multiple programs, playing games, or watching videos on your EeePC.

For more details on what this file is and what to do with it see http://alsa.opensrc.org/.asoundrc.

pcm.my_card {
  type hw
  card 0
  # mmap_emulation true
}
pcm.dmixed {
  ## This provides software mixing for audio out
  type dmix
  ipc_key 1024
  slave {
  pcm "my_card"
  ## period_size and buffer_size
  ## can be modified to reduce
  ## latency or add more 'cusion'
  ## through the buffer
  period_size 1024
  buffer_size 4096
  rate 44100
  }
}
pcm.dsnooped {
  ## this provides software mixing for audio in
  type dsnoop
  ipc_key 2048
  slave {
  pcm "my_card"
  period_size 1024
  buffer_size 4096
  rate 44100
  }
}
pcm.asymed {
  ## this plugin allows you to bind both
  ## the dmix and dsnoop plugins together
  type asym
  playback.pcm "dmixed"
  capture.pcm "dsnooped"
}
pcm.pasymed {
  ## if you do not want to use use
  ## mixing by default, you can delete
  ## !default entry below and direct
  ## apps to use this 'device' as a
  ## extra option
  type plug
  slave.pcm "asymed"
}
pcm.dsp0 {
  ## this allows most OSS-only apps
  ## to use this mixing stuff
  ## through the use of the aoss wrapper
  type plug
  slave.pcm "asymed"
}
pcm.!default {
  ## this makes alsa apps default
  ## to use this config
  type plug
  slave.pcm "asymed"
}

Install latest Alsa release candidate

To get the front mic working you have to rebuild the alsa driver using the latest release candidate.

Grab it from here: ftp://ftp.alsa-project.org/pub/driver/. At the time of writing, alsa-driver-1.0.9rc4a.tar.bz2 is current. We have verified that 1.0.9rc1 works as well.

Next you need to unpack it somewhere like /usr/src/ then build it. You may want to backup your old driver first

/usr/lib/2.6.26-1-686/kernel/sounds/pci/hda/# cp snd-hda-intel.ko snd-hda-intel.ko.stock
/usr/src/alsa-driver-1.0.18rc1# ./configure --with-cards=hda-intel --with-options=all
/usr/src/alsa-driver-1.0.18rc1# make
/usr/src/alsa-driver-1.0.18rc1# make install
/usr/src/alsa-driver-1.0.18rc1# ./snddevices

I’m not sure if the last step is necessary but i ran it anyway.

You can verify your new driver with

/usr/lib/2.6.26-1-686/kernel/sounds/pci/hda/# ls -l

Check that the date on the snd-hda-intel.ko is about the time you compiled it :)

Now you need to reboot.

After the reboot, have a look at your mixer settings with alsamixer or the gnome-volume-control, the channels have changed from the stock driver.

To get your hot keys to work again you need to edit /etc/default/eee-acpi-scripts and change the mixer labels

VOLUME_LABEL='LineOut'
VOLUME_LABEL='iSpeaker'

to

VOLUME_LABEL='PCM'
VOLUME_LABEL='LineOut'

[psyche] Are you sure there should be two VOLUME_LABEL keys? I think for the second item should be HEADPHONE_LABEL='?LineOut'

You also need to add the line

I_SWITCH_LABEL='iSpeaker'

This should get the volume keys working again.

To get the mute key to work you need to edit /etc/acpi/actions/hotkey.sh. Comment out the line (around line number 50)

status=$(amixer get $VOLUME_LABEL | sed -n '/%/{s/.*\[\(on\|off\)\].*/\u\1/p;q}')

and add this line underneath it

status=$(amixer get $I_SWITCH_LABEL | sed -n 's/.*\[\(on\|off\)\].*/\1/;ta;d;:a;p;q')

Further down in the ‘# Fn+F7 -- mute/unmute speakers’ section, comment out the line

amixer -q set $VOLUME_LABEL toggle

and add instead

amixer -q set $I_SWITCH_LABEL toggle

You should now be all set.