[PATCH] ASoC: snd_soc_dai_set_fmt add substream independence.

Matt Flax flatmax at flatmax.org
Mon Mar 30 14:28:26 CEST 2020


On 30/3/20 9:32 pm, Mark Brown wrote:
> On Sat, Mar 28, 2020 at 12:58:31PM +1100, Matt Flax wrote:
>
>> This patch is aims to start a stronger discussion on allowing both CPU
>> and Codec dais to set formats independently based on direction.
> If the DAIs support completely separate formats they're not a single DAI
> and should be represented as two DAIs.


I understand, however having two DAIs produces subdevices and pushes the 
overhead of managing registers to the end user in the form of two sub 
devices.

Is everyone firm on the concept that a DAI's playback and capture stream 
has to have the same format in the same DAI ?

I can see a much better solution (then the one I posted here) which is 
also very simple to solve this problem in the same DAI.


>
>> One example of a sound card which requires independent stream formats is
>> an isolated sound card, such as the Audio Injector Isolated sound card.
>> The magnetic isolation chips on the sound card require stream fomats to
>> be different because of digital latency variations on the I2S lines.
> Honestly I'm not convinced this is ever going to work reliably - there
> is in general an assumption in the code that the formats on both ends of
> the link are the same, it seems you'll have to break that as well as
> having an asymmetric configuration.  You probably need to represent
> these isolators as a CODEC and do a CODEC to CODEC link and even then it
> seems worrying.

I like to think of isolation as innovative, not worrying :)

However w.r.t. the codec to codec link approach, I will take your advice 
and not go down that route.


thanks

Matt



More information about the Alsa-devel mailing list