summaryrefslogtreecommitdiff
path: root/include/sound
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2016-11-30 06:23:13 +0000
committerMark Brown <broonie@kernel.org>2016-12-01 20:09:58 +0000
commit9178feb4538e055bf22be44c38b90cc31d2baf99 (patch)
tree63087e319e278776b96beacbdf3c6e41bf777b5b /include/sound
parent1a653aa44725668590b36bbe2d7fe4736a69f055 (diff)
ASoC: add Component level suspend/resume
In current ALSA SoC, Codec only has suspend/resume feature, but it should be supported on Component level. This patch adds it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 0bd57b77d010..13cc64e5bb77 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -782,6 +782,8 @@ struct snd_soc_component_driver {
int (*probe)(struct snd_soc_component *);
void (*remove)(struct snd_soc_component *);
+ int (*suspend)(struct snd_soc_component *);
+ int (*resume)(struct snd_soc_component *);
/* DT */
int (*of_xlate_dai_name)(struct snd_soc_component *component,
@@ -808,6 +810,7 @@ struct snd_soc_component {
unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */
unsigned int registered_as_component:1;
unsigned int auxiliary:1; /* for auxiliary component of the card */
+ unsigned int suspended:1; /* is in suspend PM state */
struct list_head list;
struct list_head card_list;
@@ -853,6 +856,8 @@ struct snd_soc_component {
int (*probe)(struct snd_soc_component *);
void (*remove)(struct snd_soc_component *);
+ int (*suspend)(struct snd_soc_component *);
+ int (*resume)(struct snd_soc_component *);
/* machine specific init */
int (*init)(struct snd_soc_component *component);
@@ -872,7 +877,6 @@ struct snd_soc_codec {
/* runtime */
unsigned int cache_bypass:1; /* Suppress access to the cache */
- unsigned int suspended:1; /* Codec is in suspend PM state */
unsigned int cache_init:1; /* codec cache has been initialized */
/* codec IO */