aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/qcom
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2023-06-21 00:56:00 +0100
committerMark Brown <broonie@kernel.org>2023-06-21 00:56:00 +0100
commit3067e020d361ed346957eb5e253911f7a3e18f59 (patch)
treeb49042c0b0aaf588329d4472a52c11b5ad1ee184 /sound/soc/qcom
parentASoC: tas2781: Fix spelling mistake "calibraiton" -> "calibration" (diff)
parentASoC: simple-card.c: use snd_soc_{of_}get_dlc() (diff)
downloadwireguard-linux-3067e020d361ed346957eb5e253911f7a3e18f59.tar.xz
wireguard-linux-3067e020d361ed346957eb5e253911f7a3e18f59.zip
add snd_soc_{of_}get_dlc()
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>: Current soc-core.c has snd_soc_{of_}get_dai_name() to get DAI name for dlc (snd_soc_dai_link_component). It gets .dai_name, but we need .of_node too. Therefor user need to arrange. It will be more useful if it gets both .dai_name and .of_node. This patch adds snd_soc_{of_}get_dlc() for it, and convert to use it.
Diffstat (limited to 'sound/soc/qcom')
-rw-r--r--sound/soc/qcom/common.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c
index cab5a7937a57..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);
+ 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",