diff --git a/arch/arm/cpu/armv8/g12b/firmware/scp_task/hdmi_cec_arc.c b/arch/arm/cpu/armv8/g12b/firmware/scp_task/hdmi_cec_arc.c index d3c7ba52aad..ea4ead52565 100644 --- a/arch/arm/cpu/armv8/g12b/firmware/scp_task/hdmi_cec_arc.c +++ b/arch/arm/cpu/armv8/g12b/firmware/scp_task/hdmi_cec_arc.c @@ -451,7 +451,7 @@ void cec_routing_change(void) { unsigned char phy_addr_ab = (readl(P_AO_DEBUG_REG1) >> 8) & 0xff; unsigned char phy_addr_cd = readl(P_AO_DEBUG_REG1) & 0xff; - cec_dbg_print(", phy_addr_ab:0x", phy_addr_ab); + cec_dbg_print("0x80, phy_addr_ab:0x", phy_addr_ab); cec_dbg_print(", phy_addr_cd:0x", phy_addr_cd); cec_dbg_print(", msg[4]:0x", cec_msg.buf[cec_msg.rx_read_pos].msg[4]); cec_dbg_print(", msg[5]:0x", cec_msg.buf[cec_msg.rx_read_pos].msg[5]); @@ -467,6 +467,26 @@ void cec_routing_change(void) } } +static void cec_routing_information(void) +{ + unsigned char phy_addr_ab = (readl(P_AO_DEBUG_REG1) >> 8) & 0xff; + unsigned char phy_addr_cd = readl(P_AO_DEBUG_REG1) & 0xff; + cec_dbg_print("0x81, phy_addr_ab:0x", phy_addr_ab); + cec_dbg_print(", phy_addr_cd:0x", phy_addr_cd); + cec_dbg_print(", msg[2]:0x", cec_msg.buf[cec_msg.rx_read_pos].msg[2]); + cec_dbg_print(", msg[3]:0x", cec_msg.buf[cec_msg.rx_read_pos].msg[3]); + cec_dbg_prints("\n"); + + if ((hdmi_cec_func_config >> CEC_FUNC_MASK) & 0x1) { + if ((hdmi_cec_func_config >> STREAMPATH_POWER_ON_MASK) & 0x1) { + /* wake up if routing destination is self */ + if ((phy_addr_ab == cec_msg.buf[cec_msg.rx_read_pos].msg[2]) && + (phy_addr_cd == cec_msg.buf[cec_msg.rx_read_pos].msg[3])) + cec_msg.cec_power = 0x1; + } + } +} + static void cec_device_vendor_id(void) { unsigned char msg[5]; @@ -591,6 +611,9 @@ static unsigned int cec_handle_message(void) case CEC_OC_ROUTING_CHANGE: cec_routing_change(); break; + case CEC_OC_ROUTING_INFORMATION: + cec_routing_information(); + break; case CEC_OC_GIVE_DEVICE_POWER_STATUS: cec_report_device_power_status(source); break;