lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <874ixltjzw.wl-kuninori.morimoto.gx@renesas.com>
Date: Fri, 16 May 2025 01:36:04 +0000
From: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
To: Laurentiu Mihalcea <laurentiumihalcea111@...il.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


Hi Laurentiu

Thank you for the patch

> An explicitly disabled link is a DAI link in which one of its device
> endpoints (e.g: codec or CPU) has been disabled in the DTS via the
> "status" property. Formally speaking:
> 
> 	OF_LINK_IS_DISABLED(lnk) = OF_NODE_IS_DISABLED(dev0) ||
> 	                           OF_NODE_IS_DISABLED(dev1);
> 
> where dev0 and dev1 are the two devices (CPU/codec) that make up the
> link.
> 
> If at least one link was explicitly disabled that means DAPM routes
> passed through the OF property "routing" can fail as some widgets might
> not exist. Consider the following example:
> 
> 	CODEC A has widgets A0, A1.
> 	CODEC B has widgets B0, B1.
> 
> 	my-card {
> 		compatible = "audio-graph-card2":
> 		label = "my-label";
> 		links = <&cpu0_port>, <&cpu1_port>;
> 		routing = "A0", "A1",
> 		          "B0", "B1";
> 	};
> 
> 	CODEC A's DT node was disabled.
> 	CODEC B's DT node is enabled.
> 	CPU0's DT node is enabled.
> 	CPU1's DT node is enabled.
> 
> If CODEC A's DT node is disabled via the 'status = "disabled"' property
> that means the A0 -> A1 route cannot be created. This doesn't affect the
> B0 -> B1 route though as CODEC B was never disabled in the DT.
> 
> This is why, if any explicitly disabled link is discovered, the
> "disable_of_route_checks" flag is turned on.
> 
> If all links were explicitly disabled the sound card creation will fail.
> Otherwise, if there's at least one link which wasn't explicitly disabled
> then the sound card creation will succeed.
> 
> Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@....com>
> ---

I think I could understand your situation, but the solution (= this patch) is
too much complicated for me. Indeed it might detect disabled device, but some
board might want to detect it as error, unlike your case.

You want to add "disable_of_route_checks" flag to the card, right ?
How about to add new property, like "force detect xxx", or
"DAI might not be detected", etc, etc, etc...

If we can have such property, it will be more simple code.

	if (it_has_flag("force_detect_xxx")) {
		dev_info(dev, "xxx");
		card->disable_of_route_checks = 1;
	}

Thank you for your help !!

Best regards
---
Kuninori Morimoto

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ