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-next>] [day] [month] [year] [list]
Message-Id: <20231117163900.766996-1-daniel.baluta@oss.nxp.com>
Date:   Fri, 17 Nov 2023 18:39:00 +0200
From:   Daniel Baluta <daniel.baluta@....nxp.com>
To:     broonie@...nel.org
Cc:     kuninori.morimoto.gx@...esas.com, daniel.baluta@...il.com,
        alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
        iuliana.prodan@....com, shengjiu.wang@....com
Subject: [RFC PATCH] ASoC: simple-card: Use dai_id from node description

From: Daniel Baluta <daniel.baluta@....com>

We can specify DAI id using reg property. When dts
node has only 1 DAI simple-card always assumes that DAI id is 0.

But this is not correct in the case of SOF for example which adds DAIs
staticaly (See definition of snd_soc_dai_driver in sound/soc/sof/imx/imx8m.c)

Signed-off-by: Daniel Baluta <daniel.baluta@....com>
---
 sound/soc/generic/simple-card-utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c
index 8ec5d413e8e60..739cb71593a88 100644
--- a/sound/soc/generic/simple-card-utils.c
+++ b/sound/soc/generic/simple-card-utils.c
@@ -1121,7 +1121,7 @@ int asoc_graph_parse_dai(struct device *dev, struct device_node *ep,
 	/* Get dai->name */
 	args.np		= node;
 	args.args[0]	= graph_get_dai_id(ep);
-	args.args_count	= (of_graph_get_endpoint_count(node) > 1);
+	args.args_count	= (of_graph_get_endpoint_count(node) >= 1);
 
 	/*
 	 * FIXME
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ