Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Mihalcea Laurentiu <laurentiumihalcea111@gmail.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org
Subject: Re: [PATCH RFC 2/3] ASoC: audio-graph-card2: support explicitly disabled links
Date: Wed, 21 May 2025 15:15:20 +0300	[thread overview]
Message-ID: <fc2cbb54-58aa-4362-9b84-20df510b9038@gmail.com> (raw)
In-Reply-To: <87o6vonmjw.wl-kuninori.morimoto.gx@renesas.com>


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

  reply	other threads:[~2025-05-21 11:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-15 15:31 [PATCH RFC 0/3] ASoC: audio-graph-card2: support explicitly disabled links Laurentiu Mihalcea
2025-05-15 15:31 ` [PATCH RFC 1/3] ASoC: re-introduce disable_route_checks flag for OF routes Laurentiu Mihalcea
2025-05-16  1:22   ` Kuninori Morimoto
2025-05-16 10:13     ` Mihalcea Laurentiu
2025-05-15 15:31 ` [PATCH RFC 2/3] ASoC: audio-graph-card2: support explicitly disabled links Laurentiu Mihalcea
2025-05-16  1:36   ` Kuninori Morimoto
2025-05-16 12:50     ` Mihalcea Laurentiu
2025-05-19  1:15       ` Kuninori Morimoto
2025-05-19  9:30         ` Mihalcea Laurentiu
2025-05-20  0:38           ` Kuninori Morimoto
2025-05-21 12:15             ` Mihalcea Laurentiu [this message]
2025-05-22  1:19               ` Kuninori Morimoto
2025-05-15 15:31 ` [PATCH RFC 3/3] ASoC: generic: add more sample DTSIs for audio-graph-card2 Laurentiu Mihalcea
2025-05-16  1:59   ` Kuninori Morimoto

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=fc2cbb54-58aa-4362-9b84-20df510b9038@gmail.com \
    --to=laurentiumihalcea111@gmail.com \
    --cc=broonie@kernel.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.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