X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FCECProcessor.cpp;h=94651fcb45d5c00de77b8323efaca191eb1d38c4;hb=56035c8658776a144f63cdfd35ae32d93aacc987;hp=b07f2ddc72bbfcc6c61d85c440b814bc4707ca20;hpb=b4b1b49b0904e9c0cdeaa466f21ed61ccf41cb92;p=deb_libcec.git diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index b07f2dd..94651fc 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -152,8 +152,10 @@ bool CCECProcessor::Start(const char *strPort, uint16_t iBaudRate /* = 38400 */, } lock.Leave(); - if (SetAckMask(m_logicalAddresses.AckMask()) && - SetHDMIPort(m_iBaseDevice, m_iHDMIPort, true)) + + m_busDevices[CECDEVICE_TV]->GetVendorId(); + + if (SetHDMIPort(m_iBaseDevice, m_iHDMIPort, true)) { m_controller->AddLog(CEC_LOG_DEBUG, "processor thread started"); m_busScan = new CCECBusScan(this); @@ -260,8 +262,7 @@ void *CCECProcessor::Process(void) } else { - m_busDevices[CECDEVICE_TV]->GetVendorId(); - m_busDevices[m_logicalAddresses.primary]->TransmitVendorID(CECDEVICE_TV, false); + SetAckMask(m_logicalAddresses.AckMask()); CLockObject lock(&m_mutex); m_bStarted = true; @@ -395,15 +396,15 @@ bool CCECProcessor::SetHDMIPort(cec_logical_address iBaseDevice, uint8_t iPort, { bool bReturn(false); - CStdString strLog; - strLog.Format("setting HDMI port to %d on device %s (%d)", iPort, ToString(iBaseDevice), (int)iBaseDevice); - AddLog(CEC_LOG_DEBUG, strLog); - m_iBaseDevice = iBaseDevice; m_iHDMIPort = iPort; if (!m_bStarted && !bForce) return true; + CStdString strLog; + strLog.Format("setting HDMI port to %d on device %s (%d)", iPort, ToString(iBaseDevice), (int)iBaseDevice); + AddLog(CEC_LOG_DEBUG, strLog); + uint16_t iPhysicalAddress(0); iPhysicalAddress = m_busDevices[iBaseDevice]->GetPhysicalAddress(); uint16_t iPos = 0;