Microphone cracking

Ok, so first I'm going to make it brief: either ALSA or PULSEAUDIO makes my mic record horrible cracking-riddled signal. I struggled with it for 2 days now but it appears that i would need help. Here's how it sounds like.

Now the weird part about this is that I have (kind of) solved it yesterday by using this guide. It actually worked, however it was kind of a crutch and I felt that there must be a better way. Some audio bridges wouldn't start sometimes, which I can tolerate, but audio levels were really unreliable using this method.

I had reinstalled Manjaro since, using a minimal setup, so I even had to install PULSEAUDIO myself and the problem still persisted, but now I have a somewhat clean slate of a system and things can be tested with less variables.

One additional thing is that yesterday I could just pick a hardware input in audacity, [0;0] or [0;1] I don't remember which exactly, but it would record my mic as normal. Sadly I don't remember if I had the JACK solution implemented already or not. When I tried the same today(after having reinstalled the system), audacity gave me an error "Error opening recording device. Error code: -9997 Invalid sample rate". Even though, I don't think the sample rate is wrong (I've tried several anyway).

Thing I've tried so far(mind you I might have tried it wrong, since I only used Linux for only few days, so there's a big chance I've done something wrong or misunderstood something):

  • Changed sample rates
  • Added tsched = 0 to config
  • Played with levels in alsamixer
  • Changed resampling mode
  • probably something else that I'm not remembering already

I believe my chip is ALC 662 rev1 if that's any help.

Since the crackling is not happening on Jack+PA, then it's likely not the hardware issue. And most of the time it's the sampling rate causing the static noise in mic. I suggest you follow this guide: https://wiki.archlinux.org/index.php/PulseAudio/Troubleshooting#Static_noise_in_microphone_recording

How did you change all these stuffs? Did you do it in the right configuration file? And did you restart pulseaudio afterwards?
systemctl --user restart pulseaudio.service

1 Like

Crackling microphone

If you are getting a crackling or popping from your microphone that cannot be resolved with ALSA settings or cleaning your microphone jack, try adding the following line to /etc/modprobe.d/modprobe.conf :

options snd-hda-intel model=MODEL position_fix=3

This option will fix crackling on pure ALSA, but will cause issues to pulseaudio. To let Pulse use these settings effectively, edit /etc/pulse/default.pa and find this line:

load-module module-udev-detect

And change it to this:

load-module module-udev-detect tsched=0

See the DMA-Position Problem in the kernel docs.

https://wiki.archlinux.org/index.php/Advanced_Linux_Sound_Architecture/Troubleshooting

1 Like

It is most definitely not a hardware issue since I was using the same hardware for Windows and never had the same problem.
To change the sample rate I believe I just edited /etc/pulse/daemon.conf.

Anyway, I had already followed these steps on the previous installation and they didn't help. This time I noticed this line "In addition to the guide below, since PulseAudio 11 it is possible to set avoid-resampling = yes in daemon.conf." I tried this first and I think it worked. I say 'I think' because when I changed the volume of my mic even for a tiny bit (it was way too loud) it went back to cracking. So I went with this guide you linked again and set my sampling rate to 96000, and tried to record some samples again. Once again the volume was too loud so I went ahead and disabled the mic boost and confirmed that the cracking is still there. Mind you, the audacity STILL gives me an error when I try and record something after choosing a HW source, even though both my chip and the project settings are set to 96000(which is unnecessarily high to be honest).

I didn't have the modprobe.conf file so I had to create it just to put this line there. I also added tsched=0 to default.pa as you said and then rebooted the machine. It actually worked! Everything is perfect so far. I can't thank you enough, my 3-day headache is now gone.

Funnily enough audacity still gives the same error, so I guess it was irrelevant.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by