hdmitx: update extcon_hdmi_audio after resume
authorZongdong Jiao <zongdong.jiao@amlogic.com>
Thu, 5 Jul 2018 12:08:51 +0000 (20:08 +0800)
committerYixun Lan <yixun.lan@amlogic.com>
Tue, 10 Jul 2018 08:54:55 +0000 (01:54 -0700)
PD#169594: hdmitx: update extcon_hdmi_audio after resume
Under some corner case, extcon_hdmi_audio maybe as 0.

Change-Id: I497b5f8538ffd329e1fee4fcc44c09944e77cf64
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c

index 402c08e..8389ee0 100644 (file)
@@ -181,6 +181,8 @@ static void hdmitx_late_resume(struct early_suspend *h)
                hdmitx_device.hpd_state =
                !!(hdmitx_device.HWOp.CntlMisc(&hdmitx_device,
                MISC_HPD_GPI_ST, 0));
+
+               pr_info("hdmitx hpd state: %d\n", hdmitx_device.hpd_state);
                hdmitx_notify_hpd(hdmitx_device.hpd_state);
 
                /*force to get EDID after resume for Amplifer Power case*/
@@ -195,6 +197,8 @@ static void hdmitx_late_resume(struct early_suspend *h)
                        hdmitx_device.hpd_state);
                extcon_set_state_sync(hdmitx_extcon_power, EXTCON_DISP_HDMI,
                        hdmitx_device.hpd_state);
+               extcon_set_state_sync(hdmitx_extcon_audio, EXTCON_DISP_HDMI,
+                       hdmitx_device.hpd_state);
 
                pr_info("amhdmitx: late resume module %d\n", __LINE__);
                phdmi->HWOp.Cntl((struct hdmitx_dev *)h->param,