author | Wei Wang <wei.wang@amlogic.com> | 2017-05-17 11:20:20 (GMT) |
---|---|---|
committer | Wei Wang <wei.wang@amlogic.com> | 2017-05-17 11:20:20 (GMT) |
commit | 1282cd1fdf52c91eceed737def2b3f0d6cbe61ba (patch) | |
tree | dd56c5315888f210121653e74205b4bf1fe1c00b | |
parent | 9a4204e9540669efafa5a6b56913e05b064e2e1b (diff) | |
download | tv_input-1282cd1fdf52c91eceed737def2b3f0d6cbe61ba.zip tv_input-1282cd1fdf52c91eceed737def2b3f0d6cbe61ba.tar.gz tv_input-1282cd1fdf52c91eceed737def2b3f0d6cbe61ba.tar.bz2 |
pd#143978:support hdmi4
Change-Id: Ife34536d313f24f68801833b5bf5095491918a59
-rw-r--r-- | TvPlay.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -131,6 +131,9 @@ int TvPlay::getHdmiPorts() } int TvPlay::getHdmiPort(tv_source_input_t source_input) { - return mHdmiPorts == 0 ? 0 : 0x3 & (mHdmiPorts >> (2* (source_input - SOURCE_HDMI1))); + int max_port_num = 3; + if ( (source_input - SOURCE_HDMI1) > (max_port_num-1)) + max_port_num = (max_port_num << 1) + 1; + return mHdmiPorts == 0 ? 0 : max_port_num & (mHdmiPorts >> (2* (source_input - SOURCE_HDMI1))); } |