[PATCH] ASoC: soc-pcm.c: summarize related settings at soc_new_pcm()
Kuninori Morimoto
kuninori.morimoto.gx at renesas.com
Mon Aug 22 04:46:25 CEST 2022
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 at renesas.com>
---
sound/soc/soc-pcm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index ce4a4151e784..4baa24fbf924 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -2898,6 +2898,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)
@@ -2952,8 +2953,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));
--
2.25.1
More information about the Alsa-devel
mailing list