Thanks for your response and a good observation. However, that line was from the terminal output when I tried running "Listen_to_SPDIF_on_Speakers.sh" from putty. In the file itself, it has quotation marks as follows.amixer ${BEQUIET} -D${CARD} cset name='TX Playback Switch' off
Those listen scripts were written for a rather old version of the driver, "TX Playback Switch" doesn't exist in the current version.
If you already set up speaker output (i.e. run "Playback_to_Speakers.sh) you can mix in SPDIF in via these commands (using the second of 4 inputs, the first one is used for standard playback output from RPi):
amixer cset name="SPKOUTL Input 2' AIF2RX1
amixer cset name="SPKOUTL Input 2 Volume' 32
amixer cset name="SPKOUTR Input 2' AIF2RX2
amixer cset name="SPKOUTR Input 2 Volume' 32
But all this probably won't work as you'd expect, there are some nasty details to keep in mind when using SPDIF input:
The card has to be set up to the same sampling rate as the signal on the SPDIF input. Setting the card to 44.1kHz and trying to receive a 48kHz signal, for example, doesn't work. So you have to make sure the SPDIF sampling rate is fixed and then configure kodi to only use that rate - in this case it can work.
When you are using SPDIF input the sound card locks onto the SPDIF signal and uses that as it's clock source instead of it's internal oscillator. So when there's no SPDIF input signal present or the card can't lock onto it (eg wrong samplingrate) you'll get no or only distorted output.
You'd be better off using one of the analog inputs instead, they don't suffer from any of these limitations.
so long,
Hias