ASoC: Allow idle_bias_off to be specified in CODEC drivers
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 22 Aug 2011 17:40:30 +0000 (18:40 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 22 Aug 2011 22:23:29 +0000 (23:23 +0100)
If devices can unconditionally support idle_bias_off let them flag it in
their driver structure.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
include/sound/soc.h
sound/soc/soc-core.c

index 3fe658eea28b4162cebfef9546d010b509ff8492..6da55a17fcfd4a208323b067e903f35d4a2c363e 100644 (file)
@@ -633,6 +633,7 @@ struct snd_soc_codec_driver {
        /* codec bias level */
        int (*set_bias_level)(struct snd_soc_codec *,
                              enum snd_soc_bias_level level);
+       bool idle_bias_off;
 
        void (*seq_notifier)(struct snd_soc_dapm_context *,
                             enum snd_soc_dapm_type, int);
index ae93aa81244c29d5f7e39c8c6ee94db5289d5e38..f8f985a4f2a81ef0adc41efa75bded772f533dfe 100644 (file)
@@ -956,6 +956,8 @@ static int soc_probe_codec(struct snd_soc_card *card,
                snd_soc_dapm_new_controls(&codec->dapm, driver->dapm_widgets,
                                          driver->num_dapm_widgets);
 
+       codec->dapm.idle_bias_off = driver->idle_bias_off;
+
        if (driver->probe) {
                ret = driver->probe(codec);
                if (ret < 0) {