Many cards don't send audio over the DVI port. Your post lacks the exact make/model card to see if this card does or does not send audio on the DVI.
You may have to decide if another arrangement will work. For example the HDMI to the TV and the DVI cable to the monitor and use speakers for when you don't use the TV.
Hi so here's my situation. PC has only 1 HDMI port, and I'm using that to run to my TV. My computer monitor has 2 HDMI ports and a VGA port. So I bought a HDMI to DVI cable for that. (DVI plugged into pc).
Now I get a notification about needing separate audio with the HDMI to DVI cord plugged in which I knew and that's fine as I have speakers plugged in. But now I get no audio to the TV. It's worked in the past just not since I got a new monitor and needed to use the DVI port instead of hdmi. I know to switch the digital audio output to HDMI it's just not getting sound.