ASoc: soc_core.c stream direction from snd_soc_dai

Shengjiu Wang shengjiu.wang at gmail.com
Fri Feb 26 06:58:12 CET 2021


On Tue, Feb 23, 2021 at 9:58 PM Mark Brown <broonie at kernel.org> wrote:
>
> On Sat, Feb 20, 2021 at 05:29:03PM +0800, Shengjiu Wang wrote:
>
> > One of the suggestions is to use two DAIs.  but sometimes the
> > CPU/CODEC may have the same format for playback and capture,
> > then one DAI is enough.  it means that we need to define 3 DAIs
> > for the CPU/CODEC,  one supports playback and capture, another
> > two support capture and playback separately, is it some kind of
> > duplicate?
>
> > So I'd like to extend the set_fmt() interface, but this impacts all
> > the drivers.
>
> I'm not sure having two DAIs is an issue if you have them running the
> smae format - does it cause any practical problems or is it just that it
> doesn't seem elegant to you?  There were quite a few devices that pretty
> much just had two unidirectional DAIs, in those cases it seems like a
> sensible representation for the hardware.  If you can set unrelated
> formats on transmit and receive then it's not clear that it's actually
> the same DAI in anything except logical labelling.

When an i2s device, Sometimes it is connected as async mode, there is
different clock for tx and rx then there should be two DAIs,  Sometimes
it is connected as sync mode, then there should be one DAI.

So we need to register different DAIs according to the async or sync mode
when the driver probes. right?

best regards
wang shengjiu


More information about the Alsa-devel mailing list