ASoC: soc-pcm.c: summarize related settings at soc_new_pcm()

soc_new_pcm() sets pcm->no_device_suspend, but it sets other pcm->xxx
at the same function with different timing.
pcm->no_device_suspend setup timing has no effect. This patch tidyup it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87bksdgflq.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Kuninori Morimoto 2022-08-22 02:46:25 +00:00 committed by Mark Brown
parent a59bf85191
commit 4d45d944e8
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0

View file

@ -2907,6 +2907,7 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
rtd->pcm = pcm;
pcm->nonatomic = rtd->dai_link->nonatomic;
pcm->private_data = rtd;
pcm->no_device_suspend = true;
if (rtd->dai_link->no_pcm || rtd->dai_link->params) {
if (playback)
@ -2961,8 +2962,6 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
ret = snd_soc_pcm_component_new(rtd);
if (ret < 0)
return ret;
pcm->no_device_suspend = true;
out:
dev_dbg(rtd->card->dev, "%s <-> %s mapping ok\n",
soc_codec_dai_name(rtd), soc_cpu_dai_name(rtd));