diff options
author | Peter Ujfalusi <peter.ujfalusi@nokia.com> | 2008-12-09 05:35:52 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2008-12-09 05:49:25 -0500 |
commit | ca4513fe06c483bf0111c990059d42f97288605d (patch) | |
tree | bb4153cff743027d32389a0f9580f8c17d344deb /sound/soc/codecs/twl4030.c | |
parent | df339804bbfc118eaca066b95488a2dbacc2e258 (diff) |
ASoC: TWL4030: Do not alter the Headset output volume on power-up/down
There is a separate gain control for the Headset output already.
Do not reset the gain to 0 dB at power up.
In power-down, there is no need to set the Headset output gain
to power-down mode, since if the CODECPDZ is in powered off this
setting has no effect.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/twl4030.c')
-rw-r--r-- | sound/soc/codecs/twl4030.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c index d0612a4ca456..358aa2b1aae2 100644 --- a/sound/soc/codecs/twl4030.c +++ b/sound/soc/codecs/twl4030.c | |||
@@ -887,7 +887,7 @@ static int twl4030_add_widgets(struct snd_soc_codec *codec) | |||
887 | 887 | ||
888 | static void twl4030_power_up(struct snd_soc_codec *codec) | 888 | static void twl4030_power_up(struct snd_soc_codec *codec) |
889 | { | 889 | { |
890 | u8 anamicl, regmisc1, byte, popn, hsgain; | 890 | u8 anamicl, regmisc1, byte, popn; |
891 | int i = 0; | 891 | int i = 0; |
892 | 892 | ||
893 | /* set CODECPDZ to turn on codec */ | 893 | /* set CODECPDZ to turn on codec */ |
@@ -925,10 +925,6 @@ static void twl4030_power_up(struct snd_soc_codec *codec) | |||
925 | popn |= TWL4030_VMID_EN; | 925 | popn |= TWL4030_VMID_EN; |
926 | twl4030_write(codec, TWL4030_REG_HS_POPN_SET, popn); | 926 | twl4030_write(codec, TWL4030_REG_HS_POPN_SET, popn); |
927 | 927 | ||
928 | /* enable output stage and gain setting */ | ||
929 | hsgain = TWL4030_HSR_GAIN_0DB | TWL4030_HSL_GAIN_0DB; | ||
930 | twl4030_write(codec, TWL4030_REG_HS_GAIN_SET, hsgain); | ||
931 | |||
932 | /* enable anti-pop ramp */ | 928 | /* enable anti-pop ramp */ |
933 | popn |= TWL4030_RAMP_EN; | 929 | popn |= TWL4030_RAMP_EN; |
934 | twl4030_write(codec, TWL4030_REG_HS_POPN_SET, popn); | 930 | twl4030_write(codec, TWL4030_REG_HS_POPN_SET, popn); |
@@ -936,17 +932,13 @@ static void twl4030_power_up(struct snd_soc_codec *codec) | |||
936 | 932 | ||
937 | static void twl4030_power_down(struct snd_soc_codec *codec) | 933 | static void twl4030_power_down(struct snd_soc_codec *codec) |
938 | { | 934 | { |
939 | u8 popn, hsgain; | 935 | u8 popn; |
940 | 936 | ||
941 | /* disable anti-pop ramp */ | 937 | /* disable anti-pop ramp */ |
942 | popn = twl4030_read_reg_cache(codec, TWL4030_REG_HS_POPN_SET); | 938 | popn = twl4030_read_reg_cache(codec, TWL4030_REG_HS_POPN_SET); |
943 | popn &= ~TWL4030_RAMP_EN; | 939 | popn &= ~TWL4030_RAMP_EN; |
944 | twl4030_write(codec, TWL4030_REG_HS_POPN_SET, popn); | 940 | twl4030_write(codec, TWL4030_REG_HS_POPN_SET, popn); |
945 | 941 | ||
946 | /* disable output stage and gain setting */ | ||
947 | hsgain = TWL4030_HSR_GAIN_PWR_DOWN | TWL4030_HSL_GAIN_PWR_DOWN; | ||
948 | twl4030_write(codec, TWL4030_REG_HS_GAIN_SET, hsgain); | ||
949 | |||
950 | /* disable bias out */ | 942 | /* disable bias out */ |
951 | popn &= ~TWL4030_VMID_EN; | 943 | popn &= ~TWL4030_VMID_EN; |
952 | twl4030_write(codec, TWL4030_REG_HS_POPN_SET, popn); | 944 | twl4030_write(codec, TWL4030_REG_HS_POPN_SET, popn); |