diff options
| author | Kuninori Morimoto <[email protected]> | 2019-06-06 04:14:04 +0000 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2019-06-06 20:39:50 +0000 |
| commit | 3d14a1df7d301eb12592297c4b4ec0a00d76b0f2 (patch) | |
| tree | 578d786010128ec0d175b7d1ac946e1ddd37c2b7 /sound/soc/atmel/atmel-classd.c | |
| parent | ASoC: atmel: atmel-pdmic: use modern dai_link style (diff) | |
| download | kernel-3d14a1df7d301eb12592297c4b4ec0a00d76b0f2.tar.gz kernel-3d14a1df7d301eb12592297c4b4ec0a00d76b0f2.zip | |
ASoC: atmel: atmel-classd: 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: Kuninori Morimoto <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'sound/soc/atmel/atmel-classd.c')
| -rw-r--r-- | sound/soc/atmel/atmel-classd.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/sound/soc/atmel/atmel-classd.c b/sound/soc/atmel/atmel-classd.c index 3d70061901a0..cfebbeb92ef1 100644 --- a/sound/soc/atmel/atmel-classd.c +++ b/sound/soc/atmel/atmel-classd.c @@ -500,17 +500,30 @@ static int atmel_classd_asoc_card_init(struct device *dev, { struct snd_soc_dai_link *dai_link; struct atmel_classd *dd = snd_soc_card_get_drvdata(card); + struct snd_soc_dai_link_component *comp; dai_link = devm_kzalloc(dev, sizeof(*dai_link), GFP_KERNEL); if (!dai_link) return -ENOMEM; + comp = devm_kzalloc(dev, 3 * sizeof(*comp), GFP_KERNEL); + if (!comp) + return -ENOMEM; + + dai_link->cpus = &comp[0]; + dai_link->codecs = &comp[1]; + dai_link->platforms = &comp[2]; + + dai_link->num_cpus = 1; + dai_link->num_codecs = 1; + dai_link->num_platforms = 1; + dai_link->name = "CLASSD"; dai_link->stream_name = "CLASSD PCM"; - dai_link->codec_dai_name = ATMEL_CLASSD_CODEC_DAI_NAME; - dai_link->cpu_dai_name = dev_name(dev); - dai_link->codec_name = dev_name(dev); - dai_link->platform_name = dev_name(dev); + dai_link->codecs->dai_name = ATMEL_CLASSD_CODEC_DAI_NAME; + dai_link->cpus->dai_name = dev_name(dev); + dai_link->codecs->name = dev_name(dev); + dai_link->platforms->name = dev_name(dev); card->dai_link = dai_link; card->num_links = 1; |
