From 12482de3aae5c392bd1c8347b7ce3b250816c391 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=AE=8B=E7=A7=80=E6=9D=B0?= Date: Fri, 7 Dec 2012 14:40:27 +0800 Subject: [PATCH] phonepad: rt3261 solve AVDD18 vol being pull low bug, It can cause call no sound. --- sound/soc/codecs/rt3261.c | 6 ++++++ sound/soc/codecs/rt3261.h | 1 + 2 files changed, 7 insertions(+) diff --git a/sound/soc/codecs/rt3261.c b/sound/soc/codecs/rt3261.c index c8a071377c24..1f72f986b5e1 100644 --- a/sound/soc/codecs/rt3261.c +++ b/sound/soc/codecs/rt3261.c @@ -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); diff --git a/sound/soc/codecs/rt3261.h b/sound/soc/codecs/rt3261.h index 1577bf0bb8a1..eb0d76cb313b 100755 --- a/sound/soc/codecs/rt3261.h +++ b/sound/soc/codecs/rt3261.h @@ -150,6 +150,7 @@ #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 -- 2.34.1