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

ASoC: simple-card: dai_link->init should be cared when multi DAI

6a91a17b
(ASoC: simple-card: Handle many DAI links)
added multi DAI support on simple-card.
This means priv->dai_link might be pointer of multi DAI.
dai_link->init is needed for all DAI.
This patch cares it for all DAIs on DT/non-DT
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 179949bc
...@@ -274,6 +274,7 @@ static int asoc_simple_card_dai_link_of(struct device_node *node, ...@@ -274,6 +274,7 @@ static int asoc_simple_card_dai_link_of(struct device_node *node,
dai_link->codec_dai_name); dai_link->codec_dai_name);
dai_link->name = dai_link->stream_name = name; dai_link->name = dai_link->stream_name = name;
dai_link->ops = &asoc_simple_card_ops; dai_link->ops = &asoc_simple_card_ops;
dai_link->init = asoc_simple_card_dai_init;
dev_dbg(dev, "\tname : %s\n", dai_link->stream_name); dev_dbg(dev, "\tname : %s\n", dai_link->stream_name);
dev_dbg(dev, "\tcpu : %s / %04x / %d\n", dev_dbg(dev, "\tcpu : %s / %04x / %d\n",
...@@ -465,6 +466,7 @@ static int asoc_simple_card_probe(struct platform_device *pdev) ...@@ -465,6 +466,7 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
dai_link->codec_name = cinfo->codec; dai_link->codec_name = cinfo->codec;
dai_link->cpu_dai_name = cinfo->cpu_dai.name; dai_link->cpu_dai_name = cinfo->cpu_dai.name;
dai_link->codec_dai_name = cinfo->codec_dai.name; dai_link->codec_dai_name = cinfo->codec_dai.name;
dai_link->init = asoc_simple_card_dai_init;
memcpy(&priv->dai_props->cpu_dai, &cinfo->cpu_dai, memcpy(&priv->dai_props->cpu_dai, &cinfo->cpu_dai,
sizeof(priv->dai_props->cpu_dai)); sizeof(priv->dai_props->cpu_dai));
memcpy(&priv->dai_props->codec_dai, &cinfo->codec_dai, memcpy(&priv->dai_props->codec_dai, &cinfo->codec_dai,
...@@ -474,11 +476,6 @@ static int asoc_simple_card_probe(struct platform_device *pdev) ...@@ -474,11 +476,6 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
priv->dai_props->codec_dai.fmt |= cinfo->daifmt; priv->dai_props->codec_dai.fmt |= cinfo->daifmt;
} }
/*
* init snd_soc_dai_link
*/
dai_link->init = asoc_simple_card_dai_init;
snd_soc_card_set_drvdata(&priv->snd_card, priv); snd_soc_card_set_drvdata(&priv->snd_card, priv);
ret = devm_snd_soc_register_card(&pdev->dev, &priv->snd_card); ret = devm_snd_soc_register_card(&pdev->dev, &priv->snd_card);
......
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