[alsa-devel] Multiple codecs on the same DAI

Ricard Wanderlof ricard.wanderlof at axis.com
Thu Nov 23 15:51:19 CET 2017


Hi,

I'm studying a hardware implementation where an S/PDIF receiver is on the 
same I2S connection as codec. Essentially, the S/PDIF receiver echos the 
I2S capture data from the codec unless there is a digital input signal 
which it can lock on to. For playback, the I2S output from the CPU DAI 
goes directly to the codec.

I'm a bit at a loss for how to model this in ALSA. I know it's possible to 
have multiple codecs on a card, but those cases seem to be either separate 
codecs for the left and right channels, or separate codecs for capture and 
playback. In my case the playback codec is always the same, but the 
capture codec can switch between the two avilable input methods (more or 
less automatically if the S/PDIF receiver is so configured).

>From a user perspective, it's not important that ALSA knows where the data 
is actually coming from, so if I could just register the two "codecs" on 
the same dai_link at the same time it would be fine, but I'm just 
imagining that I'll run into problems when ALSA tries to set up streams 
with two different codecs being involved. (Of course, at some level, the 
user might be interested to know the signal routing, but that can be 
determined by reading appropriate status bits in the S/PDIF receiver for 
instance using amixer controls).

Do you have any ideas about how to configure this in ALSA?

/Ricard
-- 
Ricard Wolf Wanderlöf                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30


More information about the Alsa-devel mailing list