If System Preferences > Sound is showing "digital out" you should see
a red light in the miniToslink adapter and at the the end of any toslink
cable connected to the adapter.
The red light should be visible even if the audio output is "silent" or
idle. If no light is visible, the optical output is busted.
If there is a light but no response from a "known-good" receiver, the
toslink cable is probably too long. Apple's digital-optical outputs tend
to be wimpy, and often have problems with cable runs over 10-15 ft.
(You'll still see the red light plainly even when it's too weak to satisfy
the receiver).
Monster Cables are extremely effective at alleviating cash gluts and
evoking convulsions of hysterical laughter from electrical engineers.
OTOH, for transmitting optical or electrical signals, you'd be far better
to stick with
www.monoprice.com.
LK