All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>,
	Mark Brown <broonie@kernel.org>
Subject: [alsa-devel] Applied "ASoC: soc-pcm: move soc_pcm_close() next to soc_pcm_open()" to the asoc tree
Date: Wed, 12 Feb 2020 23:57:17 +0000	[thread overview]
Message-ID: <applied-8736bjcexx.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <8736bjcexx.wl-kuninori.morimoto.gx@renesas.com>

The patch

   ASoC: soc-pcm: move soc_pcm_close() next to soc_pcm_open()

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.7

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

From 62c86d1d5fd942c741791be94f670b99ffedfb5c Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Mon, 10 Feb 2020 12:14:41 +0900
Subject: [PATCH] ASoC: soc-pcm: move soc_pcm_close() next to soc_pcm_open()

This patch moves soc_pcm_close() next to soc_pcm_open().
This is prepare for soc_pcm_open() cleanup.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/8736bjcexx.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/soc-pcm.c | 88 ++++++++++++++++++++++-----------------------
 1 file changed, 44 insertions(+), 44 deletions(-)

diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index ae94d8a86992..8aa775e0eb0d 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -507,6 +507,50 @@ static int soc_pcm_components_close(struct snd_pcm_substream *substream)
 	return ret;
 }
 
+/*
+ * Called by ALSA when a PCM substream is closed. Private data can be
+ * freed here. The cpu DAI, codec DAI, machine and components are also
+ * shutdown.
+ */
+static int soc_pcm_close(struct snd_pcm_substream *substream)
+{
+	struct snd_soc_pcm_runtime *rtd = substream->private_data;
+	struct snd_soc_component *component;
+	struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
+	struct snd_soc_dai *codec_dai;
+	int i;
+
+	mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
+
+	snd_soc_runtime_deactivate(rtd, substream->stream);
+
+	snd_soc_dai_digital_mute(cpu_dai, 1, substream->stream);
+
+	snd_soc_dai_shutdown(cpu_dai, substream);
+
+	for_each_rtd_codec_dai(rtd, i, codec_dai)
+		snd_soc_dai_shutdown(codec_dai, substream);
+
+	soc_rtd_shutdown(rtd, substream);
+
+	soc_pcm_components_close(substream);
+
+	snd_soc_dapm_stream_stop(rtd, substream->stream);
+
+	mutex_unlock(&rtd->card->pcm_mutex);
+
+	for_each_rtd_components(rtd, i, component) {
+		pm_runtime_mark_last_busy(component->dev);
+		pm_runtime_put_autosuspend(component->dev);
+	}
+
+	for_each_rtd_components(rtd, i, component)
+		if (!component->active)
+			pinctrl_pm_select_sleep_state(component->dev);
+
+	return 0;
+}
+
 /*
  * Called by ALSA when a PCM substream is opened, the runtime->hw record is
  * then initialized and any private data can be allocated. This also calls
@@ -663,50 +707,6 @@ static void codec2codec_close_delayed_work(struct snd_soc_pcm_runtime *rtd)
 	 */
 }
 
-/*
- * Called by ALSA when a PCM substream is closed. Private data can be
- * freed here. The cpu DAI, codec DAI, machine and components are also
- * shutdown.
- */
-static int soc_pcm_close(struct snd_pcm_substream *substream)
-{
-	struct snd_soc_pcm_runtime *rtd = substream->private_data;
-	struct snd_soc_component *component;
-	struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
-	struct snd_soc_dai *codec_dai;
-	int i;
-
-	mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
-
-	snd_soc_runtime_deactivate(rtd, substream->stream);
-
-	snd_soc_dai_digital_mute(cpu_dai, 1, substream->stream);
-
-	snd_soc_dai_shutdown(cpu_dai, substream);
-
-	for_each_rtd_codec_dai(rtd, i, codec_dai)
-		snd_soc_dai_shutdown(codec_dai, substream);
-
-	soc_rtd_shutdown(rtd, substream);
-
-	soc_pcm_components_close(substream);
-
-	snd_soc_dapm_stream_stop(rtd, substream->stream);
-
-	mutex_unlock(&rtd->card->pcm_mutex);
-
-	for_each_rtd_components(rtd, i, component) {
-		pm_runtime_mark_last_busy(component->dev);
-		pm_runtime_put_autosuspend(component->dev);
-	}
-
-	for_each_rtd_components(rtd, i, component)
-		if (!component->active)
-			pinctrl_pm_select_sleep_state(component->dev);
-
-	return 0;
-}
-
 /*
  * Called by ALSA when the PCM substream is prepared, can set format, sample
  * rate, etc.  This function is non atomic and can be called multiple times,
-- 
2.20.1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2020-02-13  0:01 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-10  3:13 [alsa-devel] [PATCH v3 0/7] ASoC: soc-pcm cleanup step2 Kuninori Morimoto
2020-02-10  3:14 ` [alsa-devel] [PATCH v3 1/8] ASoC: soc-pcm: add snd_soc_runtime_action() Kuninori Morimoto
2020-02-11 15:48   ` [alsa-devel] Applied "ASoC: soc-pcm: add snd_soc_runtime_action()" to the asoc tree Mark Brown
2020-02-10  3:14 ` [alsa-devel] [PATCH v3 2/8] ASoC: soc-pcm: adjustment for DAI member 0 reset Kuninori Morimoto
2020-02-11 15:48   ` [alsa-devel] Applied "ASoC: soc-pcm: adjustment for DAI member 0 reset" to the asoc tree Mark Brown
2020-02-10  3:14 ` [alsa-devel] [PATCH v3 3/8] ASoC: soc-pcm: add for_each_dapm_widgets() macro Kuninori Morimoto
2020-02-11 15:48   ` [alsa-devel] Applied "ASoC: soc-pcm: add for_each_dapm_widgets() macro" to the asoc tree Mark Brown
2020-02-10  3:14 ` [alsa-devel] [PATCH v3 4/8] ASoC: soc-pcm: don't use bit-OR'ed error Kuninori Morimoto
2020-02-11 15:48   ` [alsa-devel] Applied "ASoC: soc-pcm: don't use bit-OR'ed error" to the asoc tree Mark Brown
2020-02-10  3:14 ` [alsa-devel] [PATCH v3 5/8] ASoC: soc-pcm: call snd_soc_dai_startup()/shutdown() once Kuninori Morimoto
2020-02-11 15:48   ` [alsa-devel] Applied "ASoC: soc-pcm: call snd_soc_dai_startup()/shutdown() once" to the asoc tree Mark Brown
2020-03-27 18:16   ` [alsa-devel] [PATCH v3 5/8] ASoC: soc-pcm: call snd_soc_dai_startup()/shutdown() once Amadeusz Sławiński
2020-03-27 18:38     ` Pierre-Louis Bossart
2020-03-30  1:10       ` Kuninori Morimoto
2020-03-30  7:25         ` Amadeusz Sławiński
2020-03-30 11:08           ` Mark Brown
2020-03-30 23:28             ` Kuninori Morimoto
2020-02-10  3:14 ` [alsa-devel] [PATCH v3 6/8] ASoC: soc-pcm: call snd_soc_component_open/close() once Kuninori Morimoto
2020-02-10 14:41   ` Pierre-Louis Bossart
2020-02-11 12:16     ` Mark Brown
2020-02-12  0:32       ` Kuninori Morimoto
2020-02-12  1:16         ` Kuninori Morimoto
2020-02-12 15:26           ` Pierre-Louis Bossart
2020-02-12 23:57   ` [alsa-devel] Applied "ASoC: soc-pcm: call snd_soc_component_open/close() once" to the asoc tree Mark Brown
2020-02-10  3:14 ` [alsa-devel] [PATCH v3 7/8] ASoC: soc-pcm: move soc_pcm_close() next to soc_pcm_open() Kuninori Morimoto
2020-02-12 23:57   ` Mark Brown [this message]
2020-02-10  3:14 ` [alsa-devel] [PATCH v3 8/8] ASoC: soc-pcm: tidyup soc_pcm_open() order Kuninori Morimoto
2020-02-12 23:57   ` [alsa-devel] Applied "ASoC: soc-pcm: tidyup soc_pcm_open() order" to the asoc tree Mark Brown
     [not found] ` <87d0anceze.wl-kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2020-02-18 19:14   ` [alsa-devel] [PATCH v3 0/7] ASoC: soc-pcm cleanup step2 Dmitry Osipenko
2020-02-18 19:14     ` Dmitry Osipenko
     [not found]     ` <5d19876d-86a4-a461-f47a-68c7ba1f46ac-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-02-19  1:30       ` Kuninori Morimoto
2020-02-19  1:30         ` Kuninori Morimoto
2020-02-19 16:09       ` Pierre-Louis Bossart
2020-02-19 16:09         ` Pierre-Louis Bossart
     [not found]         ` <d60ccad5-9c52-551b-ae22-2815ab768a59-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2020-02-19 17:01           ` Kai Vehmanen
2020-02-19 17:01             ` Kai Vehmanen
     [not found]             ` <alpine.DEB.2.21.2002191900170.2957-cz35TXaqH4VICrp9aNEsHNh3ngVCH38I@public.gmane.org>
2020-02-19 17:03               ` Mark Brown
2020-02-19 17:03                 ` 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=applied-8736bjcexx.wl-kuninori.morimoto.gx@renesas.com \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    /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.