mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
hdmi_tx: solve audiopolicy update at flash plug issue[1/1]
PD#155057: add a delay of 2000ms for disconect to filt the flash plug Change-Id: Ic5402ccf9f03293a87ee0321c7f8754b2a1c5310 Signed-off-by: Lianlian Zhu <lianlian.zhu@amlogic.com>
This commit is contained in:
@@ -2696,7 +2696,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_extcon_audio, EXTCON_DISP_HDMI, 1);
|
||||
|
||||
mutex_unlock(&setclk_mutex);
|
||||
}
|
||||
@@ -2714,6 +2713,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_extcon_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,
|
||||
@@ -2746,9 +2756,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_extcon_audio, EXTCON_DISP_HDMI, 0);
|
||||
mutex_unlock(&setclk_mutex);
|
||||
}
|
||||
|
||||
@@ -2807,6 +2815,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);
|
||||
|
||||
|
||||
@@ -642,6 +642,8 @@ static irqreturn_t intr_handler(int irq, void *dev)
|
||||
}
|
||||
/* HPD rising */
|
||||
if (data32 & (1 << 1)) {
|
||||
queue_delayed_work(hdev->hdmi_wq,
|
||||
&hdev->work_aud_hpd_plug, HZ / 2);
|
||||
hdev->hdmitx_event |= HDMI_TX_HPD_PLUGIN;
|
||||
hdev->hdmitx_event &= ~HDMI_TX_HPD_PLUGOUT;
|
||||
queue_delayed_work(hdev->hdmi_wq,
|
||||
@@ -649,6 +651,8 @@ static irqreturn_t intr_handler(int irq, void *dev)
|
||||
}
|
||||
/* HPD falling */
|
||||
if (data32 & (1 << 2)) {
|
||||
queue_delayed_work(hdev->hdmi_wq,
|
||||
&hdev->work_aud_hpd_plug, 2 * HZ);
|
||||
hdev->hdmitx_event |= HDMI_TX_HPD_PLUGOUT;
|
||||
hdev->hdmitx_event &= ~HDMI_TX_HPD_PLUGIN;
|
||||
queue_delayed_work(hdev->hdmi_wq,
|
||||
|
||||
@@ -233,6 +233,7 @@ struct hdmitx_dev {
|
||||
struct pinctrl_state *pinctrl_default;
|
||||
struct delayed_work work_hpd_plugin;
|
||||
struct delayed_work work_hpd_plugout;
|
||||
struct delayed_work work_aud_hpd_plug;
|
||||
struct delayed_work work_rxsense;
|
||||
struct work_struct work_internal_intr;
|
||||
struct work_struct work_hdr;
|
||||
|
||||
Reference in New Issue
Block a user