From c6226da822b91f02e04989acb252215bb3b84ff2 Mon Sep 17 00:00:00 2001 From: Chen Liangjun Date: Tue, 21 Aug 2012 17:28:50 +0800 Subject: [PATCH] ENGR00182456-3 HDMI VIDEO: abort audio when unblank and plugout In this patch: 1. Close audio PCM stream when video unblank and plugout event happens. 2. Set HDMI cable and blank state into HDMI core driver when plug/unplug, blank/unblank events happens. Signed-off-by: Chen Liangjun --- drivers/video/mxc_hdmi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/video/mxc_hdmi.c b/drivers/video/mxc_hdmi.c index 0144f7f2cc69..1832a5998d2d 100644 --- a/drivers/video/mxc_hdmi.c +++ b/drivers/video/mxc_hdmi.c @@ -1769,10 +1769,13 @@ static void hotplug_worker(struct work_struct *work) #ifdef CONFIG_MXC_HDMI_CEC mxc_hdmi_cec_handle(0x80); #endif + hdmi_set_cable_state(1); } else if (!(phy_int_pol & HDMI_PHY_HPD)) { /* Plugout event */ dev_dbg(&hdmi->pdev->dev, "EVENT=plugout\n"); + hdmi_set_cable_state(0); + mxc_hdmi_abort_stream(); mxc_hdmi_cable_disconnected(hdmi); /* Make HPD intr active high to capture plugin event */ @@ -2061,10 +2064,13 @@ static int mxc_hdmi_fb_event(struct notifier_block *nb, if (hdmi->fb_reg && hdmi->cable_plugin) mxc_hdmi_setup(hdmi, val); + hdmi_set_blank_state(1); } else if (*((int *)event->data) != hdmi->blank) { dev_dbg(&hdmi->pdev->dev, "event=FB_EVENT_BLANK - BLANK\n"); + hdmi_set_blank_state(0); + mxc_hdmi_abort_stream(); mxc_hdmi_phy_disable(hdmi); -- 2.39.5