It's not a full answer, and some sites would convert it into a comment ;)
@Federico presuming the 5.1 system supports, ARC, and your TV supports ARC, and the sound system is connected via HDMI it'd work, or the TV routes audio back out via optical, or.....