fix hdmi cec

This commit is contained in:
TangoCash
2022-11-19 13:25:46 +01:00
committed by Thilo Graf
parent d58a4144aa
commit 4761afe370

View File

@@ -268,7 +268,7 @@ void hdmi_cec::SendActiveSource(bool force)
message.data[2] = physicalAddress[1]; message.data[2] = physicalAddress[1];
message.length = 3; message.length = 3;
if ((CNeutrinoApp::getInstance()->getMode() != NeutrinoModes::mode_standby && active_source) || force) if (active_source || force)
SendCECMessage(message); SendCECMessage(message);
} }
@@ -562,7 +562,7 @@ void hdmi_cec::run()
txmessage.initiator = logicalAddress; txmessage.initiator = logicalAddress;
txmessage.destination = rxmessage.initiator; txmessage.destination = rxmessage.initiator;
txmessage.data[0] = CEC_OPCODE_CEC_VERSION; txmessage.data[0] = CEC_OPCODE_CEC_VERSION;
txmessage.data[1] = CEC_OP_CEC_VERSION_2_0; txmessage.data[1] = CEC_OP_CEC_VERSION_1_4;
txmessage.length = 2; txmessage.length = 2;
SendCECMessage(txmessage); SendCECMessage(txmessage);
break; break;
@@ -599,6 +599,9 @@ void hdmi_cec::run()
case CEC_OPCODE_REQUEST_ACTIVE_SOURCE: case CEC_OPCODE_REQUEST_ACTIVE_SOURCE:
{ {
dprintf(DEBUG_NORMAL, CYAN"[CEC] active_source=%s neutrino standby=%s\n"NORMAL, active_source ? "yes" : "no", CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_standby ? "yes" : "no");
if (CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_standby && active_source)
g_RCInput->postMsg(NeutrinoMessages::STANDBY_OFF, (neutrino_msg_data_t)"cec");
SendActiveSource(); SendActiveSource();
break; break;
} }