Asoundrc for stereo-mics

From Ekiga
Jump to: navigation, search

This page describes a problem with some soundcards. If you're looking for general Troubleshooting, see Troubleshooting.

If you're affected by this problem you should be able to hear others but they should not hear you. Ekiga will not report any errors.

Contents

The problem

Your soundcard might support stereo-recording only but tell ALSA that it's also capable of mono-recording, producing only silence when asked to do that. Programs using mono-mode (like Ekiga) will not report an error.

How to check whether you are affected

Run these two commands: If you are affected, ..

 $ arecord -D plughw:0,0 -c 1 -r 16000 -f S16_LE - | aplay -D plughw:0,0 -c 1 -r 16000 -f S16_LE -

..this will either produce silence or fail with an error

 $ arecord -D plughw:0,0 -c 2 -r 16000 -f S16_LE - | aplay -D plughw:0,0 -c 2 -r 16000 -f S16_LE -

..this will run fine.

Known affected cards

  • 00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
Built into: EEE PC 1005

Fix

ALSA provides a fix for this problem: The route-plugin allows users to mix two channels down to one, i.e. record in stereo but output mono to the recording program.

Put this into the file ~/.asoundrc:

pcm.convert_mic {
	type route
	slave {
		pcm "plughw:0"
		channels 2
	}
	ttable {
		0 {
			1 1.0
			1 1.0
		}
	}
}

pcm.!default {
	type asym
	playback {
		pcm "plughw:0"
	}
	capture {
		pcm "convert_mic"
	}
}

Note: The period in the beginning of the file's name indicate it's a hidden file. So you will probably not see it in your file manager.

How to check if this helped

The first command on this page should work now. Oh, talking to others in Ekiga should do, as well ;-)

Personal tools