Problem description
I am trying to get the audio to work correctly in my Linux installation. However, every time the audio signal goes to zero, even for only about half a second, and when it comes back up, I hear a click/pop from my speakers. This is most obvious when listening to sources without constant background noise, wherein the clicks happen each time a character begins or stops talking and any time one pauses or restarts music playback. While typical modern movies are never completely silent, certain type of content, such as talk shows or push-to-talk voice communication software, are completely ruined.
System hardware and software setup
I have built a media PC with an Intel i5 processor. The motherboard is an ASUS Prime B560M-A and the display being used is an LG CX series OLED. I am using Debian testing (Bullseye) and Pulseaudio, which comes default with Debian.
Sound is sent outwards through HDMI1 and the TV forwards it to a Harman Kadron AVR (171S) through its audio return channel (ARC). Pulseaudio output mode is "HDMI1 Digital Stereo" with several pass-through audio formats enabled.
Problem isolation and presumed cause
It seems that audio system power saving (or other) functions in Debian shut down the audio signal immediately when it detects complete silence. This causes the AVR to turn off its audio output, which produces the click. The same happens in reverse, when sound resumes.
I can confirm this by observing the audio format indicator in my AVR. When I switch to a source from my amplifier, it displays the format being received. If there is a signal, the AVR displays "2/0/0 48kHz ARC" (for regular PCM) or something like 3/2/1 48kHz ARC (for DTS). In Debian, when I switch to the ARC input at any time when audio volume is at zero, the receiver displays "--- ARC", which indicates no signal at all. It really seems like the signal is immediately killed when it reaches zero.
How do I know that this is a Linux/Debian issue
At this point there are still multiple options. It could be that the AVR itself is shutting down if it is only receiving zeroes, and it could also be that the TV stops sending any signal if it is only receiving zeroes. However, the TV is in the simplest possible pass-through mode, and I can isolate the problem to Debian by testing the same setup through a Playstation 4 console.
In the exact same situation, when absolutely no sound is being played by the PS4, the AVR still reports "2/0/0 ARC". When the audio playback stops or continues, there are no cracks and pops whatsoever. I.e. with the PS4, the audio signal never cuts out completely.
What have I tried?
I have searched for this site and the internet at large for people with similar problems, and found the following advice.
This has been set to 0:
/sys/module/snd_hda_intel/parameters/power_save
This has been set to N:
/sys/module/snd_hda_intel/parameters/power_save_controller
These changes have been made permanent:
root@mycomputername|/etc/modprobe.d:cat audio_disable_powersave.conf
options snd-hda-intel power_save=0 power_save_controller=N
I have turned off muting idle sinks in pulseaudio at locations
/etc/pulse/default.pa
/etc/pulse/system.pa
by commenting out the line:
### Automatically suspend sinks/sources that become idle for too long
#load-module module-suspend-on-idle
Pulseaudio has been restarted after this change.
I have also enabled silent stream in the hdmi output module by setting this to Y:
/sys/module/snd_hda_codec_hdmi/parameters/enable_silent_stream
It was made permanent the same way as the module settings above.
Additionally, I have disabled the "Auto Mute Mode" from Alsamixer, though this should not have any effect as I believe it is related to the headphone jack.
Several sources also suggest sending a stream of zeroes through aplay to keep the signal alive. I have done this by using:
aplay /dev/zero -f S16_LE
None of the above have had any kind of effect. Pressing pause always produces an immediate click, and any silence in the output always produces an immediate click. Checking the AVR signal mode after this always shows, that it is not receiving any signal at all.
I'm absolutely at my wits end and can't think of anything else to try, and would very much appreciate help from anyone who has actually solved this issue.
pasuspender
), and useaplay -D ...
with the right destination (aplay -L
, useplughw:...
with the one for HDMI1) with a WAV file with silences. Observe if the clicks happen on the silences, or on repeatedaplay
. Also tryhw:...
, but then you need a WAV file with the right sample rate.sox
to produce some low volume sinus of different frequencies, and see if it shuts down again. Also try a constant non-zero signal (which shouldn't be audible). Not sure ifsox
can do that, you may have to make a WAV file. If you can find some non-audible non-zero signal that prevents shutting down, then you can constantly play this.