EDIT: I realized that every time the audio would be crackling also computer performance overall would be worse, reason was broken GPU.
So I am running a HDMI cable to my television from my PC where I have Ubuntu 21.04 and I have been battling against an issue for few weeks now where the HDMI audio is crackling and distorted
Everything I have tried so far:
Adding "tsched=0" to back of the line "load-module module-udev-detect"
Adding "options snd-hda-intel vid=8086 pid=8ca0 snoop=0" to alsa-base.conf file
Adding "intel_iommu=igfx_off" to kernel command line
snd_hda_intel_power_save disabled permanently by adding "options snd_hda_intel power_save=0" to the end of /etc/modprobe.d/alsa-base.conf
Trying different settings in daemon.conf
Deleting speech dispatcher
Reinstalling alsa-base pulseaudio
Muting other outputs in alsamixer that are not in use
Trying different HDMI port
Trying different sound settings on my TV
And those were the tricks I was able to find after several hours of intense googling, none of which unfortunately worked. Only solution I have found out that if I restart my computer it will start to work, atleast after few restarts. In related to this it is probably good to mention that doing "sudo killall pulseaudio" does not make any difference.
Here is alsa-info.txt Link to justpaste.it because it wouldn't fit here
In the alsa-info there is a line near bottom that says "snd_hda_codec_hdmi hdaudioC0D2: No i915 binding for Intel HDMI/DP codec"
Is this something worth looking at? I tried to google about it but to my (mediocre) understanding this is related to people who run HDMI from back of their motherboard and only have integrated graphics. As I am running the HDMI from back of my 5700XT, that line doesn't concern me, am I right?
Specs: AMD 5700XT, Asus Prime Z590-A, TV is LG 47LM670T-ZA