From: yicheng shen Date: Thu, 8 Aug 2019 07:27:13 +0000 (-0400) Subject: hdmirx: update eARC port and 5V high or low status to audio [1/1] X-Git-Tag: hardkernel-4.9.236-104~782 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=934eeae79577ec16e0c723266a38445e40ca96a6;p=platform%2Fkernel%2Flinux-amlogic.git hdmirx: update eARC port and 5V high or low status to audio [1/1] PD#SWPL-12446 Problem: Need update eARC port and 5V high or low status to audio Solution: update eARC port and 5V high or low status to audio Verify: TM2 Change-Id: Ie9891e045010e2020aa9ec64922f2810f6a0cb18 Signed-off-by: yicheng shen --- diff --git a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h index 1810dcd..ab43a5d 100644 --- a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h +++ b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h @@ -34,7 +34,7 @@ #include "hdmi_rx_edid.h" -#define RX_VER0 "ver.2019-06-14" +#define RX_VER0 "ver.2019-08-08" /* * * @@ -453,6 +453,7 @@ struct rx_s { struct emp_buff empbuff; uint32_t arc_port; enum edid_ver_e edid_ver; + bool arc_5vsts; }; struct _hdcp_ksv { diff --git a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_wrapper.c b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_wrapper.c index cbae377..15bee3e 100644 --- a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_wrapper.c +++ b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_wrapper.c @@ -35,6 +35,7 @@ #include #include #include +#include /* Local include */ #include "hdmi_rx_repeater.h" @@ -1962,6 +1963,7 @@ static void rx_cable_clk_monitor(void) pre_sts = sts; } } + /* ---------------------------------------------------------- */ /* func: port A,B,C,D hdmitx-5v monitor & HPD control */ /* note: G9TV portD no used */ @@ -1970,6 +1972,7 @@ void rx_5v_monitor(void) { static uint8_t check_cnt; uint8_t tmp_5v = rx_get_hdmi5v_sts(); + bool tmp_arc_5v; if (auto_switch_off) tmp_5v = 0x0f; @@ -1997,6 +2000,13 @@ void rx_5v_monitor(void) else hdcp_mode_sel = false; } + if (rx.chip_id == CHIP_ID_TM2) { + tmp_arc_5v = (pwr_sts >> rx.arc_port) & 1; + if (rx.arc_5vsts != tmp_arc_5v) { + rx.arc_5vsts = tmp_arc_5v; + earc_hdmirx_hpdst(rx.arc_port, rx.arc_5vsts); + } + } } /* diff --git a/include/linux/amlogic/media/sound/hdmi_earc.h b/include/linux/amlogic/media/sound/hdmi_earc.h index 97e30af..36a8c5f 100644 --- a/include/linux/amlogic/media/sound/hdmi_earc.h +++ b/include/linux/amlogic/media/sound/hdmi_earc.h @@ -18,9 +18,8 @@ #ifndef __HDMI_EARC_H__ #define __HDMI_EARC_H__ +extern void earc_hdmirx_hpdst(int port, bool st); + extern void earc_hdmitx_hpdst(bool st); -void earc_hdmitx_hpdst(bool st) -{ -}; #endif diff --git a/sound/soc/amlogic/auge/earc.c b/sound/soc/amlogic/auge/earc.c index c284417..b013674 100644 --- a/sound/soc/amlogic/auge/earc.c +++ b/sound/soc/amlogic/auge/earc.c @@ -65,6 +65,16 @@ struct earc { int sysclk_freq; }; +#include + +void earc_hdmirx_hpdst(int earc_port, bool st) +{ +}; + +void earc_hdmitx_hpdst(bool st) +{ +}; + #define PREALLOC_BUFFER_MAX (256 * 1024) #define EARC_RATES (SNDRV_PCM_RATE_8000_192000)