diff options
author | 2020-05-25 09:57:14 +0900 | |
---|---|---|
committer | 2020-05-25 14:22:08 +0100 | |
commit | 02e756363fc936917bed7320199c80729b2a825c (patch) | |
tree | 93d5ae7c294683dab9329e375c8bf2d9b01ff37d /sound/soc/soc-core.c | |
parent | ASoC: max9867: keep ADCs and DACs always on (diff) | |
download | linux-02e756363fc936917bed7320199c80729b2a825c.tar.gz linux-02e756363fc936917bed7320199c80729b2a825c.tar.bz2 linux-02e756363fc936917bed7320199c80729b2a825c.zip |
ASoC: add soc-link.c
Current ALSA SoC has many dai_link->xxx() functions.
But, it is implemented randomly at random place.
This patch creats new soc-link.c and collect dai_link related
operation into it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/871rn84ys5.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r-- | sound/soc/soc-core.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index e697258d2ffc..955e175643d7 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -38,6 +38,7 @@ #include <sound/soc.h> #include <sound/soc-dpcm.h> #include <sound/soc-topology.h> +#include <sound/soc-link.h> #include <sound/initval.h> #define CREATE_TRACE_POINTS @@ -1049,14 +1050,9 @@ static int soc_init_pcm_runtime(struct snd_soc_card *card, rtd->pmdown_time = pmdown_time; /* do machine specific initialization */ - if (dai_link->init) { - ret = dai_link->init(rtd); - if (ret < 0) { - dev_err(card->dev, "ASoC: failed to init %s: %d\n", - dai_link->name, ret); - return ret; - } - } + ret = snd_soc_link_init(rtd); + if (ret < 0) + return ret; if (dai_link->dai_fmt) { ret = snd_soc_runtime_set_dai_fmt(rtd, dai_link->dai_fmt); |