Hi Atomar76,
there a couple of ways to go around.
Asus o play supports HDMI and SPDIF ( optical ) outputs.
Sony KDL-40EX520 supports HDMI in but no HDMI out (?) but has digital audio out (what type ? - optical or coaxial ? )
TerminalsHDMI / Audio In 4 (1 Side/ 3 Rear)
USB 2.0 2 (Side)
Ethernet Connection 1 (Rear)
Composite Video Input(s) 2 (Rear/ 1 Hybrid)
Component Video (Y/Pb/Pr) Input(s) 1 (Rear/ Hybrid)
RF Connection Input(s) 1 (Rear)
HD15 PC Input / Audio 1 (Side)
Digital Audio Output(s) 1 (Rear)
Audio Out 1 (Side)
Headphone Out 1 (Side)
For better understanding kindly mention what different inputs/ouputs can your sony ht supports ( optical / coaxial / HDMI ).
Some ways to connect -
1 Asus oplay - HDMI - HT - HDMI - TV ( if HT supports HDMI in and out ports )
2 Asus oplay - HDMI - TV and Asus oplay - optical cable - HT ( condition HT supports optical in . Also for 5.1 you have to use raw data mode in Asus and HT decodes media to 5.1 PCM - the reason is that 5.1 PCM is not supported over optical but raw ( DTS / Dolby etc ) can be transfered)
3 Asus oplay -HDMI - TV - optical/coaxial/HDMI - HT ( check what digital out is provided by TV - optical / coaxial / HDMI )
If Your Sony HT supports HDMI in and out - use option 1.
If above is not true then you can have digital audio from either Asus or TV to your HT.
Kindly note that Optical or Coaxial digital cables can carry only 2.0 PCM only and no 3.1 or above . But can carry digital compressed data ( DTS / Dolby 5.1 ) - HT should be able to decode compressed file to 5.1 PCM.
I hope this clears some clouds ( or makes it more dark

)