You are not logged in.

#1 2010-08-21 20:35:38

jackjackk
Member
Registered: 2010-07-21
Posts: 40

Crackling sound captured by the microphone using skype

Hi, I'm having an audio issue using skype: whenever I try to make a call, my voice sounds distorted and crackled to the person I'm speaking to. I'm using a normal mini-jack mic plugged into my Realtek ALC861 soundcard (treated by the kernel as an HDA Intel card). With audacity, the sound from the mic is clearly captured, no crackling occurs. In skype options, the only sound device I can choose is "PulseAudio server (local)" for microphone, speakers and ringing (i.e. all the audio devices listed in skype options). Audacity is not using PulseAudio, as far as it's my understanding, so the problem could be related to PulseAudio. However, the sound from the output of the soundcard is perfect: only the audio captured gets corrupted. Googling around I've found many other users apparently with the same problem (especially running Ubuntu and Fedora distributions) but not finding a solution.
Also using the google-talkplugin (installed from AUR) in firefox leads to the same problems!! Again, pulse audio appears as an optional dependency. So, currently I'm not able to do any virtual vocal conversation with my Archlinux, and I really don't know how to troubleshoot this problem... Any help is very appreciated! Thanks!

Version of possibly related packages:
kernel26 2.6.34.3-1
alsa-lib 1.0.23-1
pulseaudio 0.9.21-8
pulseaudio-alsa 1-1
skype 2.1.0.81-2

Last edited by jackjackk (2010-08-21 20:37:13)

Offline

#2 2010-08-21 20:55:13

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Crackling sound captured by the microphone using skype

How does it sound if you record yourself with audacity?


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#3 2010-08-22 06:27:37

jackjackk
Member
Registered: 2010-07-21
Posts: 40

Re: Crackling sound captured by the microphone using skype

The sound is clear with audacity, which uses ALSA directly I think, not passing through pulseaudio.

Offline

#4 2010-08-22 11:16:20

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Crackling sound captured by the microphone using skype

Install pavucontrol and check if pulse is being used by audacity or not, also make sure the recording volume is not see too high otherwise you may get clipping (which is probably what you are experiencing).


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#5 2010-08-22 11:59:43

olvar
Member
Registered: 2009-11-13
Posts: 97

Re: Crackling sound captured by the microphone using skype

iirc if you are running a x86_64 some 32 bit libraries are needed.
The ones I installed to make it work were
lib32-pulseaudio lib32-alsa-lib lib32-alsa-plugins

Offline

#6 2010-08-22 12:33:58

jackjackk
Member
Registered: 2010-07-21
Posts: 40

Re: Crackling sound captured by the microphone using skype

@ R00KIE: If I start audacity with pavucontrol running at the same time, I cannot select my default soundcard neither for input or for output (which is normally listed as "ALSA: HDA Intel: ALC861 Analog (hw:0,0)" WITHOUT pavucontrol running). When I run skype, I can see the output and input level meters in pavucontrol correctly moving. Changing the input volume just ends up changing the volume of my voice, leaving the noise* unaffected. So it shoudn't be a clipping problem. Also changing the mic volume in the ALSA mixer does not reduce the noise*.
*: obviously, by reducing the volume, also the crakle (with the voice) is less loud, but the "signal-to-noise ratio" does not improve!

@ olvar: I'm running a 32-bit system, so I shouldn't need them...

Offline

#7 2010-08-22 17:03:31

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Crackling sound captured by the microphone using skype

Alsa seems to work fine on its own but I have experienced a similar problem before. Recording with audacity would work fine but with any other program I would have a very irritating noise added which I found out that it was periodic dropouts (a few zero samples in between the correct waveform). The problem went away a few kernel versions later, in the mean time I did use OSSv4 but for you it is a no go because of skype (the same thing that made me change back to alsa)

Then the only workaround I can remember of is this [1]. If this doesn't work then try this [2] but I'm not sure if it is going to make any difference. Trying the latest kernel might also solve your problem.

[1] http://wiki.archlinux.org/index.php/Pul … oppy_sound
[2] http://wiki.archlinux.org/index.php/Pul … nce_0.9.14

Edit:
You could always add the following to /etc/asound.conf

pcm.!default {
    type pulse
}
ctl.!default {
    type pulse
}

and tell audacity to use the default output/input and try to figure out what the problem really is. Or if you don't need pulseaudio you could try to use just dmix to get sound from more than one program at a time.

Last edited by R00KIE (2010-08-22 17:11:31)


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#8 2010-08-22 23:19:48

jackjackk
Member
Registered: 2010-07-21
Posts: 40

Re: Crackling sound captured by the microphone using skype

Thank R00KIE, unfortunately I've tried all of your suggestions with no success... Also following http://www.pulseaudio.org/wiki/PerfectSetup#Skype was useless for my case. Changing the settings changed the way in which noise occurred, but with no satisfactory improvements.

So I decided to get rid of pulseaudio and simplify things... and the problem still persists! Even with arecord! Regardless of the format I choose, and regardless of my alsamixer settings! So it appears to be a very similar issue to the one R00KIE has reported: only audacity seems to correctly capture the sound from the mic. For which inscrutable reason does the rest of programs not perform as well as audacity?!


(final discouraged digression)

In my specific case, I've also considered two alternatives, both of which miserably failed:
1) Using the mic of a Logitech QuickCam USB Camera (the kernel correctly recognizes it, but I'm unable to get any useful sound from it).
2) Using a mic through a firewire audio acquisition device and jack, which works with audacity (again!), but I'm unable to interface skype with jack...

Anyway, I'll try to stick to ALSA for a while and wonder if there is sth left to try.

Offline

#9 2010-08-23 00:16:42

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Crackling sound captured by the microphone using skype

If I'm not mistaken audacity uses (or used) portaudio for capture, I believe it sets some capture parameters that somehow mask or avoid problems.

When I had the same problem I remember having tried to adjust some of those parameters with settings in asound.conf without success, that is why I gave OSSv4 a spin for sometime.

The documentation or configuration examples led me nowhere, I even posted here for help but as this is a quite strange problem no one could provide any help. You can see my old post here https://bbs.archlinux.org/viewtopic.php?id=59505 I guess you'll spot the problem immediately.

The problem got sorted out automagically a few kernel releases afterwards. One thing that did work well at the time was an usb headset I bought exactly because of this problem.

If you can get hold of a cheap one give it a try, it should work just fine with pulse too and the person on the other side will thank you for the better sound quality an headset provides.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#10 2010-08-24 01:14:57

jackjackk
Member
Registered: 2010-07-21
Posts: 40

Re: Crackling sound captured by the microphone using skype

I've been insistently looking for a solution... and I've slightly improved my situation (by ~8 seconds!).
First of all, I tried all of the possible snd_hda_intel modprobe model options for my soundcard (Realtek ALC861, in a Toshiba Satellite A100-159 notebook), which are:

3stack   3-jack
     3stack-dig   3-jack with SPDIF I/O
     6stack-dig   6-jack with SPDIF I/O
     3stack-660   3-jack (for ALC660)
     uniwill-m31   Uniwill M31 laptop
     toshiba   Toshiba laptop support
     asus      Asus laptop support
     asus-laptop   ASUS F2/F3 laptops
     auto      auto-config reading BIOS (default)

and, for each of them, I extensively played with the alsamixer settings. I ended up preferring just to leave the auto model.
A strange thing I've noticed is that if I reload the snd_hda_intel module after booting (still with auto/no model option), the alsamixer presents slightly different controls, which I think better match my soundcard. Anyway, the quality obtained with a command like

arecord -vv -f cd foo.wav

is never satisfactory, regardless of how much you struggle with alsamixer, because of a frustrating (static) noise faithfully accompanying the recording.
Then I tried to use the jack audio server along with the alsa jack plugin.
To ~/.asoundrc file the following lines have been added:

pcm.jackplug {
  type plug
  slave { pcm "jack" }
}

pcm.jack {
  type jack
  playback_ports {
    0 system:playback_1
    1 system:playback_2
  }
  capture_ports {
    0 system:capture_1
    1 system:capture_2
  }
}

If you want jack as the default choice by ALSA, just follow this: http://alsa.opensrc.org/index.php/Jack_%28plugin%29 .

Then I started jack with a simple

jackd -d alsa

and tried recording with

arecord -D jackplug -vv -f cd foo.wav

where the string '-D jackplug' depends on the name used in .asoundrc and can be omitted if jack is set as default.
and voilà! the recording was so pleasantly clear!
Final step: test Skype.
Choosing the right audio devices, Skype played through jack the effect sounds without any problems. But whenever I tried the test call, after 6 to 10 seconds I got the message:

subgraph starting at alsa-jack.jackP.5807.49 timed out (subgraph_wait_fd=21, status = 0, state = Running, pollret = 0 revents = 0x0)
**** alsa_pcm: xrun of at least 979.834 msecs
03:01:45.766 JACK connection graph change.
03:01:45.779 XRUN callback (1).
03:01:45.904 JACK connection change.
03:01:49.298 JACK connection graph change.
subgraph starting at alsa-jack.jackC.5807.50 timed out (subgraph_wait_fd=16, status = 0, state = Running, pollret = 0 revents = 0x0)
**** alsa_pcm: xrun of at least 979.874 msecs
03:01:49.312 JACK connection change.
03:01:49.313 XRUN callback (2).

and audio stopped.
Playing around with jack settings hasn't brought me to a solution yet. I was just able to postpone by some seconds the occurance of the error by increasing the frame buffer. But it's not yet acceptable.
I know I moved my attention to a particular workaround rather than to a solution to the original problem, but I think this can be at least a promising path.... In case I'll open a new thread about Skype and jack, as I haven't been able to find useful info about the problem I've encountered.

@ R00KIE: definitely yes, your problem seems very similar to mine!

Last edited by jackjackk (2010-08-24 01:37:20)

Offline

#11 2010-08-24 09:51:09

jackjackk
Member
Registered: 2010-07-21
Posts: 40

Re: Crackling sound captured by the microphone using skype

Finally I ended up using pulseaudio+jack... and now skype is (apparently) correctly working!!
I run jack with:

jackd -r -d alsa

the "no-realtime" switch -r is necessary for me, otherwise pulseaudio gets zombified after a while and stops working.
Then I run pulseaudio above jack with:

pulseaudio -L module-jack-sink -L module-jack-source

Finally I run skype, where the test call gives me the happy results.

Again, I know this is not a solution, but I have no idea on how to troubleshoot the static noise added to the signal captured by alsa mic, and at least now audio capture in skype is working! smile

Last edited by jackjackk (2010-08-24 09:58:21)

Offline

Board footer

Powered by FluxBB