update system audio mode when audio system devices are activated
authorLars Op den Kamp <lars@opdenkamp.eu>
Thu, 16 May 2013 11:32:53 +0000 (13:32 +0200)
committerLars Op den Kamp <lars@opdenkamp.eu>
Thu, 16 May 2013 13:04:09 +0000 (15:04 +0200)
src/lib/implementations/CECCommandHandler.cpp

index 2859d5aaddc74dccff69528b2be31ac2a3fb6856..b742f49898001f437d64478d0e8b6f7593c7e4dc 100644 (file)
@@ -1230,6 +1230,14 @@ bool CCECCommandHandler::ActivateSource(bool bTransmitDelayedCommandsOnly /* = f
         if (playbackDevice && SendDeckStatusUpdateOnActiveSource())
           bActiveSourceFailed = !playbackDevice->TransmitDeckStatus(CECDEVICE_TV, false);
       }
         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
     }
 
     // retry later