Patch "ASoC: hdmi-codec: fix missing report for jack initial status" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ASoC: hdmi-codec: fix missing report for jack initial status

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     asoc-hdmi-codec-fix-missing-report-for-jack-initial-.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 1ea20e35d1a170a49d535ffc5c5b299ab3e6b25e
Author: Jerome Brunet <jbrunet@xxxxxxxxxxxx>
Date:   Mon Dec 18 15:56:52 2023 +0100

    ASoC: hdmi-codec: fix missing report for jack initial status
    
    [ Upstream commit 025222a9d6d25eee2ad9a1bb5a8b29b34b5ba576 ]
    
    This fixes a problem introduced while fixing ELD reporting with no jack
    set.
    
    Most driver using the hdmi-codec will call the 'plugged_cb' callback
    directly when registered to report the initial state of the HDMI connector.
    
    With the commit mentionned, this occurs before jack is ready and the
    initial report is lost for platforms actually providing a jack for HDMI.
    
    Fix this by storing the hdmi connector status regardless of jack being set
    or not and report the last status when jack gets set.
    
    With this, the initial state is reported correctly even if it is
    disconnected. This was not done initially and is also a fix.
    
    Fixes: 15be353d55f9 ("ASoC: hdmi-codec: register hpd callback on component probe")
    Reported-by: Zhengqiao Xia <xiazhengqiao@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
    Closes: https://lore.kernel.org/alsa-devel/CADYyEwTNyY+fR9SgfDa-g6iiDwkU3MUdPVCYexs2_3wbcM8_vg@xxxxxxxxxxxxxx/
    Cc: Hsin-Yi Wang <hsinyi@xxxxxxxxxx>
    Tested-by: Zhengqiao Xia <xiazhengqiao@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Jerome Brunet <jbrunet@xxxxxxxxxxxx>
    Link: https://msgid.link/r/20231218145655.134929-1-jbrunet@xxxxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c
index 4d3c3365488a2..d8259afc60b08 100644
--- a/sound/soc/codecs/hdmi-codec.c
+++ b/sound/soc/codecs/hdmi-codec.c
@@ -834,8 +834,9 @@ static int hdmi_dai_probe(struct snd_soc_dai *dai)
 static void hdmi_codec_jack_report(struct hdmi_codec_priv *hcp,
 				   unsigned int jack_status)
 {
-	if (hcp->jack && jack_status != hcp->jack_status) {
-		snd_soc_jack_report(hcp->jack, jack_status, SND_JACK_LINEOUT);
+	if (jack_status != hcp->jack_status) {
+		if (hcp->jack)
+			snd_soc_jack_report(hcp->jack, jack_status, SND_JACK_LINEOUT);
 		hcp->jack_status = jack_status;
 	}
 }
@@ -864,6 +865,13 @@ static int hdmi_codec_set_jack(struct snd_soc_component *component,
 
 	if (hcp->hcd.ops->hook_plugged_cb) {
 		hcp->jack = jack;
+
+		/*
+		 * 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);
+
 		return 0;
 	}
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux