ok running HDMI for both on my system didn't work so well for me.
I found that i had to disable my audio from the HDMI and only stream the video to my HDTV with the HDMI cable, and then connect the audio to my sound system. If you have optical out/in you can buy the proper cable to connect PC to audio system.
Whatever your audio system can handle for audio IN and whatever your PC can handle for Audio OUT.
I am running HDMI cable from PC to HDTV and running a separate Optical cable from my PC to my Audio system.
Are you running your 40 TV for your only source of display for computer?
If not, with your PC, do you have the option to duplicate your display on your monitor and tv the same time?