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 25/25] ASoC: soc-component: move snd_soc_component_set_bias_level()
Date: 24 Jul 2019 10:53:47 +0900	[thread overview]
Message-ID: <8736iwtd3r.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_set_bias_level() to soc-component.c
It will be used at soc-dapm.c :: snd_soc_dapm_force_bias_level(),
but no effect by this patch.

	int snd_soc_dapm_force_bias_level(...)
	{
=>		int ret = 0;

=>		if (dapm->set_bias_level)
=>			ret = dapm->set_bias_level(dapm, level);
		...
	}

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 8c88058..7c9ae25 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -278,6 +278,8 @@ 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);
+int snd_soc_component_set_bias_level(struct snd_soc_dapm_context *dapm,
+				     enum snd_soc_bias_level level);
 
 #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 ab8e7cc..b7a7ec7 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -71,6 +71,16 @@ int snd_soc_component_stream_event(struct snd_soc_dapm_context *dapm,
 	return 0;
 }
 
+int snd_soc_component_set_bias_level(struct snd_soc_dapm_context *dapm,
+				     enum snd_soc_bias_level level)
+{
+	struct snd_soc_component *component = dapm->component;
+
+	if (component->driver->set_bias_level)
+		return component->driver->set_bias_level(component, level);
+	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 6f7de6a..112bde1 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_set_bias_level(struct snd_soc_dapm_context *dapm,
-					enum snd_soc_bias_level level)
-{
-	struct snd_soc_component *component = dapm->component;
-
-	return component->driver->set_bias_level(component, level);
-}
-
 static int snd_soc_component_initialize(struct snd_soc_component *component,
 	const struct snd_soc_component_driver *driver, struct device *dev)
 {
@@ -2722,8 +2714,7 @@ static int snd_soc_component_initialize(struct snd_soc_component *component,
 	dapm->suspend_bias_off = driver->suspend_bias_off;
 	dapm->seq_notifier = snd_soc_component_seq_notifier;
 	dapm->stream_event = snd_soc_component_stream_event;
-	if (driver->set_bias_level)
-		dapm->set_bias_level = snd_soc_component_set_bias_level;
+	dapm->set_bias_level = snd_soc_component_set_bias_level;
 
 	INIT_LIST_HEAD(&component->dai_list);
 	mutex_init(&component->io_mutex);
-- 
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 ` [PATCH 24/25] ASoC: soc-component: move snd_soc_component_stream_event() Kuninori Morimoto
2019-07-24  9:37   ` Charles Keepax
2019-07-25  1:54     ` Kuninori Morimoto
2019-07-24  1:53 ` Kuninori Morimoto [this message]

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=8736iwtd3r.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.