]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ALSA: hda: codecs: hdmi: disable keep-alive before audio format change
authorKai Vehmanen <kai.vehmanen@linux.intel.com>
Wed, 15 Jul 2026 18:06:10 +0000 (21:06 +0300)
committerTakashi Iwai <tiwai@suse.de>
Thu, 16 Jul 2026 06:32:08 +0000 (08:32 +0200)
commita3d6d3cedfe87bbd5a677d52b22ac20d28e59cf8
tree8f278f4e1477298a4b43dc193fbfe196380d4316
parent3b597d24dc0455ae926f1053f97c2725038fc3cd
ALSA: hda: codecs: hdmi: disable keep-alive before audio format change

When a keep-alive (KAE) silent stream is active on an Intel HDMI/DP
codec, opening a real PCM stream reprograms the converter format and the
audio infoframe in snd_hda_hdmi_generic_pcm_prepare(). Part of that
reprogramming - the converter channel count and the channel mapping in
snd_hda_hdmi_setup_audio_infoframe() - is not safe to do while a
keep-alive stream is active. This is most visible when switching to a
multichannel PCM configuration, where the active channel count actually
changes. In that case the newly opened PCM stream plays no sound.

Add an optional hdmi_ops .prepare hook, called at the start of the
PCM prepare sequence (before the format and infoframe are touched), and
implement it for HSW+ to release keep-alive. Keep-alive is then
re-enabled as before once the new stream has been set up, in the
setup_stream op.

Fixes: 15175a4f2bbb ("ALSA: hda/hdmi: add keep-alive support for ADL-P and DG2")
Reported-by: Alexander Kaplan <alexander.kaplan@sms-medipool.de>
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/8412
Tested-by: Alexander Kaplan <alexander.kaplan@sms-medipool.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://patch.msgid.link/20260715180610.1371243-1-kai.vehmanen@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/hda/codecs/hdmi/hdmi.c
sound/hda/codecs/hdmi/hdmi_local.h
sound/hda/codecs/hdmi/intelhdmi.c