Surround sound setup

I have a Sony HTX22HD 5.1.  Sometime I want to use this for sound, sometimes I just want the sound played through the TV (Sony) - eg at night when little one is in bed, also when its AAC format, the surround sound system wont play it.

What is the best set up to do this without having to change the settings each time.

For example I have a Youview box, and if the TV and surround sound is on it plays through both, or just TV if surround sound if off?

I currently have it set up with HDMI from WDTV to TV, and optical from WDTV to surround sound, digital pass through optical in the settings.  When I turn surround sound off it wont play anything.

I have a similar setup.  HDMI to TV and optical to my AVR.  Normally I have it set to optical which runs the signal through my AVR only, but for quieter times I switch the audio output to “stereo” which will run it through both (if I choose).  I then leave the AVR off and use the volume on the TV.

It’s a bit of a pain because you cannot do this on the fly and have to switch prior to entering Netfiix or any video, but it is a solution to keep the kiddies sleeping.