All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Mark Brown <broonie@kernel.org>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>
Subject: [PATCH 6/6] ASoC: soc-pcm: setup pcm at one place in soc_new_pcm()
Date: 11 Dec 2020 14:55:44 +0900	[thread overview]
Message-ID: <87tuss7uyf.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <87360c99kb.wl-kuninori.morimoto.gx@renesas.com>


From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

pcm is setuped at randam place.
This patch setup it in one place.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/soc-pcm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 2f2c4c19f1b8..1bc9fd0fec07 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -2749,9 +2749,10 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
 	else
 		rtd->close_delayed_work_func = snd_soc_close_delayed_work;
 
-	pcm->nonatomic = rtd->dai_link->nonatomic;
 	rtd->pcm = pcm;
 	pcm->private_data = rtd;
+	pcm->nonatomic = rtd->dai_link->nonatomic;
+	pcm->no_device_suspend = true;
 
 	if (rtd->dai_link->no_pcm || rtd->dai_link->params) {
 		if (playback)
@@ -2808,7 +2809,6 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
 		return ret;
 	}
 
-	pcm->no_device_suspend = true;
 out:
 	dev_dbg(rtd->card->dev, "%s <-> %s mapping ok\n",
 		(rtd->num_codecs > 1) ? "multicodec" : asoc_rtd_to_codec(rtd, 0)->name,
-- 
2.25.1


  parent reply	other threads:[~2020-12-11  5:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-11  5:54 [PATCH 0/6] ASoC: soc-pcm: cleanup code Kuninori Morimoto
2020-12-11  5:55 ` [PATCH 1/6] ASoC: soc-pcm: move dpcm_set_fe_update_state() Kuninori Morimoto
2020-12-11  5:55 ` [PATCH 2/6] ASoC: soc-pcm: add dpcm_set_be_update_state() Kuninori Morimoto
2020-12-11  5:55 ` [PATCH 3/6] ASoC: soc-pcm: add soc_pcm_set_dai_params() Kuninori Morimoto
2020-12-11  5:55 ` [PATCH 4/6] ASoC: soc-pcm: cleanup soc_pcm_apply_symmetry() Kuninori Morimoto
2020-12-11  5:55 ` [PATCH 5/6] ASoC: soc-pcm: cleanup soc_pcm_params_symmetry() Kuninori Morimoto
2020-12-18  6:51   ` Kuninori Morimoto
2020-12-11  5:55 ` Kuninori Morimoto [this message]
2021-01-13 15:26 ` (subset) [PATCH 0/6] ASoC: soc-pcm: cleanup code Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tuss7uyf.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.