asoc: codecs: Enable bias off when idle for rt5639 and rt5640
Daniel Solomon [Thu, 22 Mar 2012 01:38:22 +0000 (18:38 -0700)]
Allow bias off in order to turn off clock extern1 when codec
is not used.

Bug 957635

Signed-off-by: Daniel Solomon <daniels@nvidia.com>
(cherry picked from commit adc6929ab3170acd6a0b2cee4f65fa20a1c1d30f)
Change-Id: I4f2e91b0cd9bb4516a5722d2df268f08e78f92e2
Reviewed-on: http://git-master/r/93949
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>

sound/soc/codecs/rt5639.c
sound/soc/codecs/rt5640.c

index 139503e..06c8451 100644 (file)
@@ -2239,6 +2239,8 @@ static int rt5639_probe(struct snd_soc_codec *codec)
        struct rt5639_priv *rt5639 = snd_soc_codec_get_drvdata(codec);
        int ret;
 
+       codec->dapm.idle_bias_off = 1;
+
        ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_I2C);
        if (ret != 0) {
                dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
index e3d0af0..4f50b39 100644 (file)
@@ -2302,6 +2302,8 @@ static int rt5640_probe(struct snd_soc_codec *codec)
        int ret;
        u16 val;
 
+       codec->dapm.idle_bias_off = 1;
+
        ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_I2C);
        if (ret != 0) {
                dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);