diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2023-03-27 00:34:26 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-03-28 01:26:03 +0100 |
commit | ffaf886e249ee269f9084c21fbd8617ce9b83817 (patch) | |
tree | d7af22793ae055b74d63af8c67aa97965c67d6dc /sound/soc/intel | |
parent | 8908c36dabad7dd52872034f9f42c6c077bc7270 (diff) | |
download | lwn-ffaf886e249ee269f9084c21fbd8617ce9b83817.tar.gz lwn-ffaf886e249ee269f9084c21fbd8617ce9b83817.zip |
ASoC: soc-core.c: add snd_soc_add_pcm_runtimes()
Current ASoC supports snd_soc_add_pcm_runtime(), but user need to
call it one-by-one if it has multi dai_links.
This patch adds snd_soc_add_pcm_runtimes() which supports multi
dai_links.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87h6u76nhq.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel')
-rw-r--r-- | sound/soc/intel/avs/boards/hdaudio.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sound/soc/intel/avs/boards/hdaudio.c b/sound/soc/intel/avs/boards/hdaudio.c index e68c4c7aa2ba..a542a67e21d0 100644 --- a/sound/soc/intel/avs/boards/hdaudio.c +++ b/sound/soc/intel/avs/boards/hdaudio.c @@ -194,12 +194,10 @@ static int avs_probing_link_init(struct snd_soc_pcm_runtime *rtm) return ret; } - for (n = 0; n < pcm_count; n++) { - ret = snd_soc_add_pcm_runtime(card, &links[n]); - if (ret < 0) { - dev_err(card->dev, "add links failed: %d\n", ret); - return ret; - } + ret = snd_soc_add_pcm_runtimes(card, links, pcm_count); + if (ret < 0) { + dev_err(card->dev, "add links failed: %d\n", ret); + return ret; } ret = avs_create_dapm_routes(card->dev, codec, pcm_count, &routes, &n); |