[alsa-devel] [PATCH 4/4] ASoC: tlv320aic3x: Let the codec hit SND_SOC_BIAS_OFF when idle
Jarkko Nikula
jhnikula at gmail.com
Fri Sep 10 13:23:32 CEST 2010
Signed-off-by: Jarkko Nikula <jhnikula at gmail.com>
---
sound/soc/codecs/tlv320aic3x.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index d269ccf..291111d 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -1359,9 +1359,6 @@ static int aic3x_init(struct snd_soc_codec *codec)
aic3x_write(codec, CLASSD_CTRL, 0);
}
- /* off, with power on */
- aic3x_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
-
return 0;
}
@@ -1383,6 +1380,9 @@ static int aic3x_probe(struct snd_soc_codec *codec)
(aic3x->setup->gpio_func[1] & 0xf) << 4);
}
+ codec->idle_bias_off = 1;
+ aic3x_set_bias_level(codec, SND_SOC_BIAS_OFF);
+
snd_soc_add_controls(codec, aic3x_snd_controls,
ARRAY_SIZE(aic3x_snd_controls));
if (aic3x->model == AIC3X_MODEL_3007)
@@ -1530,7 +1530,9 @@ static int aic3x_i2c_remove(struct i2c_client *client)
gpio_set_value(aic3x->gpio_reset, 0);
gpio_free(aic3x->gpio_reset);
}
- regulator_bulk_disable(ARRAY_SIZE(aic3x->supplies), aic3x->supplies);
+ if (aic3x->power)
+ regulator_bulk_disable(ARRAY_SIZE(aic3x->supplies),
+ aic3x->supplies);
for (i = 0; i < ARRAY_SIZE(aic3x->supplies); i++)
regulator_unregister_notifier(aic3x->supplies[i].consumer,
&aic3x->disable_nb[i].nb);
--
1.7.1
More information about the Alsa-devel
mailing list