From 3c8b5861850c734add65233e538d4a8c2dff95d9 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 20 Jun 2023 02:14:11 +0000 Subject: ASoC: soc-core.c: add index on snd_soc_of_get_dai_name() Current snd_soc_of_get_dai_name() doesn't accept index for #sound-dai-cells. It is not useful for user. This patch adds it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87pm5qdgng.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown --- sound/soc/qcom/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/soc/qcom') diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c index cab5a7937a57..d9ebb883b999 100644 --- a/sound/soc/qcom/common.c +++ b/sound/soc/qcom/common.c @@ -105,7 +105,7 @@ int qcom_snd_parse_of(struct snd_soc_card *card) link->cpus->of_node = args.np; link->id = args.args[0]; - ret = snd_soc_of_get_dai_name(cpu, &link->cpus->dai_name); + ret = snd_soc_of_get_dai_name(cpu, &link->cpus->dai_name, 0); if (ret) { dev_err_probe(card->dev, ret, "%s: error getting cpu dai name\n", link->name); -- cgit v1.2.3 From 6cf881b7f1608fd5625d916380ed57d45c2879e9 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 20 Jun 2023 02:14:24 +0000 Subject: ASoC: qcom: use snd_soc_{of_}get_dlc() Current ASoC has snd_soc_{of_}get_dai_name() to get DAI name for dlc (snd_soc_dai_link_component). But we now can use snd_soc_{of_}get_dlc() for it. Let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87mt0udgn3.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown --- sound/soc/qcom/common.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'sound/soc/qcom') diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c index d9ebb883b999..43b0a888f1e8 100644 --- a/sound/soc/qcom/common.c +++ b/sound/soc/qcom/common.c @@ -96,22 +96,15 @@ int qcom_snd_parse_of(struct snd_soc_card *card) goto err; } - ret = of_parse_phandle_with_args(cpu, "sound-dai", - "#sound-dai-cells", 0, &args); - if (ret) { - dev_err(card->dev, "%s: error getting cpu phandle\n", link->name); - goto err; - } - link->cpus->of_node = args.np; - link->id = args.args[0]; - - ret = snd_soc_of_get_dai_name(cpu, &link->cpus->dai_name, 0); + ret = snd_soc_of_get_dlc(cpu, &args, link->cpus, 0); if (ret) { dev_err_probe(card->dev, ret, "%s: error getting cpu dai name\n", link->name); goto err; } + link->id = args.args[0]; + if (platform) { link->platforms->of_node = of_parse_phandle(platform, "sound-dai", -- cgit v1.2.3