… for somebody who need command to switch from I2S to SPDIF and back
get current state of DAC
amixer -c 1 cget numid=5
set audio input to I2S
amixer -c 1 cset numid=5 0
set adudio input to SPDIF
amixer -c 1 cset numid=5 1
toggling I2S <-> SPDIF in signle command
if amixer -c 1 cget numid=5 | grep ": values=0" -q ; then amixer -c 1 cset numid=5 1; elif amixer -c 1 cget numid=5 | grep ": values=1" -q ; then amixer -c 1 cset numid=5 0 ; fi