#define FIN_PLL_RATE 24000000
+SND_SOC_DAILINK_DEFS(links,
+ DAILINK_COMP_ARRAY(COMP_EMPTY()),
+ DAILINK_COMP_ARRAY(COMP_EMPTY()),
+ DAILINK_COMP_ARRAY(COMP_EMPTY()));
+
struct snow_priv {
struct snd_soc_dai_link dai_link;
struct clk *clk_i2s_bus;
link->name = "Primary";
link->stream_name = link->name;
+ link->cpus = links_cpus;
+ link->num_cpus = ARRAY_SIZE(links_cpus);
+ link->codecs = links_codecs;
+ link->num_codecs = ARRAY_SIZE(links_codecs);
+ link->platforms = links_platforms;
+ link->num_platforms = ARRAY_SIZE(links_platforms);
+
card->dai_link = link;
card->num_links = 1;
card->dev = dev;
if (cpu) {
link->ops = &snow_card_ops;
- link->cpu_of_node = of_parse_phandle(cpu, "sound-dai", 0);
+ link->cpus->of_node = of_parse_phandle(cpu, "sound-dai", 0);
of_node_put(cpu);
- if (!link->cpu_of_node) {
+ if (!link->cpus->of_node) {
dev_err(dev, "Failed parsing cpu/sound-dai property\n");
return -EINVAL;
}
of_node_put(codec);
if (ret < 0) {
- of_node_put(link->cpu_of_node);
+ of_node_put(link->cpus->of_node);
dev_err(dev, "Failed parsing codec node\n");
return ret;
}
- priv->clk_i2s_bus = of_clk_get_by_name(link->cpu_of_node,
+ priv->clk_i2s_bus = of_clk_get_by_name(link->cpus->of_node,
"i2s_opclk0");
if (IS_ERR(priv->clk_i2s_bus)) {
snd_soc_of_put_dai_link_codecs(link);
- of_node_put(link->cpu_of_node);
+ of_node_put(link->cpus->of_node);
return PTR_ERR(priv->clk_i2s_bus);
}
} else {
- link->codec_dai_name = "HiFi",
+ link->codecs->dai_name = "HiFi",
- link->cpu_of_node = of_parse_phandle(dev->of_node,
+ link->cpus->of_node = of_parse_phandle(dev->of_node,
"samsung,i2s-controller", 0);
- if (!link->cpu_of_node) {
+ if (!link->cpus->of_node) {
dev_err(dev, "i2s-controller property parse error\n");
return -EINVAL;
}
- link->codec_of_node = of_parse_phandle(dev->of_node,
+ link->codecs->of_node = of_parse_phandle(dev->of_node,
"samsung,audio-codec", 0);
- if (!link->codec_of_node) {
- of_node_put(link->cpu_of_node);
+ if (!link->codecs->of_node) {
+ of_node_put(link->cpus->of_node);
dev_err(dev, "audio-codec property parse error\n");
return -EINVAL;
}
}
- link->platform_of_node = link->cpu_of_node;
+ link->platforms->of_node = link->cpus->of_node;
/* Update card-name if provided through DT, else use default name */
snd_soc_of_parse_card_name(card, "samsung,model");
struct snow_priv *priv = platform_get_drvdata(pdev);
struct snd_soc_dai_link *link = &priv->dai_link;
- of_node_put(link->cpu_of_node);
- of_node_put(link->codec_of_node);
+ of_node_put(link->cpus->of_node);
+ of_node_put(link->codecs->of_node);
snd_soc_of_put_dai_link_codecs(link);
clk_put(priv->clk_i2s_bus);