From: Lars Op den Kamp Date: Thu, 16 May 2013 11:32:53 +0000 (+0200) Subject: update system audio mode when audio system devices are activated X-Git-Tag: upstream/2.2.0~1^2~3^2~40 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=93efea2abf014deb8e64a74ec1ff21486def4ae3;p=deb_libcec.git update system audio mode when audio system devices are activated --- diff --git a/src/lib/implementations/CECCommandHandler.cpp b/src/lib/implementations/CECCommandHandler.cpp index 2859d5a..b742f49 100644 --- a/src/lib/implementations/CECCommandHandler.cpp +++ b/src/lib/implementations/CECCommandHandler.cpp @@ -1230,6 +1230,14 @@ bool CCECCommandHandler::ActivateSource(bool bTransmitDelayedCommandsOnly /* = f if (playbackDevice && SendDeckStatusUpdateOnActiveSource()) bActiveSourceFailed = !playbackDevice->TransmitDeckStatus(CECDEVICE_TV, false); } + + // update system audio mode for audiosystem devices + if (bTvPresent && !bActiveSourceFailed) + { + CCECAudioSystem* audioDevice = m_busDevice->AsAudioSystem(); + if (audioDevice) + bActiveSourceFailed = !audioDevice->TransmitSetSystemAudioMode(CECDEVICE_TV, false); + } } // retry later