diff options
author | Mark Brown <broonie@kernel.org> | 2023-05-09 18:31:38 +0900 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-05-09 18:31:38 +0900 |
commit | 850d174696c3542cd39ca196bc7ade1ba7ceddf7 (patch) | |
tree | 0064cbfce4ec5d5afee1a8801e03e60ff342cf96 /sound/soc/intel/avs/boards/i2s_test.c | |
parent | 7f5d6036ca0059f749414380e19bfc346961353c (diff) | |
parent | 5a7bec81bd229a2512b303578e137324ba0eff5f (diff) |
ASoC: add and use asoc_dummy_dlc
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Many ASoC drivers are using dummy DAI.
I have 2 concern about it. 1st one is there is no guarantee that local
strings ("snd-soc-dummy-dai", "snd-soc-dummy") are kept until the card
was binded if it was added at subfunction.
2nd one is we can use common snd_soc_dai_link_component for it.
This patch-set adds common asoc_dummy_dlc, and use it.
Diffstat (limited to 'sound/soc/intel/avs/boards/i2s_test.c')
-rw-r--r-- | sound/soc/intel/avs/boards/i2s_test.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/soc/intel/avs/boards/i2s_test.c b/sound/soc/intel/avs/boards/i2s_test.c index 8f0fd87bc866..bc3065c6ceda 100644 --- a/sound/soc/intel/avs/boards/i2s_test.c +++ b/sound/soc/intel/avs/boards/i2s_test.c @@ -28,13 +28,11 @@ static int avs_create_dai_link(struct device *dev, const char *platform_name, in dl->name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d-Codec", ssp_port); dl->cpus = devm_kzalloc(dev, sizeof(*dl->cpus), GFP_KERNEL); - dl->codecs = devm_kzalloc(dev, sizeof(*dl->codecs), GFP_KERNEL); - if (!dl->name || !dl->cpus || !dl->codecs) + if (!dl->name || !dl->cpus) return -ENOMEM; dl->cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d Pin", ssp_port); - dl->codecs->name = devm_kasprintf(dev, GFP_KERNEL, "snd-soc-dummy"); - dl->codecs->dai_name = devm_kasprintf(dev, GFP_KERNEL, "snd-soc-dummy-dai"); + dl->codecs = &asoc_dummy_dlc; if (!dl->cpus->dai_name || !dl->codecs->name || !dl->codecs->dai_name) return -ENOMEM; |