[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fc2cbb54-58aa-4362-9b84-20df510b9038@gmail.com>
Date: Wed, 21 May 2025 15:15:20 +0300
From: Mihalcea Laurentiu <laurentiumihalcea111@...il.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
Cc: Mark Brown <broonie@...nel.org>, Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, Liam Girdwood <lgirdwood@...il.com>,
linux-kernel@...r.kernel.org, linux-sound@...r.kernel.org
Subject: Re: [PATCH RFC 2/3] ASoC: audio-graph-card2: support explicitly
disabled links
On 20.05.2025 03:38, Kuninori Morimoto wrote:
> Hi Laurentiu
>
>> so, the problem with this is the fact that (assuming you've used a DT overlay
>> for the PLUGIN) you won't be able to use the DT overlay on other boards because
>> you've also added the "Headphone0", "Codec0" route which is specific to BASE's
>> Codec0. We have multiple boards so our system would look like this:
>>
>> BASE0 PLUGIN
>> +-----------------+
>> | CPU0 <-> Codec0 | +--------+
>> | CPU1 | <-> | Codec1 |
>> +-----------------+ +--------+
>>
>>
>> BASE1 PLUGIN
>> +-----------------+
>> | CPU0 <-> Codec3 | +--------+
>> | CPU1 | <-> | Codec1 |
>> +-----------------+ +--------+
>>
>>
>> The plugin is the same. The only difference between BASE1 and BASE0 is the fact that CPU0
>> is connected to Codec0 on BASE0, while, on BASE1, CPU0 is connected to a different codec: Codec3.
> Ah, OK, that it the reason why you added the route on BASE side...
exactly!
>
> Hmm... I think my previous suggested idea (new flag) is reasonable, but you
> mentioned that you want to check whether it was "disabled" or not.
> So, how about to add "plugin-route" and "plugin-links" instead ?
>
> BASE
> my_card: card {
> links = <&cpu0>;
> routing = "Headphone0", "Codec0"; /* for CPU0-Codec0 */
> };
>
> PLUGIN
> &my_card {
> plugin-links = <&cpu1>, <&cpu2>
> plugin-routing = "Headphone1", "Codec1", /* for CPU1-Codec1 */
> ^^^^^^ "Headphone2", "Codec2"; /* for CPU2-Codec2 */
> };
>
> Audio Card2 parses "links" + "plugin-links", and
> "routing" + "plugin-routing". It is more intuitive ?
hm, I believe this _should_ work. I also think that we can just drop the whole
"ignore_route_check" flag idea since you can just use "plugin-routing" in
your DT overlay to specify the CODEC-specific routes (instead of having
them in your BASE DTS). This way, you'll avoid having routes that might
not exist in your BASE DTS.
if we go for this though I think we need to clarify the usage of the
"plugin-links" and "plugin-routing" properties. For me, these properties
only make sense if you use them in a DT overlay to add additional links/routes
introduced by the PLUGIN board. This is basically a workaround the fact
that DT overlays don't support appending to the properties of the BASE
DTS.
also, I believe we can drop the whole "explicitly disabled links" idea
since IMO, links passed via the "plugin-links" property _must_ exist.
anyhow, I will have test out this new idea on our particular scenario and see
how well it works. Thank you very much for this discussion! It was really, really
helpful!
>
>>> BASE PLUGIN
>>> +-----------------+ ^
>>> | CPU0 <-> Codec0 | | Card1
>>> | | v
>>> | | +--------+ ^
>>> | CPU1 | <-> | Codec1 | | Card2
>>> | CPU2 | <-> | Codec2 | |
>>> +-----------------+ +--------+ v
>> one important thing to note here is the fact that we can only
>> have 1 sound card because all DAIs (CPU0, CPU1, CPU2) belong
>> to the same component.
> Indeed it depens on the CPU side driver style.
> I have updated my driver to allow to be multi components by checking DT.
>
> I'm not sure which one (= use plugin-xxx flag or use multi Cards) is
> more intuitive, but supporting both is not bad idea ?
>
> Thank you for your help !!
>
> Best regards
> ---
> Kuninori Morimoto
Powered by blists - more mailing lists