ASoC: hdmi-codec: use SND_JACK_AVOUT as jack status

Use SND_JACK_AVOUT as the mask to align with hdac_hdmi driver so that we
can determine HDMI/DP devices from event type.

Most drivers that uses hdmi-codec driver will not be affected since they
are creating jacks with SND_JACK_LINEOUT mask. They will still report
SND_JACK_LINEOUT when the jack status is updated with
snd_soc_jack_report.

Signed-off-by: Terry Cheong <htcheong@chromium.org>
Link: https://patch.msgid.link/20250613-hdmi-v1-1-665ba7ecd5e7@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Terry Cheong 2025-06-13 16:51:27 +08:00 committed by Mark Brown
parent dae29b678b
commit 5eb8a0d773
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 3 additions and 3 deletions

View File

@ -943,7 +943,7 @@ static void hdmi_codec_jack_report(struct hdmi_codec_priv *hcp,
{ {
if (jack_status != hcp->jack_status) { if (jack_status != hcp->jack_status) {
if (hcp->jack) if (hcp->jack)
snd_soc_jack_report(hcp->jack, jack_status, SND_JACK_LINEOUT); snd_soc_jack_report(hcp->jack, jack_status, SND_JACK_AVOUT);
hcp->jack_status = jack_status; hcp->jack_status = jack_status;
} }
} }
@ -964,7 +964,7 @@ static void plugged_cb(struct device *dev, bool plugged)
else else
snd_show_eld(dev, &hcp->eld_parsed); snd_show_eld(dev, &hcp->eld_parsed);
} }
hdmi_codec_jack_report(hcp, SND_JACK_LINEOUT); hdmi_codec_jack_report(hcp, SND_JACK_AVOUT);
} else { } else {
hdmi_codec_jack_report(hcp, 0); hdmi_codec_jack_report(hcp, 0);
memset(hcp->eld, 0, sizeof(hcp->eld)); memset(hcp->eld, 0, sizeof(hcp->eld));
@ -984,7 +984,7 @@ static int hdmi_codec_set_jack(struct snd_soc_component *component,
* Report the initial jack status which may have been provided * Report the initial jack status which may have been provided
* by the parent hdmi driver while the hpd hook was registered. * by the parent hdmi driver while the hpd hook was registered.
*/ */
snd_soc_jack_report(jack, hcp->jack_status, SND_JACK_LINEOUT); snd_soc_jack_report(jack, hcp->jack_status, SND_JACK_AVOUT);
return 0; return 0;
} }