X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fimplementations%2FSLCommandHandler.cpp;h=6e4b92f866874f3913acf285ee7365c9dbd943e2;hb=6359ffd1d200e28f5cf7ae574960e535e28b14d7;hp=bf3ee43006bdf6db6126abc2a3e52012b8d4217e;hpb=8fa354734e6dd2fd2e6fae68f7bbaf7ea84cbdfd;p=deb_libcec.git diff --git a/src/lib/implementations/SLCommandHandler.cpp b/src/lib/implementations/SLCommandHandler.cpp index bf3ee43..6e4b92f 100644 --- a/src/lib/implementations/SLCommandHandler.cpp +++ b/src/lib/implementations/SLCommandHandler.cpp @@ -75,7 +75,7 @@ bool CSLCommandHandler::HandleVendorCommand(const cec_command &command) cec_command response; cec_command::Format(response, command.destination, command.initiator, CEC_OPCODE_VENDOR_COMMAND, m_iTransmitTimeout); response.PushBack(SL_COMMAND_CONNECT_ACCEPT); - response.PushBack(m_busDevice->GetProcessor()->GetLogicalAddresses().primary); + response.PushBack((uint8_t)m_busDevice->GetProcessor()->GetLogicalAddresses().primary); Transmit(response); /* set deck status for the playback device */ @@ -201,6 +201,11 @@ bool CSLCommandHandler::InitHandler(void) m_busDevice->GetProcessor()->SetStandardLineTimeout(3); m_busDevice->GetProcessor()->SetRetryLineTimeout(3); + /* increase the number of retries because the tv is keeping the bus busy at times */ + m_iTransmitWait = 2000; + m_iTransmitRetries = 4; + m_iTransmitTimeout = 500; + CCECBusDevice *primary = m_busDevice->GetProcessor()->m_busDevices[m_busDevice->GetProcessor()->GetLogicalAddresses().primary]; if (m_busDevice->GetLogicalAddress() != primary->GetLogicalAddress()) primary->SetVendorId(CEC_VENDOR_LG, false); @@ -224,11 +229,9 @@ bool CSLCommandHandler::InitHandler(void) snprintf(lang.language, 4, "eng"); m_busDevice->SetMenuLanguage(lang); - /* increase the transmit timeout because the tv is keeping the bus busy at times */ - m_iTransmitTimeout = 5000; - if (m_busDevice->GetLogicalAddress() == CECDEVICE_TV) { + m_busDevice->GetProcessor()->SetActiveSource(m_busDevice->GetProcessor()->GetLogicalAddresses().primary); /* LG TVs only route keypresses when the deck status is set to 0x20 */ cec_logical_addresses addr = m_busDevice->GetProcessor()->GetLogicalAddresses(); for (uint8_t iPtr = 0; iPtr < 15; iPtr++)