Setup:
Unstable repository, fully up to date and no broken packages.
NVIDIA GTX 1060 using nvidia-developer-driver-current
Problem:
Output over HDMI sounds overdriven, static, scratchy mess thats painful to the ears when output over HDMI, switch to a non HDMI output and its fine.
Steps to reproduce:
Output audio over HDMI using any app.
Steps taken to try resolve:
pulseaudio -k, closing and reopening the application outputting sound, restarting the computer. No change issue is persistent.
I did some digging and found:
https://www.reddit.com/r/archlinux/comments/eb0cux/distorted_hdmi_audio_with_latest_nvidiakernel/
https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/commit/?id=6fd739c04ffd877641b01371f9fde67901e7f9cb
Which lead to initial bug reports and a user saying it affects kernels as early as 5.3.16 (Apparently fixed in 5.4.6)
https://bugzilla.kernel.org/show_bug.cgi?id=205855
I added the patch and made sure it applied:
+ nvidia-hdmi-audio.patch == ''
+ patch -t -E --no-backup-if-mismatch -f -p1 -i /home/build/work/files/nvidia-hdmi-audio.patch
patching file sound/hda/hdac_stream.c
patching file sound/pci/hda/patch_hdmi.c
Rebuilt nvidia-developer-driver against patched kernel > install new packages > reboot and the issue goes away.
Rollback and it returns.
Hope that helps.