From: Kuninori Morimoto Subject: [PATCH 23/25] ASoC: soc-component: move snd_soc_component_seq_notifier() Date: 24 Jul 2019 10:53:22 +0900 Message-ID: <875znstd4h.wl-kuninori.morimoto.gx@renesas.com> References: <8736iwurtc.wl-kuninori.morimoto.gx@renesas.com> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 61945F8026F for ; Wed, 24 Jul 2019 03:53:23 +0200 (CEST) In-Reply-To: <8736iwurtc.wl-kuninori.morimoto.gx@renesas.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" To: Mark Brown Cc: Linux-ALSA List-Id: alsa-devel@alsa-project.org From: Kuninori Morimoto This patch moves snd_soc_component_seq_notifier() to soc-component.c It will be used at soc-dapm.c :: dapm_seq_run(), but no effect by this patch. static void dapm_seq_run(...) { ... => if (cur_dapm && cur_dapm->seq_notifier) { for (i = 0; i < ARRAY_SIZE(dapm_up_seq); i++) if (sort[i] == cur_sort) => cur_dapm->seq_notifier(cur_dapm, i, cur_subseq); } ... } Signed-off-by: Kuninori Morimoto --- include/sound/soc-component.h | 4 ++++ sound/soc/soc-component.c | 9 +++++++++ sound/soc/soc-core.c | 11 +---------- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h index 37b25cc..4711138 100644 --- a/include/sound/soc-component.h +++ b/include/sound/soc-component.h @@ -273,6 +273,10 @@ int snd_soc_component_set_pll(struct snd_soc_component *component, int pll_id, int snd_soc_component_set_jack(struct snd_soc_component *component, struct snd_soc_jack *jack, void *data); +/* for dapm */ +void snd_soc_component_seq_notifier(struct snd_soc_dapm_context *dapm, + enum snd_soc_dapm_type type, int subseq); + #ifdef CONFIG_REGMAP void snd_soc_component_init_regmap(struct snd_soc_component *component, struct regmap *regmap); diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c index 732f06a..e4e8fc4 100644 --- a/sound/soc/soc-component.c +++ b/sound/soc/soc-component.c @@ -52,6 +52,15 @@ int snd_soc_component_set_pll(struct snd_soc_component *component, int pll_id, } EXPORT_SYMBOL_GPL(snd_soc_component_set_pll); +void snd_soc_component_seq_notifier(struct snd_soc_dapm_context *dapm, + enum snd_soc_dapm_type type, int subseq) +{ + struct snd_soc_component *component = dapm->component; + + if (component->driver->seq_notifier) + component->driver->seq_notifier(component, type, subseq); +} + 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 573192d..84ded01 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 void snd_soc_component_seq_notifier(struct snd_soc_dapm_context *dapm, - enum snd_soc_dapm_type type, int subseq) -{ - struct snd_soc_component *component = dapm->component; - - component->driver->seq_notifier(component, type, subseq); -} - static int snd_soc_component_stream_event(struct snd_soc_dapm_context *dapm, int event) { @@ -2736,8 +2728,7 @@ static int snd_soc_component_initialize(struct snd_soc_component *component, dapm->bias_level = SND_SOC_BIAS_OFF; dapm->idle_bias_off = !driver->idle_bias_on; dapm->suspend_bias_off = driver->suspend_bias_off; - if (driver->seq_notifier) - dapm->seq_notifier = snd_soc_component_seq_notifier; + dapm->seq_notifier = snd_soc_component_seq_notifier; if (driver->stream_event) dapm->stream_event = snd_soc_component_stream_event; if (driver->set_bias_level) -- 2.7.4