OSDN Git Service

ASoC: fsl_spdif: implement bypass mode from in to out
authorViorel Suman <viorel.suman@nxp.com>
Sun, 26 Sep 2021 09:49:20 +0000 (17:49 +0800)
committerMark Brown <broonie@kernel.org>
Fri, 1 Oct 2021 19:56:03 +0000 (20:56 +0100)
commit83bea088f976a289bc2efe4e404af47ab79d6639
tree8f271038567ced2757e986b0339bc5b949ee2d5f
parentcd96663bc27e1c94210b5b737de4d7cf233d90f8
ASoC: fsl_spdif: implement bypass mode from in to out

Implement SPDIF bypass mode. It implies internal SoC
routing of SPDIF input signal to SPDIF output signal. The
test bed requires two boards: B1 configured in bypass mode,
and B2 to feed B1 SPDIF RX port and read B1 SPDIF TX port:
   B2 TX -> B1 RX,
   B2 RX <- B1 TX.
The test procedure:
 a) Boot both boards
 b) B2: start "arecord <spdifcard> -r 48kHz | aplay <local DAC>"
 c) B2: start "aplay <spdifcard> -r 48kHz <2ch 48kHz audio file>"
 d) B1: enable bypass mode:
amixer -cimxspdif cset numid=8,iface=PCM,name='Bypass Mode' on
 e) B2: check DAC audio, make sure the same sample rate is used at
steps b) and c), in example above the rate is 48kHz.
 f) B1: try to run "aplay" or "arecord" on imxspdif card while in
bypass mode - both must fail until bypass mode is disabled
 g) B1: disable bypass mode:
amixer -cimxspdif cset numid=8,iface=PCM,name='Bypass Mode' off
 h) B1: check the usual playback and capture on imxspdif card.
During this test try to set bypass mode - must not be allowed
while playback or capture is running.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1632649760-1651-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl_spdif.c