v5.3: support snd_soc_dai_link_component style for cpu
commit f107294c6422e772773b53dbf802186175b6289e Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Date: Thu Jun 6 13:07:35 2019 +0900 ASoC: simple-card: support snd_soc_dai_link_component style for cpu ASoC supports modern style dai_link (= snd_soc_dai_link_component) for CPU. legacy style dai_link (= cpu_dai_name, cpu_name, cpu_of_node) are no longer needed. This patch switches to modern style.
This commit is contained in:
parent
d2c0f1b5c9
commit
63fa92db39
1 changed files with 7 additions and 1 deletions
|
@ -42,6 +42,7 @@ struct seeed_card_data {
|
|||
struct seeed_dai_props {
|
||||
struct asoc_simple_dai cpu_dai;
|
||||
struct asoc_simple_dai codec_dai;
|
||||
struct snd_soc_dai_link_component cpus; /* single cpu */
|
||||
struct snd_soc_dai_link_component codecs; /* single codec */
|
||||
struct snd_soc_dai_link_component platforms;
|
||||
unsigned int mclk_fs;
|
||||
|
@ -588,6 +589,8 @@ static int seeed_voice_card_probe(struct platform_device *pdev)
|
|||
* soc-core.c :: snd_soc_init_multicodec()
|
||||
*/
|
||||
for (i = 0; i < num; i++) {
|
||||
dai_link[i].cpus = &dai_props[i].cpus;
|
||||
dai_link[i].num_cpus = 1;
|
||||
dai_link[i].codecs = &dai_props[i].codecs;
|
||||
dai_link[i].num_codecs = 1;
|
||||
dai_link[i].platforms = &dai_props[i].platforms;
|
||||
|
@ -612,6 +615,7 @@ static int seeed_voice_card_probe(struct platform_device *pdev)
|
|||
}
|
||||
} else {
|
||||
struct seeed_card_info *cinfo;
|
||||
struct snd_soc_dai_link_component *cpus;
|
||||
struct snd_soc_dai_link_component *codecs;
|
||||
struct snd_soc_dai_link_component *platform;
|
||||
|
||||
|
@ -630,6 +634,9 @@ static int seeed_voice_card_probe(struct platform_device *pdev)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
cpus = dai_link->cpus;
|
||||
cpus->dai_name = cinfo->cpu_dai.name;
|
||||
|
||||
codecs = dai_link->codecs;
|
||||
codecs->name = cinfo->codec;
|
||||
codecs->dai_name = cinfo->codec_dai.name;
|
||||
|
@ -640,7 +647,6 @@ static int seeed_voice_card_probe(struct platform_device *pdev)
|
|||
priv->snd_card.name = (cinfo->card) ? cinfo->card : cinfo->name;
|
||||
dai_link->name = cinfo->name;
|
||||
dai_link->stream_name = cinfo->name;
|
||||
dai_link->cpus->dai_name = cinfo->cpu_dai.name;
|
||||
dai_link->dai_fmt = cinfo->daifmt;
|
||||
dai_link->init = asoc_simple_dai_init;
|
||||
memcpy(&priv->dai_props->cpu_dai, &cinfo->cpu_dai,
|
||||
|
|
Loading…
Reference in a new issue