X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fimplementations%2FCECCommandHandler.cpp;h=e30810c6671c7c564721c0906ed5db94630db0c1;hb=e5e86c76b70975d8a8c03c58a230a70726399906;hp=d2c6020dd12361f97f3352c4b668202432acfefb;hpb=cf0ecd850f25db418c1127bab8927f0021abb017;p=deb_libcec.git diff --git a/src/lib/implementations/CECCommandHandler.cpp b/src/lib/implementations/CECCommandHandler.cpp index d2c6020..e30810c 100644 --- a/src/lib/implementations/CECCommandHandler.cpp +++ b/src/lib/implementations/CECCommandHandler.cpp @@ -99,6 +99,9 @@ bool CCECCommandHandler::HandleCommand(const cec_command &command) case CEC_OPCODE_GIVE_SYSTEM_AUDIO_MODE_STATUS: HandleGiveSystemAudioModeStatus(command); break; + case CEC_OPCODE_SYSTEM_AUDIO_MODE_REQUEST: + HandleSetSystemAudioModeRequest(command); + break; default: UnhandledCommand(command); m_busDevice->GetProcessor()->AddCommand(command); @@ -323,6 +326,17 @@ bool CCECCommandHandler::HandleSetStreamPath(const cec_command &command) return true; } +bool CCECCommandHandler::HandleSetSystemAudioModeRequest(const cec_command &command) +{ + if (command.parameters.size >= 1) + { + CCECBusDevice *device = GetDevice(command.destination); + if (device&& device->GetType() == CEC_DEVICE_TYPE_AUDIO_SYSTEM) + return ((CCECAudioSystem *) device)->SetSystemAudioMode(command); + } + return true; +} + bool CCECCommandHandler::HandleGiveSystemAudioModeStatus(const cec_command &command) { CCECBusDevice *device = GetDevice(command.destination);