repositories
/
deb_libcec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cec: fixed - mark a device as active source before transmitting the active source...
[deb_libcec.git]
/
src
/
lib
/
implementations
/
SLCommandHandler.cpp
diff --git
a/src/lib/implementations/SLCommandHandler.cpp
b/src/lib/implementations/SLCommandHandler.cpp
index b1f16442489399e8875d45e017a49d81bf5df2fb..0f007176d623f9e83732abbef114790b97446d28 100644
(file)
--- a/
src/lib/implementations/SLCommandHandler.cpp
+++ b/
src/lib/implementations/SLCommandHandler.cpp
@@
-53,6
+53,7
@@
CSLCommandHandler::CSLCommandHandler(CCECBusDevice *busDevice) :
m_bSLEnabled(false),
m_bVendorIdSent(false)
{
m_bSLEnabled(false),
m_bVendorIdSent(false)
{
+ /* TODO set to powered off until we fixed the connect on start loop issue */
m_processor->m_busDevices[m_processor->GetLogicalAddresses().primary]->m_powerStatus = CEC_POWER_STATUS_STANDBY;
}
m_processor->m_busDevices[m_processor->GetLogicalAddresses().primary]->m_powerStatus = CEC_POWER_STATUS_STANDBY;
}
@@
-67,19
+68,19
@@
bool CSLCommandHandler::HandleVendorCommand(const cec_command &command)
else if (command.parameters.size == 2 &&
command.parameters[0] == SL_COMMAND_POWER_ON)
{
else if (command.parameters.size == 2 &&
command.parameters[0] == SL_COMMAND_POWER_ON)
{
- HandleVendorCommand
03
(command);
+ HandleVendorCommand
PowerOn
(command);
return true;
}
else if (command.parameters.size == 2 &&
command.parameters[0] == SL_COMMAND_CONNECT_REQUEST)
{
return true;
}
else if (command.parameters.size == 2 &&
command.parameters[0] == SL_COMMAND_CONNECT_REQUEST)
{
- HandleVendorCommand
04
(command);
+ HandleVendorCommand
SLConnect
(command);
return true;
}
else if (command.parameters.size == 1 &&
command.parameters[0] == SL_COMMAND_REQUEST_POWER_STATUS)
{
return true;
}
else if (command.parameters.size == 1 &&
command.parameters[0] == SL_COMMAND_REQUEST_POWER_STATUS)
{
- HandleVendorCommand
A0
(command);
+ HandleVendorCommand
PowerOnStatus
(command);
return true;
}
return true;
}
@@
-118,7
+119,7
@@
void CSLCommandHandler::TransmitVendorCommand0205(const cec_logical_address iSou
Transmit(response);
}
Transmit(response);
}
-void CSLCommandHandler::TransmitVendorCommand0
4
(const cec_logical_address iSource, const cec_logical_address iDestination)
+void CSLCommandHandler::TransmitVendorCommand0
5
(const cec_logical_address iSource, const cec_logical_address iDestination)
{
m_bSLEnabled = true;
cec_command response;
{
m_bSLEnabled = true;
cec_command response;
@@
-128,7
+129,7
@@
void CSLCommandHandler::TransmitVendorCommand04(const cec_logical_address iSourc
Transmit(response);
}
Transmit(response);
}
-void CSLCommandHandler::HandleVendorCommand
03
(const cec_command &command)
+void CSLCommandHandler::HandleVendorCommand
PowerOn
(const cec_command &command)
{
CCECBusDevice *device = m_processor->m_busDevices[m_processor->GetLogicalAddresses().primary];
if (device)
{
CCECBusDevice *device = m_processor->m_busDevices[m_processor->GetLogicalAddresses().primary];
if (device)
@@
-141,14
+142,16
@@
void CSLCommandHandler::HandleVendorCommand03(const cec_command &command)
}
}
}
}
-void CSLCommandHandler::HandleVendorCommand
04
(const cec_command &command)
+void CSLCommandHandler::HandleVendorCommand
SLConnect
(const cec_command &command)
{
m_bSLEnabled = true;
{
m_bSLEnabled = true;
- TransmitVendorCommand04(command.destination, command.initiator);
+ m_processor->m_busDevices[command.initiator]->SetActiveSource();
+ m_processor->m_busDevices[command.destination]->TransmitActiveSource();
+ TransmitVendorCommand05(command.destination, command.initiator);
TransmitDeckStatus(command.initiator);
}
TransmitDeckStatus(command.initiator);
}
-void CSLCommandHandler::HandleVendorCommand
A0
(const cec_command &command)
+void CSLCommandHandler::HandleVendorCommand
PowerOnStatus
(const cec_command &command)
{
if (command.destination != CECDEVICE_BROADCAST)
{
{
if (command.destination != CECDEVICE_BROADCAST)
{
@@
-253,7
+256,10
@@
bool CSLCommandHandler::InitHandler(void)
CCECBusDevice *primary = m_processor->m_busDevices[m_processor->GetLogicalAddresses().primary];
if (m_busDevice->GetLogicalAddress() != primary->GetLogicalAddress())
CCECBusDevice *primary = m_processor->m_busDevices[m_processor->GetLogicalAddresses().primary];
if (m_busDevice->GetLogicalAddress() != primary->GetLogicalAddress())
+ {
primary->SetVendorId(CEC_VENDOR_LG, false);
primary->SetVendorId(CEC_VENDOR_LG, false);
+ primary->TransmitVendorID(CECDEVICE_TV, false);
+ }
if (m_busDevice->GetLogicalAddress() == CECDEVICE_TV)
{
if (m_busDevice->GetLogicalAddress() == CECDEVICE_TV)
{
@@
-283,6
+289,7
@@
bool CSLCommandHandler::InitHandler(void)
device->GetType() == CEC_DEVICE_TYPE_RECORDING_DEVICE))
{
((CCECPlaybackDevice *)device)->SetDeckStatus(CEC_DECK_INFO_OTHER_STATUS_LG);
device->GetType() == CEC_DEVICE_TYPE_RECORDING_DEVICE))
{
((CCECPlaybackDevice *)device)->SetDeckStatus(CEC_DECK_INFO_OTHER_STATUS_LG);
+ ((CCECPlaybackDevice *)device)->TransmitDeckStatus(CECDEVICE_TV);
}
}
}
}
}
}