summaryrefslogtreecommitdiff
authoryicheng shen <yicheng.shen@amlogic.com>2019-08-08 07:27:13 (GMT)
committer Jianxin Pan <jianxin.pan@amlogic.com>2019-08-16 03:07:49 (GMT)
commit934eeae79577ec16e0c723266a38445e40ca96a6 (patch)
tree350a16e5ccb71c425cdcc156957491789473896e
parentb77519dcee700fd5cf2df55c4f5f8bf2bbe2ae20 (diff)
downloadcommon-934eeae79577ec16e0c723266a38445e40ca96a6.zip
common-934eeae79577ec16e0c723266a38445e40ca96a6.tar.gz
common-934eeae79577ec16e0c723266a38445e40ca96a6.tar.bz2
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 <yicheng.shen@amlogic.com>
Diffstat
-rw-r--r--drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h3
-rw-r--r--drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_wrapper.c10
-rw-r--r--include/linux/amlogic/media/sound/hdmi_earc.h5
-rw-r--r--sound/soc/amlogic/auge/earc.c10
4 files changed, 24 insertions, 4 deletions
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 <linux/delay.h>
#include <linux/of_gpio.h>
#include <linux/amlogic/media/frame_provider/tvin/tvin.h>
+#include <linux/amlogic/media/sound/hdmi_earc.h>
/* 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 <linux/amlogic/media/sound/hdmi_earc.h>
+
+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)