ASoC: soc-dai: add snd_soc_dai_stream_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/874ksi6n48.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:47 +09:00 committed by Mark Brown
parent 488b2ca599
commit 5552f8d728
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0
2 changed files with 7 additions and 0 deletions

View file

@ -481,4 +481,10 @@ static inline void *snd_soc_dai_get_sdw_stream(struct snd_soc_dai *dai,
return ERR_PTR(-ENOTSUPP);
}
static inline unsigned int
snd_soc_dai_stream_active(struct snd_soc_dai *dai, int stream)
{
return dai->stream_active[stream];
}
#endif

View file

@ -391,6 +391,7 @@ bool snd_soc_dai_stream_valid(struct snd_soc_dai *dai, int dir)
void snd_soc_dai_action(struct snd_soc_dai *dai,
int stream, int action)
{
/* see snd_soc_dai_stream_active() */
dai->stream_active[stream] += action;
dai->active += action;
/* see snd_soc_component_active() */