From: Jerome Brunet <jbrunet@baylibre.com>
To: Sameer Pujar <spujar@nvidia.com>,
broonie@kernel.org, perex@perex.cz, tiwai@suse.com,
kuninori.morimoto.gx@renesas.com
Cc: nicoleotsuka@gmail.com, alsa-devel@alsa-project.org,
swarren@nvidia.com, linux-kernel@vger.kernel.org,
nwartikar@nvidia.com, lgirdwood@gmail.com, jonathanh@nvidia.com,
viswanathl@nvidia.com, sharadg@nvidia.com,
thierry.reding@gmail.com, atalambedu@nvidia.com,
linux-tegra@vger.kernel.org, digetx@gmail.com,
rlokhande@nvidia.com, mkumard@nvidia.com, dramesh@nvidia.com
Subject: Re: [RFC] DPCM for Tegra
Date: Wed, 06 May 2020 16:47:09 +0200 [thread overview]
Message-ID: <1jwo5pf7de.fsf@starbuckisacylon.baylibre.com> (raw)
In-Reply-To: <fe842d81-22da-fbbe-b5e2-9872cefb9d8b@nvidia.com>
On Wed 06 May 2020 at 16:12, Sameer Pujar <spujar@nvidia.com> wrote:
>>>
>>> | Front End PCMs | SoC DSP | Back End DAIs |
>>>
>>> *************
>>> ADMAIF<0> <------------> * * <----DAI<0>-----> I2S
>>> * *
>>> ADMAIF<1> <------------> * * <----DAI<1>-----> DMIC
>>> * XBAR *
>>> ADMAIF<2> <------------> * * <----DAI<2>-----> DSPK
>>> * *
>>> ADMAIF<N> <------------> * * <----DAI<3>-----> SFC (Resampler)
>>> * *
>>> * * <----DAI<4>-----> MIXER
>>> * *
>>> * * <----DAI<N>-----> ...
>>> *************
>>>
>>>
>>> Follow up queries
>>> =================
>>> Based on the above experience I do have few follow up queries and request
>>> for your inputs on this.
>>>
>>> a) Can I use a DAPM Mux control to activate a BE path? This in turn can
>>> program required switch in XBAR.
>> My 2 cents:
>
>> DPCM should activate any BE which has:
>> * a valid DAPM path from the current FE
>> * a valid BE stream (ex: can handle the stream direction)
>
> Yes, this is taken care.
>>
>> AFAIK, you can use any combination of DAPM elements to model your
>> components, including the XBAR. Then, it is the job of the card driver to
>> link the DAPM widgets of the different components together and bring the
>> system to life.
>
> XBAR currently exports all routing widgets which can be used to
> interconnect multiple components and thus implements Mux widgets. Fixing
> the routing paths in driver would limit anyone to try a different
> combination as per the need, unless driver is modified.
I did not mean that you should restrict the routing ability of your SoC,
quite the opposite actually.
You should just expose it correctly
From the diagram above, each comp (ASMAIFs, BE even the XBAR) should
export AIF_IN/AIF_OUT widgets. Think of those as the interfaces of your
components.
The connections between those interfaces are fixed, the
represent what the HW is (IOW, the wires). They could possibly be
described in DT (audio-routing prop)
The XBAR should implement the N to M MUX and export all the necessary
kcontrols to act it. The routing magic happens in this component.
There is no limit to the flexibility this provides, unless you set one
;)
> Device tree (DT)
> can be one of the solutions here, but currently static paths can only be
> added AFAIK. Even if this is extended to include routes with Mux widgets,
> still it won't give the real flexibility.
> I cannot re-use a component for a
> different routing path, unless DT is modified again.
If you implement the XBAR capability in the comp, not a use case, there
is no reason to change it.
DT describes the HW, changing it to describe a use case means something
is wrong, usually.
>
> Hence a Mux widget with user space control could offer required
> flexibility.
Exactly, your XBAR comp should provide the widget(s) and related
kcontrol(s).
>>
>> If your XBAR is widgets are not provided by a component which also
>> provides a dai_link in the sound card, you'll need to add the component
>> to the auxiliary device list of the card for the widget to be available
>> in the card.
>
> I registered XBAR device as a component having a dummy DAI just to allow
> routing paths to be available
From you description, you XBAR should not have DAIs, just DAPM widgets
and kcontrols
> for the given sound card. Are you suggesting
> I can register XBAR as an auxiliary device so that all the routing paths
> are available?
Precisely.
I have been using the same method on Amlogic cards.
next prev parent reply other threads:[~2020-05-06 14:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-30 12:41 Sameer Pujar
2020-05-04 17:55 ` Mark Brown
2020-05-06 11:51 ` Jerome Brunet
2020-05-06 14:12 ` Sameer Pujar
2020-05-06 14:47 ` Jerome Brunet [this message]
2020-05-06 15:53 ` Mark Brown
2020-05-06 16:09 ` Sameer Pujar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1jwo5pf7de.fsf@starbuckisacylon.baylibre.com \
--to=jbrunet@baylibre.com \
--cc=alsa-devel@alsa-project.org \
--cc=atalambedu@nvidia.com \
--cc=broonie@kernel.org \
--cc=digetx@gmail.com \
--cc=dramesh@nvidia.com \
--cc=jonathanh@nvidia.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mkumard@nvidia.com \
--cc=nicoleotsuka@gmail.com \
--cc=nwartikar@nvidia.com \
--cc=perex@perex.cz \
--cc=rlokhande@nvidia.com \
--cc=sharadg@nvidia.com \
--cc=spujar@nvidia.com \
--cc=swarren@nvidia.com \
--cc=thierry.reding@gmail.com \
--cc=tiwai@suse.com \
--cc=viswanathl@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome