* [PATCH 10/11] ASoC: meson: use asoc_dummy_dlc
[not found] <874jpe3uqh.wl-kuninori.morimoto.gx@renesas.com>
@ 2023-04-18 0:28 ` Kuninori Morimoto
0 siblings, 0 replies; only message in thread
From: Kuninori Morimoto @ 2023-04-18 0:28 UTC (permalink / raw)
To: Mark Brown
Cc: Jerome Brunet, Neil Armstrong, Kevin Hilman, Martin Blumenstingl,
alsa-devel, linux-arm-kernel, linux-amlogic
Now we can share asoc_dummy_dlc. This patch use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/meson/axg-card.c | 6 ++----
sound/soc/meson/meson-card-utils.c | 10 +---------
2 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/sound/soc/meson/axg-card.c b/sound/soc/meson/axg-card.c
index a25c397c66c5..5c2fff1ff607 100644
--- a/sound/soc/meson/axg-card.c
+++ b/sound/soc/meson/axg-card.c
@@ -120,20 +120,18 @@ static int axg_card_add_tdm_loopback(struct snd_soc_card *card,
if (!lb->name)
return -ENOMEM;
- dlc = devm_kzalloc(card->dev, 2 * sizeof(*dlc), GFP_KERNEL);
+ dlc = devm_kzalloc(card->dev, sizeof(*dlc), GFP_KERNEL);
if (!dlc)
return -ENOMEM;
lb->cpus = &dlc[0];
- lb->codecs = &dlc[1];
+ lb->codecs = &asoc_dummy_dlc;
lb->num_cpus = 1;
lb->num_codecs = 1;
lb->stream_name = lb->name;
lb->cpus->of_node = pad->cpus->of_node;
lb->cpus->dai_name = "TDM Loopback";
- lb->codecs->name = "snd-soc-dummy";
- lb->codecs->dai_name = "snd-soc-dummy-dai";
lb->dpcm_capture = 1;
lb->no_pcm = 1;
lb->ops = &axg_card_tdm_be_ops;
diff --git a/sound/soc/meson/meson-card-utils.c b/sound/soc/meson/meson-card-utils.c
index 2d8d5717fd8b..ffc5111f9e3c 100644
--- a/sound/soc/meson/meson-card-utils.c
+++ b/sound/soc/meson/meson-card-utils.c
@@ -183,21 +183,13 @@ int meson_card_set_fe_link(struct snd_soc_card *card,
struct device_node *node,
bool is_playback)
{
- struct snd_soc_dai_link_component *codec;
-
- codec = devm_kzalloc(card->dev, sizeof(*codec), GFP_KERNEL);
- if (!codec)
- return -ENOMEM;
-
- link->codecs = codec;
+ link->codecs = &asoc_dummy_dlc;
link->num_codecs = 1;
link->dynamic = 1;
link->dpcm_merged_format = 1;
link->dpcm_merged_chan = 1;
link->dpcm_merged_rate = 1;
- link->codecs->dai_name = "snd-soc-dummy-dai";
- link->codecs->name = "snd-soc-dummy";
if (is_playback)
link->dpcm_playback = 1;
--
2.25.1
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-04-18 0:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <874jpe3uqh.wl-kuninori.morimoto.gx@renesas.com>
2023-04-18 0:28 ` [PATCH 10/11] ASoC: meson: use asoc_dummy_dlc Kuninori Morimoto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®