phonepad: rt3261 solve AVDD18 vol being pull low bug, It can cause call no sound.
author宋秀杰 <sxj@rock-chips.com>
Fri, 7 Dec 2012 06:40:27 +0000 (14:40 +0800)
committer宋秀杰 <sxj@rock-chips.com>
Fri, 7 Dec 2012 06:40:27 +0000 (14:40 +0800)
sound/soc/codecs/rt3261.c
sound/soc/codecs/rt3261.h

index c8a071377c24fe7d0ec41ffec5b66dd89e588354..1f72f986b5e12651d9203414cb35c53f6a602c59 100644 (file)
@@ -782,6 +782,7 @@ void hp_amp_power(struct snd_soc_codec *codec, int on)
                        snd_soc_update_bits(codec, RT3261_PWR_DIG1,
                                RT3261_PWR_I2S1, RT3261_PWR_I2S1);
                        /* depop parameters */
+                       rt3261_index_update_bits(codec, RT3261_CHPUMP_INT_REG1,0x0700, 0x0200); //bard 12-6
                        snd_soc_update_bits(codec, RT3261_DEPOP_M2,
                                RT3261_DEPOP_MASK, RT3261_DEPOP_MAN);
                        snd_soc_update_bits(codec, RT3261_DEPOP_M1,
@@ -808,6 +809,7 @@ void hp_amp_power(struct snd_soc_codec *codec, int on)
                        snd_soc_update_bits(codec, RT3261_DEPOP_M1,
                                RT3261_HP_CO_MASK | RT3261_HP_SG_MASK,
                                RT3261_HP_CO_EN | RT3261_HP_SG_EN);
+                       rt3261_index_update_bits(codec, RT3261_CHPUMP_INT_REG1,0x0700, 0x0400); //bard 12-6
                }
                hp_amp_power_count++;
        } else {
@@ -1814,6 +1816,7 @@ static void rt3261_pmu_depop(struct snd_soc_codec *codec)
 {
 #if 0
        /* depop parameters */
+       rt3261_index_update_bits(codec, RT3261_CHPUMP_INT_REG1,0x0700, 0x0200); //bard 12-6
        snd_soc_update_bits(codec, RT3261_DEPOP_M2,
                RT3261_DEPOP_MASK, RT3261_DEPOP_MAN);
        snd_soc_update_bits(codec, RT3261_DEPOP_M1,
@@ -1841,6 +1844,7 @@ static void rt3261_pmu_depop(struct snd_soc_codec *codec)
        snd_soc_update_bits(codec, RT3261_DEPOP_M1,
                RT3261_HP_CO_MASK | RT3261_HP_SG_MASK,
                RT3261_HP_CO_EN | RT3261_HP_SG_EN);
+       rt3261_index_update_bits(codec, RT3261_CHPUMP_INT_REG1,0x0700, 0x0400); //bard 12-6
 #else
        hp_amp_power(codec, 1);
 #endif
@@ -1922,6 +1926,7 @@ static void rt3261_pmd_depop(struct snd_soc_codec *codec)
 static void rt3261_pmu_depop(struct snd_soc_codec *codec)
 {
        /* depop parameters */
+       rt3261_index_update_bits(codec, RT3261_CHPUMP_INT_REG1,0x0700, 0x0200); //bard 12-6
        snd_soc_update_bits(codec, RT3261_DEPOP_M2,
                RT3261_DEPOP_MASK, RT3261_DEPOP_MAN);
        snd_soc_update_bits(codec, RT3261_DEPOP_M1,
@@ -1956,6 +1961,7 @@ static void rt3261_pmu_depop(struct snd_soc_codec *codec)
        snd_soc_update_bits(codec, RT3261_DEPOP_M1,
                RT3261_HP_CP_MASK | RT3261_HP_SG_MASK,
                RT3261_HP_CP_PD | RT3261_HP_SG_EN);
+       rt3261_index_update_bits(codec, RT3261_CHPUMP_INT_REG1,0x0700, 0x0400); //bard 12-6
        msleep(10);
        snd_soc_update_bits(codec, RT3261_HP_VOL,
                RT3261_L_MUTE | RT3261_R_MUTE, 0);
index 1577bf0bb8a1ffe5e81b79c996ba4d479e772509..eb0d76cb313bb9205483732d40f0b60060375823 100755 (executable)
 #define RT3261_BIAS_CUR1                       0x12
 #define RT3261_BIAS_CUR3                       0x14
 #define RT3261_CLSD_INT_REG1                   0x1c
+#define RT3261_CHPUMP_INT_REG1      0x24 //bard 11-6
 #define RT3261_MAMP_INT_REG2                   0x37
 #define RT3261_CHOP_DAC_ADC                    0x3d
 #define RT3261_MIXER_INT_REG                   0x3f