Saturday, July 12, 2008

(Followup) Solved: Fedora 9, Skype for Linux 2.0x and the Microphone

Context:
Using Fedora 9's new sound system Pulse, some sound-centric applications like Skype need to be configured differently from their default sound settings.

Problem:
Immediately after installation, Skype for Linux 2.0.x was able to connect to my account and I was able to hear the test calls with reliable clarity.

However, using the Skype Test Call, my microphone sound was very distorted with static, digitalization, and gaps. Enabling the "Display technical call info", showed very high "jitter" and some "cor" (assuming this means corruption) but a reliable connect speed.

As I was able to use Skype for Windows before moving to Fedora 9, I was able to remove the router as the cause of the problem. See the "jitter" for details if you think this might be your problem.

Constraints:
Fedora 9 uses the "Pulse" sound daemon. Skype is a closed ("black box") software application so it's constraints are vastly unknown.

Details:
While I was able to use my microphone without significant issue (the volume was a little low) with other applications ( Sound Recorder ), Skype did not provide a clean and clear sound processing from the microphone. I tried various solutions (listed below) before finding the correct one for me:
Note: After trying each of these solutions and each failed to solve the problem, I reversed most of changes before starting the next solution. I believe I left some of the solutions from the first reference in place.

Solution:

The solution what worked for me came in two parts:
Enhancing the Microphone Volume

Takes from the second post here:
"A. Right click at the volume control, choose preference.
B. File - Change Device - (OSS Mixer), which is the second one.
C. Below the microphone volume- click on the "microphone icon" until there is no cross on it.
D. File - Change Device - (Alsa Mixer), which is the first one.
E. Edit - preference - scroll down - click Mic Boost (+20 dB)
F. Click "Switches", which is next to Playback. Then click Mic Boost (+20 dB)"
This will result in a louder microphone for all of Fedora 9's sound applications using the microphone. If you find that it's too loud, you can unselect the microphone boost on the "Switches" panel of the sound mixer.

Setting the Hardware Microphone in Skype

Taken from the here:
"Firstly, add these lines:
default-fragments = 8
default-fragment-size-msec = 5

at the end of "/etc/pulse/daemon.conf"

Then, edit "~/.asoundrc" and add the following lines if they do not exist:

pcm.pulse { type pulse }
ctl.pulse { type pulse }

Finally, open Skype. Set the "Ringing" and "Sound Out" devices to "pulse", then set the "Sound In" to the plughw device of your microphone."

While the article has more steps, these are the only steps I executed from this reference.
  1. I added the first modifications to /etc/pulse/daemond.conf as shown. I am uncertain exactly what these settings do.
  2. I did not have a ~/.asoundrc file. I created on in my home directory but I do not think it added to the finally solution.
  3. I believe the key part of the solution was the last step (possibly the only step needed): "set the 'Sound In' to the plughwd device of your microphone." The Skype "Sound In" settings are found on the Options dialog under "Sound Devices". Using the drop down box "Sound In", I did a bit of "trail and error" to find the correct setting and required a restart of X when I selected some of the incorrect options. In the end, my correct setting was "Intel ICH5 (hw:ICH6,0)" and yielded a very clear voice using the Skype Test Call" service. Your setting will probably be similar but different.
  4. From other experimentation, I set the "Sound Out" and "Ringing" to "pulse".
References:

Disclaimer:
This solution worked for me. It may or may not work for you. I am not responsible for your actions nor the your results of your actions should you act on what you read here. I do not claim expertise in this very specific area and only convey my experience. There is no warranty on this (and most) free information.

Followup (July 26,2009):

Based on experiences with Fedora 10 and Fedora 11, the above suggestions are not absolute. In fast, they only highlight the "control points" but generally will not solve the problem. During subsequent testing, I found that a change in configuration required a reboot to truly get a definitive result. For Fedora 11, I finally gave up and configured directly against the hardware layer and not with PulseAudio.

2 comments:

Unknown said...

Could you please specify the sound card that you are using?

TNX

Marius said...

Thx for the nice post. With the info here I've managed to crack up the volume for my microphone and now everything runs smoothly.