If you know the model, look for the manual here: http://www.directv.com/DTVAPP/learn/Manuals.dsp. The manuals generally have a picture of the inputs/outputs on the rear of the box. It doesn't look like any of their D10 models, for example, have a digital output.
As far as a digital switch, you might want to look at this: http://www.copperbox.com/lite/popinfo.php?lc_code=1177&uneek=336494569. It is a digital audio switch that has an autosense, so it will automatically switch to active inputs. Also converts toslink/coax inputs to coax or toslink or both. Haven't used this particular model, but have used their 1154 (which switches component video, analog audio, and digital audio) with pretty good results.
One other thing you may want to check into is the box's ability to output PCM on the digital output. I had a cable box, for example, that would output DTS/DD, and would *not* downmix to PCM two channel stereo. Since my audio DAC would not understand DD/DTS in digital form, it didn't work. With my new cable box, however, I can select either DD/DTS or PCM.
As far as a digital switch, you might want to look at this: http://www.copperbox.com/lite/popinfo.php?lc_code=1177&uneek=336494569. It is a digital audio switch that has an autosense, so it will automatically switch to active inputs. Also converts toslink/coax inputs to coax or toslink or both. Haven't used this particular model, but have used their 1154 (which switches component video, analog audio, and digital audio) with pretty good results.
One other thing you may want to check into is the box's ability to output PCM on the digital output. I had a cable box, for example, that would output DTS/DD, and would *not* downmix to PCM two channel stereo. Since my audio DAC would not understand DD/DTS in digital form, it didn't work. With my new cable box, however, I can select either DD/DTS or PCM.