[PATCH] ASoC: hdmi-codec: use SND_JACK_AVOUT as jack status

Terry Cheong posted 1 patch 3 months, 4 weeks ago
sound/soc/codecs/hdmi-codec.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
[PATCH] ASoC: hdmi-codec: use SND_JACK_AVOUT as jack status
Posted by Terry Cheong 3 months, 4 weeks ago
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>
---
 sound/soc/codecs/hdmi-codec.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c
index 31121f9c18c91a7444420c7ad2a10fd5ea406dc3..e1933f733af1032bc6f8fef1de4356a346aabcfa 100644
--- a/sound/soc/codecs/hdmi-codec.c
+++ b/sound/soc/codecs/hdmi-codec.c
@@ -943,7 +943,7 @@ static void hdmi_codec_jack_report(struct hdmi_codec_priv *hcp,
 {
 	if (jack_status != hcp->jack_status) {
 		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;
 	}
 }
@@ -964,7 +964,7 @@ static void plugged_cb(struct device *dev, bool plugged)
 			else
 				snd_show_eld(dev, &hcp->eld_parsed);
 		}
-		hdmi_codec_jack_report(hcp, SND_JACK_LINEOUT);
+		hdmi_codec_jack_report(hcp, SND_JACK_AVOUT);
 	} else {
 		hdmi_codec_jack_report(hcp, 0);
 		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
 		 * 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;
 	}

---
base-commit: 27605c8c0f69e319df156b471974e4e223035378
change-id: 20250613-hdmi-975fd43bdecb

Best regards,
-- 
Terry Cheong <htcheong@chromium.org>
Re: [PATCH] ASoC: hdmi-codec: use SND_JACK_AVOUT as jack status
Posted by Mark Brown 3 months, 4 weeks ago
On Fri, 13 Jun 2025 16:51:27 +0800, Terry Cheong wrote:
> 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.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: hdmi-codec: use SND_JACK_AVOUT as jack status
      commit: 5eb8a0d7733d4cd32a776acf1d1aa1c7c01c8a14

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark