Here's an apple doc on the Toslink connectors and what they do:
[
support.apple.com]
As to the solution I mentioned, I read this some time ago but I can't remember where and I can't find the original article back. But I have saved this part of the text in my troubleshooting notes:
My particular G5 model has a known bug. Spent over an hour online with an Apple Tech who went through several possibilities until he found the answer. The problem is the optical ports on the backside of the computer. IF they are not being used, there might be an issue with stray or ambient light wreaking havoc with the sample rate of Soundtrack Pro. The solution was to go buy a Toslink optical cable and plug it into both ports creating a loop. The sample rate clock was jumping back and forth from 44.1 kHz to 48 kHz and causing the popping when playing anything in Soundtrack Pro. Problem has been solved. It didn't appear until I upgraded to Leopard, have no idea why, but I feel better now that it wasn't something I did that I couldn't figure out.
Apparently, some G5 models have this issue and it does not appear until you upgrade to Leopard, which is the case for you. In this particular case the Toslink loop solved the problem. The solution is quite logical: Toslink connectors are
optical and the connectors on the back of the G5 are not shielded, so if ambient light falls on the connector this may disturb the audio interface. Connecting a cable to the optical connectors shields them from ambient light. Such a cable is cheap so I think it's worth trying.
Another note from my troubleshooting log:
a similar issue can appear when you install FCS2 on a G5 that has ProTools LE installed. The solution here is to uninstall FCS2 and ProTools LE, then re-install FCS2 and check if STP is behaving, then re-install PT LE.
This may or may not apply to your case, just FYI.
Best wishes,
Ronny