diff options
| author | Kuninori Morimoto <[email protected]> | 2020-02-10 12:14:37 +0900 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2020-02-12 23:51:36 +0000 |
| commit | dd03907bf129b42e9e3203fdf405ea9873b28dd3 (patch) | |
| tree | ac89a5bd09b65a3f91c4abdce6ba181e8c5f8993 /include | |
| parent | 514de1c935d1670e0f162210f3794cf0be67c8a7 (diff) | |
ASoC: soc-pcm: call snd_soc_component_open/close() once
Current soc_pcm_open() calls snd_soc_component_open() under loop.
Thus, it needs to care about opened/not-yet-opened Component.
But, if soc-component.c is handling it, soc-pcm.c don't need to care
about it.
This patch adds opened flag to soc-component.h, and simplify soc-pcm.c.
This is one of prepare for cleanup soc-pcm-open()
Signed-off-by: Kuninori Morimoto <[email protected]>
Reviewed-by: Pierre-Louis Bossart <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sound/soc-component.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h index 154d02fbbfed..1866ecc8e94b 100644 --- a/include/sound/soc-component.h +++ b/include/sound/soc-component.h @@ -147,8 +147,6 @@ struct snd_soc_component { unsigned int active; - unsigned int suspended:1; /* is in suspend PM state */ - struct list_head list; struct list_head card_aux_list; /* for auxiliary bound components */ struct list_head card_list; @@ -182,6 +180,11 @@ struct snd_soc_component { struct dentry *debugfs_root; const char *debugfs_prefix; #endif + + /* bit field */ + unsigned int suspended:1; /* is in suspend PM state */ + unsigned int opened:1; + unsigned int module:1; }; #define for_each_component_dais(component, dai)\ |