[Sound-open-firmware] What is the correct loopback configuration for ASoC machine driver DAI links?

Thomas Preston thomas.preston at codethink.co.uk
Thu May 30 17:14:42 CEST 2019


Hi,
I have a question about configuring a physical loopback on a custom
board for the Intel Skylake platform driver. I have also asked on
freenode/#alsa-dev but they directed me here.

We have the following physical SSP layout:

A2B axillary audio
+ SSP0 Tx (connected to SSP5 Rx, for debug)
+ SSP0 Rx

Main speaker output + loopback from A2B
+ SSP5 Tx
+ SSP5 Rx (connected to SSP0 Tx)

We have a board-level hardware loopback where the output signals and
clock (slave) on SSP0 are connected to the input signals and clock
(master) on SSP5.

I'm trying to configure the DAI links in the machine driver so that they
link against SSP0 Pin CPU DAI correctly but I have three problematic
configurations:

1. Separate BE DAI links for SSP5 playback and capture, linking against
the same Skylake CPU DAI "SSP5 Tx". This crashes the kernel with a NULL
pointer dereference (I'm looking into this). Presumably this is an
invalid configuration because I have multiple DAI links linking against
one CPU DAI.  See machine1.c

2. One BE DAI link for SSP5 playback + capture, linking against the same
Skylake CPU DAI. This silences my SSP5 Tx main audio output (which
appears to be muted) when I try to arecord on the SSP5 Rx A2B debug
loopback. The recording is a perfect copy of SSP0 Tx so the loopback
part works. I can recover by restarting my whole audio stack.  See
machine2.c

3. Separate BE DAI links for SSP playback and loopback, linking against
a separated SSP5 Skylake CPU DAI (SSP5 Pin with ssp5 Tx, SSP5 Pin
Loopback with ssp5 Rx). This configuration works but requires a
modification to the Skylake platform driver - which I'd rather avoid.
See machine3.c, skylake.diff

Configuration 2 is closest to what I want, and configuration 3 is my
work-around for now.

What is the correct way to link CPU DAIs for this kind of loopback? I
have attached example code.

Many thanks,
Thomas


More information about the Sound-open-firmware mailing list