From: Mark Brown Date: Mon, 22 Aug 2011 17:40:30 +0000 (+0100) Subject: ASoC: Allow idle_bias_off to be specified in CODEC drivers X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=33c5f969b969c277e96cd9e9bf8472c4b8709c25;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ASoC: Allow idle_bias_off to be specified in CODEC drivers If devices can unconditionally support idle_bias_off let them flag it in their driver structure. Signed-off-by: Mark Brown Acked-by: Liam Girdwood --- diff --git a/include/sound/soc.h b/include/sound/soc.h index 3fe658eea28b..6da55a17fcfd 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -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); diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index ae93aa81244c..f8f985a4f2a8 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -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) {