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 24/25] ASoC: soc-component: move snd_soc_component_stream_event()
Date: 24 Jul 2019 10:53:37 +0900	[thread overview]
Message-ID: <874l3ctd42.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <8736iwurtc.wl-kuninori.morimoto.gx@renesas.com>

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

This patch moves snd_soc_component_stream_event() to soc-component.c
It will be used at soc-dapm.c :: dapm_power_widgets(),
but no effect by this patch.

	static int dapm_power_widgets(struct snd_soc_card *card, int event)
	{
		...
		list_for_each_entry(d, &card->dapm_list, list) {
=>			if (d->stream_event)
=>				d->stream_event(d, event);
		}
		...
	}

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 include/sound/soc-component.h |  2 ++
 sound/soc/soc-component.c     | 10 ++++++++++
 sound/soc/soc-core.c          | 11 +----------
 3 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index 4711138..8c88058 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -276,6 +276,8 @@ int snd_soc_component_set_jack(struct snd_soc_component *component,
 /* for dapm */
 void snd_soc_component_seq_notifier(struct snd_soc_dapm_context *dapm,
 				    enum snd_soc_dapm_type type, int subseq);
+int snd_soc_component_stream_event(struct snd_soc_dapm_context *dapm,
+				   int event);
 
 #ifdef CONFIG_REGMAP
 void snd_soc_component_init_regmap(struct snd_soc_component *component,
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index e4e8fc4..ab8e7cc 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -61,6 +61,16 @@ void snd_soc_component_seq_notifier(struct snd_soc_dapm_context *dapm,
 		component->driver->seq_notifier(component, type, subseq);
 }
 
+int snd_soc_component_stream_event(struct snd_soc_dapm_context *dapm,
+				   int event)
+{
+	struct snd_soc_component *component = dapm->component;
+
+	if (component->driver->stream_event)
+		return component->driver->stream_event(component, event);
+	return 0;
+}
+
 int snd_soc_component_enable_pin(struct snd_soc_component *component,
 				 const char *pin)
 {
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 84ded01..6f7de6a 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2692,14 +2692,6 @@ int snd_soc_register_dai(struct snd_soc_component *component,
 }
 EXPORT_SYMBOL_GPL(snd_soc_register_dai);
 
-static int snd_soc_component_stream_event(struct snd_soc_dapm_context *dapm,
-	int event)
-{
-	struct snd_soc_component *component = dapm->component;
-
-	return component->driver->stream_event(component, event);
-}
-
 static int snd_soc_component_set_bias_level(struct snd_soc_dapm_context *dapm,
 					enum snd_soc_bias_level level)
 {
@@ -2729,8 +2721,7 @@ static int snd_soc_component_initialize(struct snd_soc_component *component,
 	dapm->idle_bias_off = !driver->idle_bias_on;
 	dapm->suspend_bias_off = driver->suspend_bias_off;
 	dapm->seq_notifier = snd_soc_component_seq_notifier;
-	if (driver->stream_event)
-		dapm->stream_event = snd_soc_component_stream_event;
+	dapm->stream_event = snd_soc_component_stream_event;
 	if (driver->set_bias_level)
 		dapm->set_bias_level = snd_soc_component_set_bias_level;
 
-- 
2.7.4

  parent reply	other threads:[~2019-07-24  1:53 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-24  1:50 [PATCH 00/25] ASoC: add soc-component.c Kuninori Morimoto
2019-07-24  1:51 ` [PATCH 01/25] " Kuninori Morimoto
2019-07-24  1:51 ` [PATCH 02/25] ASoC: soc-component: add snd_soc_component_get/put() Kuninori Morimoto
2019-07-24  9:25   ` Charles Keepax
2019-07-25  1:52     ` Kuninori Morimoto
2019-07-24  1:51 ` [PATCH 03/25] ASoC: soc-component: add snd_soc_component_open() Kuninori Morimoto
2019-07-24  1:51 ` [PATCH 04/25] ASoC: soc-component: add snd_soc_component_close() Kuninori Morimoto
2019-07-24  1:51 ` [PATCH 05/25] ASoC: soc-component: add snd_soc_component_prepare() Kuninori Morimoto
2019-07-25 19:59   ` Cezary Rojewski
2019-07-26  0:53     ` Kuninori Morimoto
2019-07-24  1:51 ` [PATCH 06/25] ASoC: soc-component: add snd_soc_component_hw_params() Kuninori Morimoto
2019-07-24  1:51 ` [PATCH 07/25] ASoC: soc-component: add snd_soc_component_hw_free() Kuninori Morimoto
2019-07-25  0:35   ` Ranjani Sridharan
2019-07-25  1:55     ` Kuninori Morimoto
2019-07-24  1:51 ` [PATCH 08/25] ASoC: soc-component: add snd_soc_component_trigger() Kuninori Morimoto
2019-07-24  1:52 ` [PATCH 09/25] ASoC: soc-component: add snd_soc_component_pointer() Kuninori Morimoto
2019-07-24  9:13   ` Charles Keepax
2019-07-24  9:26     ` Kuninori Morimoto
2019-07-24  1:52 ` [PATCH 10/25] ASoC: soc-component: add snd_soc_component_ioctrl() Kuninori Morimoto
2019-07-24  9:23   ` Charles Keepax
2019-07-25  1:51     ` Kuninori Morimoto
2019-07-24  1:52 ` [PATCH 11/25] ASoC: soc-component: add snd_soc_component_copy_user() Kuninori Morimoto
2019-07-24  1:52 ` [PATCH 12/25] ASoC: soc-component: add snd_soc_component_page() Kuninori Morimoto
2019-07-24  1:52 ` [PATCH 13/25] ASoC: soc-component: add snd_soc_component_mmap() Kuninori Morimoto
2019-07-24  1:52 ` [PATCH 14/25] ASoC: soc-component: add snd_soc_component_pcm_new() Kuninori Morimoto
2019-07-24  1:52 ` [PATCH 15/25] ASoC: soc-component: add snd_soc_component_pcm_free() Kuninori Morimoto
2019-07-24  1:52 ` [PATCH 16/25] ASoC: soc-component: add snd_soc_component_suspend() Kuninori Morimoto
2019-07-24  1:52 ` [PATCH 17/25] ASoC: soc-component: add snd_soc_component_resume() Kuninori Morimoto
2019-07-24  1:52 ` [PATCH 18/25] ASoC: soc-component: add snd_soc_component_is_suspended() Kuninori Morimoto
2019-07-24  1:52 ` [PATCH 19/25] ASoC: soc-component: add snd_soc_component_probe() Kuninori Morimoto
2019-07-24  1:52 ` [PATCH 20/25] ASoC: soc-component: add snd_soc_component_remove() Kuninori Morimoto
2019-07-24  1:52 ` [PATCH 21/25] ASoC: soc-component: add snd_soc_component_of_xlate_dai_id() Kuninori Morimoto
2019-07-24  1:53 ` [PATCH 22/25] ASoC: soc-component: add snd_soc_component_of_xlate_dai_name() Kuninori Morimoto
2019-07-24  1:53 ` [PATCH 23/25] ASoC: soc-component: move snd_soc_component_seq_notifier() Kuninori Morimoto
2019-07-24  9:35   ` Charles Keepax
2019-07-25  1:54     ` Kuninori Morimoto
2019-07-24  1:53 ` Kuninori Morimoto [this message]
2019-07-24  9:37   ` [PATCH 24/25] ASoC: soc-component: move snd_soc_component_stream_event() Charles Keepax
2019-07-25  1:54     ` Kuninori Morimoto
2019-07-24  1:53 ` [PATCH 25/25] ASoC: soc-component: move snd_soc_component_set_bias_level() Kuninori Morimoto

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=874l3ctd42.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.