We use i.MX6 for audio processing, do ASRC to fixed S/PDIF input in 48kHz.
Without any process, i.MX6 direct pass 48kHz S/PDIF to output.
The latency between playback(to i.MX6) and recording(from i.MX6) will increase.
- PC software
- play and record
- $ alsaloop -P sysdefault:CARD=imxspdif -C sysdefault:CARD=imxspdif -r 48000 -t 8192 -vvvv -f S16_LE
- the argument [-t] won't change result
- Latency between PC and Focusrite is 5ms and it is very stable
- PC => Focusrite spdif out => Focusrite spdif in => PC
Logs and observation
- alsaloop log, please refer to the attachment
- expected clock rate = 227328000
- actual clock rate = 227368421
- set sample rate to 48008Hz for 48000Hz playback
- many underruns for playback
- many times do resync
- Audio Precision, measure spdif out for Focusrite and i.MX6
- Focusrite sample rate 47999.9 Hz (diff < 0.1)
- i.MX6 sample rate 48003.5 Hz (diff > 3.5)
- Latency increase until XRUN occur
Source code and Setting
- Linux imx6qsabresd 4.9.88-PgFx+
- Why does the latency increase ( until underrun occurs ) ?
- Why actual CPU clock differ than expected clock ?
- How to bypass i.MX6, directly pass spdif-IN to spdif-OUT ?