From: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx> 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@xxxxxxxxxxx> --- 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 _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx https://mailman.alsa-project.org/mailman/listinfo/alsa-devel