commit 0812a08ac8d054efc6cf2895d3b0e82c8731f8e9
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Fri May 15 09:48:02 2020 +0900
ASoC: cleanup dai / component active code
No one is using dai->active, snd_soc_component_is_active().
Let's remove these.
commit efffd9b344adbf813e3ae6f6136df80000bf2833
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Fri May 15 09:46:37 2020 +0900
ASoC: soc-dai: add snd_soc_dai_active()
Current snd_soc_dai_action() is updating
dai->stream_active for Playback/Capture (A),
dai->active for DAI (B)
void snd_soc_dai_action(struct snd_soc_dai *dai,
int stream, int action)
{
(A) dai->stream_active[stream] += action;
(B) dai->active += action;
dai->component->active += action;
}
But, these are very verbose, because we can calculate
DAI active from stream_active.
This patch adds snd_soc_dai_active() which calculate
DAI active from DAI stream_active.
perl -pi -e 's(->capture_active)(->stream_active\[SNDRV_PCM_STREAM_CAPTURE\])g' *.c
perl -pi -e 's(->playback_active)(->stream_active\[SNDRV_PCM_STREAM_PLAYBACK\])g' *.c
commit 0f6011fd79a2fb92cb80177fd6bdc8aac3a3cd93
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Mon Feb 17 17:28:15 2020 +0900
ASoC: soc-pcm: merge playback/cature_active into stream_active
DAI has playback_active and capture_active to care usage count.
OTOH, we have SNDRV_PCM_STREAM_PLAYBACK/CAPTURE.
But because of this kind of implementation mismatch,
ALSA SoC has many verbose code.
To solve this issue, this patch merge playback_active/capture_active
into stream_active[2];