8

When hosting a meeting and sharing an application through Zoom on Debian buster, I am getting audio distortion on the clients that connect to the meeting.

I am using zoom 5.2.446620.0816 and have updated pulseaudio to 13.0-3 using 'buster-backports' but the problem still occurs.

****The way this looks in pavucontrol before I share an application:

In Playback, there is

---ZOOM VoiceEngine: playStream

Recording:

---ZOOM VoiceEngine: recStream from (microphone stream input to Zoom, known working)

Output Devices:

---Built-In Audio Speaker playback + Headphones playback

Input Devices:

---QuickCam Pro 9000 Analog Mono (microphone as device)

Configuration:

---QuickCam Pro 9000, Profile "Analog Mono Input"

---Built-in Audio, Profile "Play HiFi quality Music"

When I share an application through Zoom and choose "share computer sound", the following are added.

Recording:

---ZOOM VoiceEngine Loopback: loopbackStream from

Output Devices:

---zoom_combine_device

****For applications, I've tried chromium (browser), spotify, and vlc

I'm not even sure what kind of audio distortion I'm getting though. At first, I tried adjusting the volume levels of each of the application, zoom_combine_device, and ZOOM VoiceEngine Loopback

It sounds like clipping distortion, but the quality of the sound doesn't change as I cycle through the volume levels. So, I suspect maybe it's caused by a bitrate or samplerate conversion problem. Also, while testing with headphones, I could speak into the microphone while trying to playback the shared application audio. The microphone signal comes through clearly, even as the application remains distorted.

PulseAudio is involved in setting up a sink "zoomcombine" or "zoom_combine" to which the microphone and application audio are each resampled and mixed together.

I check out the configuration of each from

pacmd list

****In the configuration which I'm viewing in the OP here,

the microphone source has "s16le" a fixed point sample format at 16000Hz mono.
the alsa_output sink has "s16le" at 48000Hz and 2ch, front-left and front-right.
the zoom combine sink has the same.
so does the zoomcombine.monitor output

the applications audio has 44100Hz samplerate. I don't know how to change this, but the resampling is happening.

then, the loopbackStream output has 44100Hz samplerate.

5
  • Brilliant! I have suffered from this for months. Thanks for the great solution. You should post an answer and accept it =)
    – Shi B.
    Sep 5, 2020 at 7:27
  • BTW my problem was exactly the reverse, my audio player is forced to output 48000 but zoom_combined is sinking at 44100. The resample-method fixed it nicely though.
    – Shi B.
    Sep 5, 2020 at 8:58
  • @charles-z-henry Seriously, re-post that info as an answer so it shows as answered and we can upvote it. This problem was driving me nuts! One week everything worked, the next it didn't, and sometimes it seemed to depend on the machine and what order I happened to do things in (e.g. play sound first, or share first) and it had me scratching me head. Like you, I realized that it was WORSE than over-driven, like it was totally misinterpreting the data, but I didn't even consider PA rate conversions. Thank you! Sep 5, 2020 at 20:06
  • Please don't put the solution in the question. Instead, write an answer with the solution. Please don't put "SOLVED" in the title. We are not a forum; we are a question-and-answer site. If you write an answer, this will be treated as answered (solved).
    – D.W.
    Sep 5, 2020 at 21:22
  • Thanks for correcting the superuser etiquette -- I just came back to this post and made the suggested changes. Oct 25, 2020 at 14:42

1 Answer 1

9

I made the following changes in ~/.config/pulse but you can also put them in ~/.pulse if it doesn't already exist. At least on this system, pulseaudio runs as the user. No system configurations were being applied from /etc/pulse, so editing them made no difference.

~/.config/pulse/daemon.conf

resample-method = speex-fixed-7
default-sample-rate = 48000
alternate-sample-rate = 44100

Each of those 3 settings is completely essential. It sets the loopbackStream sample rate to 48000Hz so that it matches zoom combine and the hardware. Then, zoom combine will successfully resample from the application audio from 44100Hz to 48000Hz. speex-float is not appropriate. The sample type is fixed.

The source of that awful distortion came from switching sample formats during resampling and unnecessarily using a different sample rate in the loopbackStream. Set the default sample rate to match your hardware and alternate sample rate to match applications if they're different. Changing the resampling method alone did not produce perfectly clear audio.

I tested the speex-fixed-N resampling methods with music. speex-fixed-7 was where the high end starts to shine and cymbals are clear. Some people think speex-fixed-5 is adequate.

2
  • 3
    Fixed the same problem on Ununtu 20.04. I Used cat /proc/asound/card0/pcm0p/sub0/hw_params to confirm the hardware sample rate, added the daemon.conf and restarted pulse with killall pulseaudio (the service respawns it). Life saver thanks!
    – meesern
    Nov 9, 2020 at 11:33
  • Just in case anyone else sees this and is unsure... If you don't have a daemon.conf file in ~/.config/pulse, you can just copy the existing one from /etc/pulse/daemon.conf into that folder, make your edits, and restart pulse (or your entire machine) ps. This fixed the problem for me on Mint Cinnamon 18. Feb 7, 2021 at 0:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .