ASoC: soc-component: add snd_soc_component_active()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/875zcy6n4d.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Kuninori Morimoto 2020-05-15 09:46:42 +09:00 committed by Mark Brown
parent efffd9b344
commit 488b2ca599
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
2 changed files with 7 additions and 0 deletions

View File

@ -395,6 +395,12 @@ static inline bool snd_soc_component_is_active(
return component->active != 0; return component->active != 0;
} }
static inline unsigned int
snd_soc_component_active(struct snd_soc_component *component)
{
return component->active;
}
/* component pin */ /* component pin */
int snd_soc_component_enable_pin(struct snd_soc_component *component, int snd_soc_component_enable_pin(struct snd_soc_component *component,
const char *pin); const char *pin);

View File

@ -393,6 +393,7 @@ void snd_soc_dai_action(struct snd_soc_dai *dai,
{ {
dai->stream_active[stream] += action; dai->stream_active[stream] += action;
dai->active += action; dai->active += action;
/* see snd_soc_component_active() */
dai->component->active += action; dai->component->active += action;
} }
EXPORT_SYMBOL_GPL(snd_soc_dai_action); EXPORT_SYMBOL_GPL(snd_soc_dai_action);