3 files changed, 18 insertions, 3 deletions
diff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c index ebf95ab..d791870 100644 --- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c +++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c @@ -2744,7 +2744,6 @@ static void hdmitx_hpd_plugin_handler(struct work_struct *work) hdmitx_notify_hpd(hdev->hpd_state); extcon_set_state_sync(hdmitx_extcon_hdmi, EXTCON_DISP_HDMI, 1); - extcon_set_state_sync(hdmitx_excton_audio, EXTCON_DISP_HDMI, 1); mutex_unlock(&setclk_mutex); } @@ -2762,6 +2761,17 @@ static void clear_hdr_info(struct hdmitx_dev *hdev) } } +static void hdmitx_aud_hpd_plug_handler(struct work_struct *work) +{ + int st; + struct hdmitx_dev *hdev = container_of((struct delayed_work *)work, + struct hdmitx_dev, work_aud_hpd_plug); + + st = hdev->HWOp.CntlMisc(hdev, MISC_HPD_GPI_ST, 0); + pr_info("hdmitx_aud_hpd_plug_handler state:%d\n", st); + extcon_set_state_sync(hdmitx_excton_audio, EXTCON_DISP_HDMI, st); +} + static void hdmitx_hpd_plugout_handler(struct work_struct *work) { struct hdmitx_dev *hdev = container_of((struct delayed_work *)work, @@ -2795,9 +2805,7 @@ static void hdmitx_hpd_plugout_handler(struct work_struct *work) hdmitx_edid_ram_buffer_clear(hdev); hdev->hpd_state = 0; hdmitx_notify_hpd(hdev->hpd_state); - extcon_set_state_sync(hdmitx_extcon_hdmi, EXTCON_DISP_HDMI, 0); - extcon_set_state_sync(hdmitx_excton_audio, EXTCON_DISP_HDMI, 0); mutex_unlock(&setclk_mutex); } @@ -2856,6 +2864,8 @@ static int hdmi_task_handle(void *data) hdmitx_hpd_plugin_handler); INIT_DELAYED_WORK(&hdmitx_device->work_hpd_plugout, hdmitx_hpd_plugout_handler); + INIT_DELAYED_WORK(&hdmitx_device->work_aud_hpd_plug, + hdmitx_aud_hpd_plug_handler); INIT_WORK(&hdmitx_device->work_internal_intr, hdmitx_internal_intr_handler); |