hello chown33 ! first of all thanks for the reply and secondly thanks for giving me the right word to look at on the web... Toslink. The ports state optical audio.
my model is macpro DC 2.66Ghz xeon 1.1 with 2.1 update. 2006. i send screenshots also. please if you need further info let me know.
From the photos i see on web, looks like a toslink port, but dont know why they call it S/PDIF on the other hand unless i get confused due to the lack of technical knowledge with audio stuff.
An S/PDIF port can be either coax wire with RCA connectors, or TOSLINK. Only one of these is optical.
https://en.wikipedia.org/wiki/S/PDIF
I attach screenshot to see the ports also (pic no6). They are the square ones covered with a plastic cap/ door.
On my macpro the right port marked OUT (as you see in photo) is glowing red when the maschine starts up.
The other one is not lit at all for a reason, and i think that this might be the reason i have some sound problems.
The port marked OUT is an output. It glows red because the red LED is the transmitter.
The port marked IN is an input. It won't glow at all, because it's an input, a receiver.
To use the IN port, you plug in a TOSLINK cable, then plug the other end into an OUPUT port on another device.
The OUTPUT port on that other device will be glowing red, because it's transmitting.
As far as I know, IN ports will never glow red.
You can't tell just by looking at the ports whether they're working. You'd have to connect the ports with TOSLINK cables to another TOSLINK device. If you don't have cables or a device, and can't borrow any, then you can't test the ports.
No script can test the ports. You need to connect TOSLINK hardware and try it. If the ports work with TOSLINK cables and a device, then you can choose them as audio in and out. You won't need a script to do that.
If you're having problems with sound, you need to describe exactly what the problem is.