Recording a file : gst-launch is used to record the audio file.
gst-launch is using alsa src plugin to enable recording with SPDIF driver.
gst-launch-1.0 alsasrc device=hw:1,1 ! queue ! audio/x-raw,format=S24_32LE,rate=48000,channnels=2 ! filesink location=48000.raw
Playing a file : gst-launch is used to play the audio file.
gst-launch is using alsa sink plugin to enable playback with SPDIF driver.
gst-launch-1.0 filesrc location=48000.raw ! audio/x-raw,format=S24_32LE,rate=48000,channnels=2 ! alsasink device=hw:0,0