diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2014-08-27 23:08:27 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-08-29 07:51:02 -0400 |
commit | a5960bd5984c808cdf7aa528e162e9e20e61b923 (patch) | |
tree | d17376cb6528ce4c86823e71f70d3abed441aa9b /sound | |
parent | 179949bc04c7157a4b2279f62a842638b61f78f9 (diff) |
ASoC: simple-card: dai_link->init should be cared when multi DAI
6a91a17bd7b92b2d2aa9ece85457f52a62fd7708
(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: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/generic/simple-card.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index e8185a0b933f..89027047364f 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c | |||
@@ -274,6 +274,7 @@ static int asoc_simple_card_dai_link_of(struct device_node *node, | |||
274 | dai_link->codec_dai_name); | 274 | dai_link->codec_dai_name); |
275 | dai_link->name = dai_link->stream_name = name; | 275 | dai_link->name = dai_link->stream_name = name; |
276 | dai_link->ops = &asoc_simple_card_ops; | 276 | dai_link->ops = &asoc_simple_card_ops; |
277 | dai_link->init = asoc_simple_card_dai_init; | ||
277 | 278 | ||
278 | dev_dbg(dev, "\tname : %s\n", dai_link->stream_name); | 279 | dev_dbg(dev, "\tname : %s\n", dai_link->stream_name); |
279 | dev_dbg(dev, "\tcpu : %s / %04x / %d\n", | 280 | dev_dbg(dev, "\tcpu : %s / %04x / %d\n", |
@@ -465,6 +466,7 @@ static int asoc_simple_card_probe(struct platform_device *pdev) | |||
465 | dai_link->codec_name = cinfo->codec; | 466 | dai_link->codec_name = cinfo->codec; |
466 | dai_link->cpu_dai_name = cinfo->cpu_dai.name; | 467 | dai_link->cpu_dai_name = cinfo->cpu_dai.name; |
467 | dai_link->codec_dai_name = cinfo->codec_dai.name; | 468 | dai_link->codec_dai_name = cinfo->codec_dai.name; |
469 | dai_link->init = asoc_simple_card_dai_init; | ||
468 | memcpy(&priv->dai_props->cpu_dai, &cinfo->cpu_dai, | 470 | memcpy(&priv->dai_props->cpu_dai, &cinfo->cpu_dai, |
469 | sizeof(priv->dai_props->cpu_dai)); | 471 | sizeof(priv->dai_props->cpu_dai)); |
470 | memcpy(&priv->dai_props->codec_dai, &cinfo->codec_dai, | 472 | memcpy(&priv->dai_props->codec_dai, &cinfo->codec_dai, |
@@ -474,11 +476,6 @@ static int asoc_simple_card_probe(struct platform_device *pdev) | |||
474 | priv->dai_props->codec_dai.fmt |= cinfo->daifmt; | 476 | priv->dai_props->codec_dai.fmt |= cinfo->daifmt; |
475 | } | 477 | } |
476 | 478 | ||
477 | /* | ||
478 | * init snd_soc_dai_link | ||
479 | */ | ||
480 | dai_link->init = asoc_simple_card_dai_init; | ||
481 | |||
482 | snd_soc_card_set_drvdata(&priv->snd_card, priv); | 479 | snd_soc_card_set_drvdata(&priv->snd_card, priv); |
483 | 480 | ||
484 | ret = devm_snd_soc_register_card(&pdev->dev, &priv->snd_card); | 481 | ret = devm_snd_soc_register_card(&pdev->dev, &priv->snd_card); |