This is just a quick little hack that I did on my MythTV box some time ago. The motherboard that I have did not come with a cable for the S/PDIF audio output and it would have been $10 – $20 to purchase one. So, I did some searching around and found out it is actually quite easy to make one myself.
This particular motherboard has a three pin header that actually allows a coax or optical out. The coax connection is easy enough, if I needed optical out I would just buy the cable. The pin-out of the board looks like this:
For a coax connector, you just need the SPDIF_OUT and Ground pins. The +5V is only used for an optical connection. So, with the parts I had lying around, I found an RCA jack, metal bracket, connector and some wire. The connector I had was actually four pins, but I was able to cut off one of them. It did not have any keying on it, so it is possible to insert it backward, so I just had to be conscious of that when plugging it in. Then, nothing fancy, I just wired it up. The SPDIF_OUT pin goes to the tip connection of the RCA, the Ground goes to the ring. Here are a couple pics of how it turned out. I’ve been using it for a while and it works great!