X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fimplementations%2FCECCommandHandler.cpp;h=333b71b1ab12817d6927ff1ffbc4eae252717fd2;hb=868dc71fc0084c08a6f3d19888a7f4f855add3f4;hp=037825acb1d4078c6369efcf2c04295841be6471;hpb=93fff5c18f5e39ffbee143b4d01e89cc02d6fd99;p=deb_libcec.git diff --git a/src/lib/implementations/CECCommandHandler.cpp b/src/lib/implementations/CECCommandHandler.cpp index 037825a..333b71b 100644 --- a/src/lib/implementations/CECCommandHandler.cpp +++ b/src/lib/implementations/CECCommandHandler.cpp @@ -132,6 +132,9 @@ bool CCECCommandHandler::HandleCommand(const cec_command &command) case CEC_OPCODE_REPORT_AUDIO_STATUS: HandleReportAudioStatus(command); break; + case CEC_OPCODE_SYSTEM_AUDIO_MODE_STATUS: + HandleSystemAudioStatus(command); + break; case CEC_OPCODE_SET_OSD_NAME: HandleSetOSDName(command); break; @@ -460,6 +463,18 @@ bool CCECCommandHandler::HandleStandby(const cec_command &command) return true; } +bool CCECCommandHandler::HandleSystemAudioStatus(const cec_command &command) +{ + CCECBusDevice *device = GetDevice(command.initiator); + if (device && device->GetType() == CEC_DEVICE_TYPE_AUDIO_SYSTEM) + { + ((CCECAudioSystem *)device)->SetSystemAudioMode(command); + return true; + } + + return false; +} + bool CCECCommandHandler::HandleGiveSystemAudioModeStatus(const cec_command &command) { if (m_busDevice->MyLogicalAddressContains(command.destination))