cec: opcode 0x80 means the stream path changed, not the physical address
[deb_libcec.git] / src / lib / CECProcessor.cpp
index 8238de77ca8d318cfd35addcc52b589673bae08c..f03f09bef20d7077282fc97df821e04a48b26098 100644 (file)
@@ -143,7 +143,7 @@ bool CCECProcessor::TryLogicalAddress(cec_logical_address address, const char *s
   AddLog(CEC_LOG_DEBUG, strLog);
 
   SetAckMask(0x1 << address);
-  if (!m_busDevices[address]->PollDevice(address))
+  if (!m_busDevices[address]->TransmitPoll(address))
   {
     strLog.Format("using logical address '%s'", strLabel);
     AddLog(CEC_LOG_NOTICE, strLog);
@@ -155,7 +155,7 @@ bool CCECProcessor::TryLogicalAddress(cec_logical_address address, const char *s
     m_logicalAddresses.set(address);
 
     // TODO
-    m_busDevices[address]->SetPhysicalAddress(CEC_DEFAULT_PHYSICAL_ADDRESS + iIndex);
+    m_busDevices[address]->SetPhysicalAddress(CEC_DEFAULT_PHYSICAL_ADDRESS + (iIndex * 0x100));
 
     return true;
   }
@@ -354,7 +354,7 @@ bool CCECProcessor::SwitchMonitoring(bool bEnable)
 bool CCECProcessor::PollDevice(cec_logical_address iAddress)
 {
   if (iAddress != CECDEVICE_UNKNOWN && m_busDevices[iAddress])
-    return m_busDevices[iAddress]->PollDevice();
+    return m_busDevices[m_logicalAddresses.primary]->TransmitPoll(iAddress);
   return false;
 }