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: Applied "ASoC: soc-component: add snd_soc_component_is_suspended()" to the asoc tree
Date: Mon,  5 Aug 2019 17:09:59 +0100 (BST)	[thread overview]
Message-ID: <20190805160959.4B5E42742D06@ypsilon.sirena.org.uk> (raw)
In-Reply-To: <874l395rlx.wl-kuninori.morimoto.gx@renesas.com>

The patch

   ASoC: soc-component: add snd_soc_component_is_suspended()

has been applied to the asoc tree at

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

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 e40fadbcef583808c11d2e86b8ac1c652731468e Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Fri, 26 Jul 2019 13:51:13 +0900
Subject: [PATCH] ASoC: soc-component: add snd_soc_component_is_suspended()

Current ALSA SoC is directly using component->xxx,
But, it is not good for encapsulation.
This patch adds new snd_soc_component_is_suspended() and use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/874l395rlx.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 include/sound/soc-component.h | 1 +
 sound/soc/soc-component.c     | 5 +++++
 sound/soc/soc-core.c          | 5 ++---
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index 1e3b70855ba7..9600dc4ca6b4 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -355,5 +355,6 @@ int snd_soc_component_trigger(struct snd_soc_component *component,
 			      int cmd);
 void snd_soc_component_suspend(struct snd_soc_component *component);
 void snd_soc_component_resume(struct snd_soc_component *component);
+int snd_soc_component_is_suspended(struct snd_soc_component *component);
 
 #endif /* __SOC_COMPONENT_H */
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index cbae7672b72d..0a9ca84d7ac6 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -361,3 +361,8 @@ void snd_soc_component_resume(struct snd_soc_component *component)
 		component->driver->resume(component);
 	component->suspended = 0;
 }
+
+int snd_soc_component_is_suspended(struct snd_soc_component *component)
+{
+	return component->suspended;
+}
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 6cdfe7b2fe06..ea93edd328a2 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -503,7 +503,7 @@ int snd_soc_suspend(struct device *dev)
 		 * If there are paths active then the COMPONENT will be held
 		 * with bias _ON and should not be suspended.
 		 */
-		if (!component->suspended) {
+		if (!snd_soc_component_is_suspended(component)) {
 			switch (snd_soc_dapm_get_bias_level(dapm)) {
 			case SND_SOC_BIAS_STANDBY:
 				/*
@@ -592,9 +592,8 @@ static void soc_resume_deferred(struct work_struct *work)
 	}
 
 	for_each_card_components(card, component) {
-		if (component->suspended) {
+		if (snd_soc_component_is_suspended(component))
 			snd_soc_component_resume(component);
-		}
 	}
 
 	for_each_card_rtds(card, rtd) {
-- 
2.20.1

  reply	other threads:[~2019-08-05 16:10 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-26  4:48 [PATCH v2 00/29] ASoC: add soc-component.c Kuninori Morimoto
2019-07-26  4:49 ` [PATCH v2 01/29] ASoC: Intel: skl-pcm: disable skl_get_time_info Kuninori Morimoto
2019-08-05 15:45   ` Mark Brown
2019-08-05 16:06     ` Pierre-Louis Bossart
2019-08-06  0:00       ` Kuninori Morimoto
2019-07-26  4:49 ` [PATCH v2 02/29] ASoC: soc-pcm: remove soc_rtdcom_ack() Kuninori Morimoto
2019-08-05 16:10   ` Applied "ASoC: soc-pcm: remove soc_rtdcom_ack()" to the asoc tree Mark Brown
2019-07-26  4:49 ` [PATCH v2 03/29] ASoC: soc-pcm: remove soc_rtdcom_copy_kernel() Kuninori Morimoto
2019-08-05 16:10   ` Applied "ASoC: soc-pcm: remove soc_rtdcom_copy_kernel()" to the asoc tree Mark Brown
2019-07-26  4:49 ` [PATCH v2 04/29] ASoC: soc-pcm: remove soc_fill_silence() Kuninori Morimoto
2019-08-05 16:10   ` Applied "ASoC: soc-pcm: remove soc_fill_silence()" to the asoc tree Mark Brown
2019-07-26  4:49 ` [PATCH v2 05/29] ASoC: add soc-component.c Kuninori Morimoto
2019-08-05 16:10   ` Applied "ASoC: add soc-component.c" to the asoc tree Mark Brown
2019-07-26  4:49 ` [PATCH v2 06/29] ASoC: soc-component: add snd_soc_component_get/put() Kuninori Morimoto
2019-08-05 16:10   ` Applied "ASoC: soc-component: add snd_soc_component_get/put()" to the asoc tree Mark Brown
2019-07-26  4:50 ` [PATCH v2 07/29] ASoC: soc-component: add snd_soc_component_open() Kuninori Morimoto
2019-08-05 16:10   ` Applied "ASoC: soc-component: add snd_soc_component_open()" to the asoc tree Mark Brown
2019-07-26  4:50 ` [PATCH v2 08/29] ASoC: soc-component: add snd_soc_component_close() Kuninori Morimoto
2019-08-05 16:10   ` Applied "ASoC: soc-component: add snd_soc_component_close()" to the asoc tree Mark Brown
2019-07-26  4:50 ` [PATCH v2 09/29] ASoC: soc-component: add snd_soc_component_prepare() Kuninori Morimoto
2019-08-05 16:10   ` Applied "ASoC: soc-component: add snd_soc_component_prepare()" to the asoc tree Mark Brown
2019-07-26  4:50 ` [PATCH v2 10/29] ASoC: soc-component: add snd_soc_component_hw_params() Kuninori Morimoto
2019-08-05 16:10   ` Applied "ASoC: soc-component: add snd_soc_component_hw_params()" to the asoc tree Mark Brown
2019-07-26  4:50 ` [PATCH v2 11/29] ASoC: soc-component: add snd_soc_component_hw_free() Kuninori Morimoto
2019-08-05 16:10   ` Applied "ASoC: soc-component: add snd_soc_component_hw_free()" to the asoc tree Mark Brown
2019-07-26  4:50 ` [PATCH v2 12/29] ASoC: soc-component: add snd_soc_component_trigger() Kuninori Morimoto
2019-08-05 16:09   ` Applied "ASoC: soc-component: add snd_soc_component_trigger()" to the asoc tree Mark Brown
2019-07-26  4:50 ` [PATCH v2 13/29] ASoC: soc-component: add snd_soc_component_suspend() Kuninori Morimoto
2019-08-05 16:09   ` Applied "ASoC: soc-component: add snd_soc_component_suspend()" to the asoc tree Mark Brown
2019-07-26  4:51 ` [PATCH v2 14/29] ASoC: soc-component: add snd_soc_component_resume() Kuninori Morimoto
2019-08-05 16:09   ` Applied "ASoC: soc-component: add snd_soc_component_resume()" to the asoc tree Mark Brown
2019-07-26  4:51 ` [PATCH v2 15/29] ASoC: soc-component: add snd_soc_component_is_suspended() Kuninori Morimoto
2019-08-05 16:09   ` Mark Brown [this message]
2019-07-26  4:51 ` [PATCH v2 16/29] ASoC: soc-component: add snd_soc_component_probe() Kuninori Morimoto
2019-08-05 16:09   ` Applied "ASoC: soc-component: add snd_soc_component_probe()" to the asoc tree Mark Brown
2019-07-26  4:51 ` [PATCH v2 17/29] ASoC: soc-component: add snd_soc_component_remove() Kuninori Morimoto
2019-08-05 16:09   ` Applied "ASoC: soc-component: add snd_soc_component_remove()" to the asoc tree Mark Brown
2019-07-26  4:51 ` [PATCH v2 18/29] ASoC: soc-component: add snd_soc_component_of_xlate_dai_id() Kuninori Morimoto
2019-08-05 16:09   ` Applied "ASoC: soc-component: add snd_soc_component_of_xlate_dai_id()" to the asoc tree Mark Brown
2019-07-26  4:51 ` [PATCH v2 19/29] ASoC: soc-component: add snd_soc_component_of_xlate_dai_name() Kuninori Morimoto
2019-08-05 16:09   ` Applied "ASoC: soc-component: add snd_soc_component_of_xlate_dai_name()" to the asoc tree Mark Brown
2019-07-26  4:51 ` [PATCH v2 20/29] ASoC: soc-component: move snd_soc_component_seq_notifier() Kuninori Morimoto
2019-08-05 16:09   ` Applied "ASoC: soc-component: move snd_soc_component_seq_notifier()" to the asoc tree Mark Brown
2019-07-26  4:51 ` [PATCH v2 21/29] ASoC: soc-component: move snd_soc_component_stream_event() Kuninori Morimoto
2019-08-05 16:09   ` Applied "ASoC: soc-component: move snd_soc_component_stream_event()" to the asoc tree Mark Brown
2019-07-26  4:51 ` [PATCH v2 22/29] ASoC: soc-component: move snd_soc_component_set_bias_level() Kuninori Morimoto
2019-08-05 16:09   ` Applied "ASoC: soc-component: move snd_soc_component_set_bias_level()" to the asoc tree Mark Brown
2019-07-26  4:51 ` [PATCH v2 23/29] ASoC: soc-component: add snd_soc_pcm_component_pointer() Kuninori Morimoto
2019-08-05 16:09   ` Applied "ASoC: soc-component: add snd_soc_pcm_component_pointer()" to the asoc tree Mark Brown
2019-07-26  4:51 ` [PATCH v2 24/29] ASoC: soc-component: add snd_soc_pcm_component_ioctrl() Kuninori Morimoto
2019-08-05 16:09   ` Applied "ASoC: soc-component: add snd_soc_pcm_component_ioctrl()" to the asoc tree Mark Brown
2019-07-26  4:51 ` [PATCH v2 25/29] ASoC: soc-component: add snd_soc_pcm_component_copy_user() Kuninori Morimoto
2019-08-05 16:09   ` Applied "ASoC: soc-component: add snd_soc_pcm_component_copy_user()" to the asoc tree Mark Brown
2019-07-26  4:52 ` [PATCH v2 26/29] ASoC: soc-component: add snd_soc_pcm_component_page() Kuninori Morimoto
2019-08-05 16:09   ` Applied "ASoC: soc-component: add snd_soc_pcm_component_page()" to the asoc tree Mark Brown
2019-07-26  4:52 ` [PATCH v2 27/29] ASoC: soc-component: add snd_soc_pcm_component_mmap() Kuninori Morimoto
2019-08-05 16:09   ` Applied "ASoC: soc-component: add snd_soc_pcm_component_mmap()" to the asoc tree Mark Brown
2019-07-26  4:52 ` [PATCH v2 28/29] ASoC: soc-component: add snd_soc_pcm_component_pcm_new() Kuninori Morimoto
2019-08-05 16:09   ` Applied "ASoC: soc-component: add snd_soc_pcm_component_pcm_new()" to the asoc tree Mark Brown
2019-07-26  4:52 ` [PATCH v2 29/29] ASoC: soc-component: add snd_soc_pcm_component_pcm_free() Kuninori Morimoto
2019-08-05 16:09   ` Applied "ASoC: soc-component: add snd_soc_pcm_component_pcm_free()" to the asoc tree 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=20190805160959.4B5E42742D06@ypsilon.sirena.org.uk \
    --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.