lkml.org 
[lkml]   [2023]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH] ASoC: simple-card: Use dai_id from node description
Date
From: Daniel Baluta <daniel.baluta@nxp.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@nxp.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
\
 
 \ /
  Last update: 2023-11-20 14:03    [W:0.088 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site