repositories
/
deb_libcec.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a7733ae
)
cec: poll doesn't have an opcode. bugzid: 591
author
Lars Op den Kamp
<lars@opdenkamp.eu>
Mon, 19 Mar 2012 11:46:32 +0000
(12:46 +0100)
committer
Lars Op den Kamp
<lars@opdenkamp.eu>
Mon, 19 Mar 2012 11:46:32 +0000
(12:46 +0100)
src/lib/CECProcessor.cpp
patch
|
blob
|
blame
|
history
src/lib/adapter/USBCECAdapterCommunication.cpp
patch
|
blob
|
blame
|
history
src/lib/devices/CECBusDevice.cpp
patch
|
blob
|
blame
|
history
src/lib/implementations/CECCommandHandler.cpp
patch
|
blob
|
blame
|
history
src/lib/implementations/CECCommandHandler.h
patch
|
blob
|
blame
|
history
diff --git
a/src/lib/CECProcessor.cpp
b/src/lib/CECProcessor.cpp
index a4218406f620013555cb63ee1b0d93bdfbb55907..23afdb623bdfb7c0217fbcd289af5bc1fd129ed7 100644
(file)
--- a/
src/lib/CECProcessor.cpp
+++ b/
src/lib/CECProcessor.cpp
@@
-912,7
+912,9
@@
void CCECProcessor::TransmitAbort(cec_logical_address address, cec_opcode opcode
void CCECProcessor::ParseCommand(const cec_command &command)
{
CStdString dataStr;
void CCECProcessor::ParseCommand(const cec_command &command)
{
CStdString dataStr;
- dataStr.Format(">> %1x%1x:%02x", command.initiator, command.destination, command.opcode);
+ dataStr.Format(">> %1x%1x", command.initiator, command.destination);
+ if (command.opcode_set == 1)
+ dataStr.AppendFormat(":%02x", command.opcode);
for (uint8_t iPtr = 0; iPtr < command.parameters.size; iPtr++)
dataStr.AppendFormat(":%02x", (unsigned int)command.parameters[iPtr]);
CLibCEC::AddLog(CEC_LOG_TRAFFIC, dataStr.c_str());
for (uint8_t iPtr = 0; iPtr < command.parameters.size; iPtr++)
dataStr.AppendFormat(":%02x", (unsigned int)command.parameters[iPtr]);
CLibCEC::AddLog(CEC_LOG_TRAFFIC, dataStr.c_str());
diff --git
a/src/lib/adapter/USBCECAdapterCommunication.cpp
b/src/lib/adapter/USBCECAdapterCommunication.cpp
index 2f1247410e6f099013fcce5a20097482ae4b6477..64212cb18a99cb01823c0326d5fd42e88ee8250d 100644
(file)
--- a/
src/lib/adapter/USBCECAdapterCommunication.cpp
+++ b/
src/lib/adapter/USBCECAdapterCommunication.cpp
@@
-415,8
+415,9
@@
bool CUSBCECAdapterCommunication::ParseMessage(const CCECAdapterMessage &msg)
}
if (m_currentframe.ack == 0x1)
{
}
if (m_currentframe.ack == 0x1)
{
- m_lastInitiator = m_currentframe.initiator;
- m_processor->HandlePoll(m_currentframe.initiator, m_currentframe.destination);
+ m_lastInitiator = m_currentframe.initiator;
+ m_currentframe.eom = 1;
+ bEom = true;
}
}
break;
}
}
break;
@@
-441,7
+442,7
@@
bool CUSBCECAdapterCommunication::ParseMessage(const CCECAdapterMessage &msg)
}
CLibCEC::AddLog(bIsError ? CEC_LOG_WARNING : CEC_LOG_DEBUG, msg.ToString());
}
CLibCEC::AddLog(bIsError ? CEC_LOG_WARNING : CEC_LOG_DEBUG, msg.ToString());
- return msg.IsEOM();
+ return msg.IsEOM()
|| bEom
;
}
uint16_t CUSBCECAdapterCommunication::GetFirmwareVersion(void)
}
uint16_t CUSBCECAdapterCommunication::GetFirmwareVersion(void)
diff --git
a/src/lib/devices/CECBusDevice.cpp
b/src/lib/devices/CECBusDevice.cpp
index 845cb07d6426af2ab801fa7ba674a439c7628517..429d73fbd162f137870f8c5ed3b479c7fbe80504 100644
(file)
--- a/
src/lib/devices/CECBusDevice.cpp
+++ b/
src/lib/devices/CECBusDevice.cpp
@@
-88,7
+88,7
@@
bool CCECBusDevice::HandleCommand(const cec_command &command)
m_iLastActive = GetTimeMs();
/* don't call GetStatus() here, just read the value with the mutex locked */
m_iLastActive = GetTimeMs();
/* don't call GetStatus() here, just read the value with the mutex locked */
- if (m_deviceStatus != CEC_DEVICE_STATUS_HANDLED_BY_LIBCEC)
+ if (m_deviceStatus != CEC_DEVICE_STATUS_HANDLED_BY_LIBCEC
&& command.opcode_set == 1
)
m_deviceStatus = CEC_DEVICE_STATUS_PRESENT;
MarkBusy();
m_deviceStatus = CEC_DEVICE_STATUS_PRESENT;
MarkBusy();
diff --git
a/src/lib/implementations/CECCommandHandler.cpp
b/src/lib/implementations/CECCommandHandler.cpp
index a9b4c40c57f2c7f483b9e1036ee60357a233fc88..d0aa2b32937ef3d82785729ee87e4fcc2f33c32f 100644
(file)
--- a/
src/lib/implementations/CECCommandHandler.cpp
+++ b/
src/lib/implementations/CECCommandHandler.cpp
@@
-61,6
+61,9
@@
CCECCommandHandler::~CCECCommandHandler(void)
bool CCECCommandHandler::HandleCommand(const cec_command &command)
{
bool CCECCommandHandler::HandleCommand(const cec_command &command)
{
+ if (command.opcode_set == 0)
+ return HandlePoll(command);
+
bool bHandled(true);
CLibCEC::AddCommand(command);
bool bHandled(true);
CLibCEC::AddCommand(command);
@@
-371,6
+374,12
@@
bool CCECCommandHandler::HandleMenuRequest(const cec_command &command)
return false;
}
return false;
}
+bool CCECCommandHandler::HandlePoll(const cec_command &command)
+{
+ m_busDevice->HandlePoll(command.initiator);
+ return true;
+}
+
bool CCECCommandHandler::HandleReportAudioStatus(const cec_command &command)
{
if (command.parameters.size == 1)
bool CCECCommandHandler::HandleReportAudioStatus(const cec_command &command)
{
if (command.parameters.size == 1)
diff --git
a/src/lib/implementations/CECCommandHandler.h
b/src/lib/implementations/CECCommandHandler.h
index 4cfb81fbd1510d932777b4e9a10c17554ce3aa3a..6cf16a4b4615290b52507c8833498917406b4701 100644
(file)
--- a/
src/lib/implementations/CECCommandHandler.h
+++ b/
src/lib/implementations/CECCommandHandler.h
@@
-174,6
+174,7
@@
namespace CEC
virtual bool HandleGiveSystemAudioModeStatus(const cec_command &command);
virtual bool HandleImageViewOn(const cec_command &command);
virtual bool HandleMenuRequest(const cec_command &command);
virtual bool HandleGiveSystemAudioModeStatus(const cec_command &command);
virtual bool HandleImageViewOn(const cec_command &command);
virtual bool HandleMenuRequest(const cec_command &command);
+ virtual bool HandlePoll(const cec_command &command);
virtual bool HandleReportAudioStatus(const cec_command &command);
virtual bool HandleReportPhysicalAddress(const cec_command &command);
virtual bool HandleReportPowerStatus(const cec_command &command);
virtual bool HandleReportAudioStatus(const cec_command &command);
virtual bool HandleReportPhysicalAddress(const cec_command &command);
virtual bool HandleReportPowerStatus(const cec_command &command);