Commit fa350b77 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: qcom: storm: use modern dai_link style

ASoC is now supporting modern style dai_link
(= snd_soc_dai_link_component) for CPU/Codec/Platform.
This patch switches to use it.
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 26d8d4b2
...@@ -61,11 +61,16 @@ static const struct snd_soc_ops storm_soc_ops = { ...@@ -61,11 +61,16 @@ static const struct snd_soc_ops storm_soc_ops = {
.hw_params = storm_ops_hw_params, .hw_params = storm_ops_hw_params,
}; };
SND_SOC_DAILINK_DEFS(hifi,
DAILINK_COMP_ARRAY(COMP_EMPTY()),
DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "HiFi")),
DAILINK_COMP_ARRAY(COMP_EMPTY()));
static struct snd_soc_dai_link storm_dai_link = { static struct snd_soc_dai_link storm_dai_link = {
.name = "Primary", .name = "Primary",
.stream_name = "Primary", .stream_name = "Primary",
.codec_dai_name = "HiFi",
.ops = &storm_soc_ops, .ops = &storm_soc_ops,
SND_SOC_DAILINK_REG(hifi),
}; };
static int storm_parse_of(struct snd_soc_card *card) static int storm_parse_of(struct snd_soc_card *card)
...@@ -73,15 +78,15 @@ static int storm_parse_of(struct snd_soc_card *card) ...@@ -73,15 +78,15 @@ static int storm_parse_of(struct snd_soc_card *card)
struct snd_soc_dai_link *dai_link = card->dai_link; struct snd_soc_dai_link *dai_link = card->dai_link;
struct device_node *np = card->dev->of_node; struct device_node *np = card->dev->of_node;
dai_link->cpu_of_node = of_parse_phandle(np, "cpu", 0); dai_link->cpus->of_node = of_parse_phandle(np, "cpu", 0);
if (!dai_link->cpu_of_node) { if (!dai_link->cpus->of_node) {
dev_err(card->dev, "error getting cpu phandle\n"); dev_err(card->dev, "error getting cpu phandle\n");
return -EINVAL; return -EINVAL;
} }
dai_link->platform_of_node = dai_link->cpu_of_node; dai_link->platforms->of_node = dai_link->cpus->of_node;
dai_link->codec_of_node = of_parse_phandle(np, "codec", 0); dai_link->codecs->of_node = of_parse_phandle(np, "codec", 0);
if (!dai_link->codec_of_node) { if (!dai_link->codecs->of_node) {
dev_err(card->dev, "error getting codec phandle\n"); dev_err(card->dev, "error getting codec phandle\n");
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment