thesofproject / linux

Linux kernel source tree
Other
89 stars 129 forks source link

HDMI video and audio #5153

Open plbossart opened 3 weeks ago

plbossart commented 3 weeks ago

Discussed in https://github.com/orgs/thesofproject/discussions/9395

Originally posted by **Hobbyist11** August 23, 2024 Greetings, I'm experiencing really bad flickering (turning on and off) of an HDMI external display on an Intel Meteorlake machine. I've noticed that it only happens when audio is set to play on HDMI but not when it is set to play on laptop. I've filed an issue to i915. https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11391#note_2476569 but debugging it, haven't found any possible causes/clues. Could this be an SOF issue? I've also enabled verbose debugging for SOF but haven't found anything useful too, nothing appears on dmesg -w when the flickering happens. Uninstalling sof-firmware though makes the flicker disappear at the expense of not having audio.
plbossart commented 3 weeks ago

I don't see how this could be related to SOF. The external displays are handled with an internal HDaudio codec and the clocks are based on 24 MHz. nothing special. It's likely that there's some sort of configuration issue between the display clocks and the audio clocks.

The one question is whether audio 'sounds correct' on the external output? If you play a nice clean sine waves, do you hear any distortion, saturation or anything unexpected.

Hobbyist11 commented 3 weeks ago

I used this video: https://www.youtube.com/watch?v=URrEtyFSENc and this: https://www.youtube.com/watch?v=0RMmDWNLRCk&list=TLPQMjMwODIwMjSFrVAILPEODA&index=2 Played it on the external monitors' audio and on the laptop audio. Didn't notice any difference between them. Howeveer when i set it to play on the laptop speakers then the connected HDMI monitor starts to turn on and off quickly. Environment 1) Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).

dmesg | grep sof with verbose debugging enabled as per the docs.

sof_dmesg.txt


lspci | grep -i audio
00:1f.3 Multimedia audio controller: Intel Corporation Meteor Lake-P HD Audio Controller (rev 20) ```
Hobbyist11 commented 3 weeks ago

I tried different cables as well as different HDMI ports on the 4k montor and it still flickers. I tried a different exxternal display, a 1080p LG TV and it didn't have any flickers at all. BTW, it doesn't flicker when there is an ongoing audio playback.

Hobbyist11 commented 2 weeks ago

I've tried changing /sys/module/snd_hda_intel/parameters/power_save_controller to N and /sys/modules/snd_hda_intel/parameeters/power_save to 0 and it didn't stop it. Only workaround I've found ATM to make it useable is to playback audio on Youtube while working