]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00182456-3 HDMI VIDEO: abort audio when unblank and plugout
authorChen Liangjun <b36089@freescale.com>
Tue, 21 Aug 2012 09:28:50 +0000 (17:28 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:35:20 +0000 (08:35 +0200)
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 <b36089@freescale.com>
drivers/video/mxc_hdmi.c

index 0144f7f2cc69b02bc7da4b9d797a92a25bb80919..1832a5998d2d23efc35d79d106d8a817d9d89dbd 100644 (file)
@@ -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);