diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2017-09-26 04:01:10 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-09-27 20:11:14 +0300 |
commit | 7ba236ce58bd7ac8e360de81f834d9c446f7b063 (patch) | |
tree | f443c35583a4e4c83a71b09c7ce8bb35aadf724c /include/sound | |
parent | f523acebbb74f3cf5840d801f2e4856c688bf14a (diff) | |
download | linux-7ba236ce58bd7ac8e360de81f834d9c446f7b063.tar.xz |
ASoC: add Component level set_bias_level
In current ALSA SoC, Codec only has set_bias_level feature.
Codec will be merged into Component in next generation ALSA SoC,
thus current Codec specific feature need to be merged into it.
This is glue patch for it.
Codec driver has .idle_bias_off for dapm bias. But Component
driver doesn't have it, and dapm->idle_bias_off is set as "true".
To keep compatibility, this patch adds "idle_bias_on" instead of
".idle_bias_off" on Component driver.
dapm->idle_bias_off will be set by inverted idle_bias_on.
When we replace Codec to Component, the driver which has
".idle_bias_off = true" is just remove it,
and the driver which doesn't have it will have new
".idle_bias_on = true".
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.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index c2278614e5bf..d776cdee30d7 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -816,10 +816,16 @@ struct snd_soc_component_driver { void (*seq_notifier)(struct snd_soc_component *, enum snd_soc_dapm_type, int subseq); int (*stream_event)(struct snd_soc_component *, int event); + int (*set_bias_level)(struct snd_soc_component *component, + enum snd_soc_bias_level level); /* probe ordering - for components with runtime dependencies */ int probe_order; int remove_order; + + /* bits */ + unsigned int idle_bias_on:1; + unsigned int suspend_bias_off:1; }; struct snd_soc_component { @@ -885,6 +891,8 @@ struct snd_soc_component { int source, unsigned int freq_in, unsigned int freq_out); int (*set_jack)(struct snd_soc_component *component, struct snd_soc_jack *jack, void *data); + int (*set_bias_level)(struct snd_soc_component *component, + enum snd_soc_bias_level level); /* machine specific init */ int (*init)(struct snd_soc_component *component); |