Re: About snd_soc_dai_set_fmt()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Wed, Jun 5, 2024 at 7:40 PM Mark Brown <broonie@xxxxxxxxxx> wrote:
>
> On Wed, Jun 05, 2024 at 06:17:34PM +0800, Shengjiu Wang wrote:
>
> >    Some use cases require that the format of transmitter and receiver
> > are different.
> >    Shall we define a new .set_fmt_xxx() function to support setting
> > fmt for transmitter and receiver separately?
>
> >    For example:
> >    int snd_soc_dai_set_fmt_xxx(struct snd_soc_dai *dai, unsigned int
> > tx_fmt, unsigned int rx_fmt);
>
> Do you have an example of such a use case?  If you can do that it feels
> more like one end has two single direction DAIs (ISTR some of the
> Freescale platforms were built like that?) and it might be better to do
> that and make it easier to combine two DAIs.  That would also work for
> things like combining dedicated DACs and ADCs.

one of case is:

+-------+                +-----------------+
| SAI1  |   --TX-->  |                     |
|           |   <--RX-- |                     |
+-------+                |                     |
                             | AUDIOMIX  |
+-------+                |                     |
| SAI2  |   --TX-->  |                    |
+-------+                +----------------+


AUDIOMIX mixes the output of SAI1 and SAI2,  AUDIOMIX's output
is sent to SAI1.

TX of SAI1 is master mode,  but RX of SAI1 is slave mode.

So we need to configure SAI1's transmitter and receiver with different
formats.

Use multi-DAI may be an option,  but for fsl_sai driver, in some cases it
is used as single DAI.  So how to support single DAI and multi-DAI in one
driver?  Should we define a new dts property to distinguish these two cases
in order to register different component + dai driver?

Best regards
Shengjiu Wang





[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux