Microphone doesn't work when changing default-sample-rate

Edit:

  • In an attempt to fix an audio issue (popping, crackling, nothing particularly terrible, but slightly annoying), traversed many forums and websites
  • based on a recommendation (unfortunately I don’t remember where I had it from) I edited ~/.config/pulse/daemon.conf and added default-sample-rate = 48000 - that didn’t fix the issue I had, but I didn’t notice any problem with it, so I left that in
  • a few days later I noticed that I didn’t get the microphone to work in Skype and various audio recording software (e.g. Audacity), but it still worked in other programs (Vivaldi, Firefox, Linphone)
  • removing default-sample-rate = 48000 from daemon.conf (don’t forget pulseaudio -k and pulseaudio --start) fixed the issue

I guess I don’t have a problem any more, but I do wonder why non-funcitoning programs didn’t fall back to the alternate-sample-rate, which was 44100. And/or I do wonder if I can set the sample rate to 48000 for playback, but keep it at 44100 for the microphone.

Please try to forget command pulseaudio -k. Killing PulseAudio daemon can be detrimental to systemd units controlling PulseAudio. This one command is better for restarting PulseAudio

systemctl --user restart pulseaudio

also this to check if there are any error messages before restarting

systemctl --user --full --no-pager status pulseaudio.{socket,service}

Skype audio streams are a bit weird

Using Test Audio in Skype to play ringtone appears to be playing stereo audio from Chromium

pactl list sink-inputs

Sink Input #0
Driver: protocol-native.c
Owner Module: 6
Client: 3
Sink: 0
Sample Specification: float32le 2ch 48000Hz
Channel Map: front-left,front-right
Format: pcm, format.sample_format = “"float32le"” format.rate = “48000” format.channels = “2” format.channel_map = “"front-left,front-right"”
Corked: no
Mute: no
Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
Buffer Latency: 64250 usec
Sink Latency: 9940 usec
Resample method: copy
Properties:
application.icon_name = “chromium-browser”
media.name = “Playback”
application.name = “Chromium”
native-protocol.peer = “UNIX socket client”
native-protocol.version = “35”

	application.process.binary = "skypeforlinux"
	application.language = "en_GB.utf8"
	window.x11.display = ":0.0"
	application.process.machine_id = "e1a1dbd021524f58a519eccfea07f8ea"
	application.process.session_id = "1"
	module-stream-restore.id = "sink-input-by-application-name:Chromium"

But for Test Call there are 2 mono sink-inputs

Sample Specification: s16le 1ch 44100Hz
Channel Map: mono

	media.role = "phone"
	media.name = "Output"
	application.name = "Skype"
Sample Specification: float32le 1ch 48000Hz
Channel Map: mono

	application.icon_name = "chromium-browser"
	media.name = "Playback"
	application.name = "Chromium"

But PulseAudio should have no problem resampling the 44100Hz voice audio stream to 48000Hz,
or remapping mono audio to stereo

popping/crackling issues in Skype calls might be prevented by reconfiguring resample-method and default-sample-format in addition to default-sample-rate

# ~/.config/pulse/default.pa
resample-method = speex-float-3
default-sample-format = s24
default-sample-rate = 48000

I got pulseaudio -k|--start from the Arch wiki page about troubleshooting PulseAudio.

pactl list sink-inputs doesn’t output anything. Do I have to call it while using skype (or any other recording software)?

I’ll look into configuring resampling, thanks for the pointers!

A post was split to a new topic: Changing default-sample-rate to 48000 caused microphone issues