Step 1: Parts
Video card with DVI output and an internal S/PDIF connector
2-pin Internal S/PDIF Digital Audio Cable or 2 Female to Female header cables
DVI to HDMI adapter or cable
TV with and HDMI port
You may find it useful to have a set of screwdrivers and a multimeter for this project but they may not be necessary depending on your case.
Step 2: Step One: Find the S/PDIF Header and Pinout
I have provided some pictures to assist with this although some motherboards have different S/PDIF headers.
After identifying the headers you will need to determine the S/PDIF and Ground pins on the motherboard. Some motherboards will have this labeled or can be found in the manual or online but others like mine are not. This is where the multimeter may come in handy. With the PC power on you will need to test the pins to determine which is which. The header on my motherboard had 3 pins: S/PDIF, ground, and a constant 5v. The ones you are looking for are the S/PDIF and ground. You can find ground by setting your multimeter to DC and putting the black lead on your case and testing the pins on the header with the other. The ground pin will read as 0 volts and the S/PDIF pin should read at around .01. As far as I have found the S/PDIF pin is located in the center but as long as you have your meter out you might as well make sure your setup is the same. Be careful not to touch two pins at the same time.
Step 3: Connect the S/PDIF Cable and Hook PC to TV
Power off your PC and attach your S/PDIF cable to your the jack on your video card an the header on your motherboard. The red wire should go to S/PDIF and the black wire should go to ground. These were marked on the S/PDIF cable that I bought.
Attach your adapter to your DVI port if you are using one and hook your HDMI cable up from your PC to your TV.
Step 4: Configure PC for HDMI Audio Output
After your PC boots up you will then need to select HDMI from the list of playback devices.
At this point everything should be working and you should be getting audio from your DVI output to your TV.