diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2020-02-10 04:14:33 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-02-11 16:42:03 +0100 |
commit | b56be800f1292c9b79c4f66571c701551bdf9e12 (patch) | |
tree | f41a73610442b8a5a7f1c478052d0f543f920d0d /include/sound | |
parent | ASoC: soc-pcm: don't use bit-OR'ed error (diff) | |
download | linux-b56be800f1292c9b79c4f66571c701551bdf9e12.tar.xz linux-b56be800f1292c9b79c4f66571c701551bdf9e12.zip |
ASoC: soc-pcm: call snd_soc_dai_startup()/shutdown() once
Current soc_pcm_open() calls snd_soc_dai_startup() under loop.
Thus, it needs to care about started/not-yet-started codec DAI.
But, if soc-dai.c is handling it, soc-pcm.c don't need to care
about it.
This patch adds started flag to soc-dai.h, and simplify soc-pcm.c.
This is one of prepare for cleanup soc-pcm-open()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/875zgfcey5.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/soc-dai.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index eaaeb00e9e84..04c23ac0dfff 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h @@ -324,7 +324,6 @@ struct snd_soc_dai { /* DAI runtime info */ unsigned int capture_active; /* stream usage count */ unsigned int playback_active; /* stream usage count */ - unsigned int probed:1; unsigned int active; @@ -348,6 +347,10 @@ struct snd_soc_dai { unsigned int rx_mask; struct list_head list; + + /* bit field */ + unsigned int probed:1; + unsigned int started:1; }; static inline void *snd_soc_dai_get_dma_data(const struct snd_soc_dai *dai, |