diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-06-07 18:14:37 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-06-08 10:24:48 -0400 |
commit | 8f63aaa887d723f52d44b41074486defcd42ad95 (patch) | |
tree | eec9622a5143b13fbb21374b8d7a2cb0d21a6881 /sound/soc/codecs/wm8962.c | |
parent | 649a1a0ef28e5db99e838060f415a111566c63ea (diff) |
ASoC: Implement base 5 band EQ control for WM8962
ReTune Mobile modes are not currently supported.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'sound/soc/codecs/wm8962.c')
-rw-r--r-- | sound/soc/codecs/wm8962.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index 8493e336b3cd..2b3d961eb6b5 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c | |||
@@ -1984,6 +1984,7 @@ static const unsigned int classd_tlv[] = { | |||
1984 | 0, 6, TLV_DB_SCALE_ITEM(0, 150, 0), | 1984 | 0, 6, TLV_DB_SCALE_ITEM(0, 150, 0), |
1985 | 7, 7, TLV_DB_SCALE_ITEM(1200, 0, 0), | 1985 | 7, 7, TLV_DB_SCALE_ITEM(1200, 0, 0), |
1986 | }; | 1986 | }; |
1987 | static const DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0); | ||
1987 | 1988 | ||
1988 | /* The VU bits for the headphones are in a different register to the mute | 1989 | /* The VU bits for the headphones are in a different register to the mute |
1989 | * bits and only take effect on the PGA if it is actually powered. | 1990 | * bits and only take effect on the PGA if it is actually powered. |
@@ -2121,6 +2122,18 @@ SOC_SINGLE_TLV("HPMIXR MIXINR Volume", WM8962_HEADPHONE_MIXER_4, | |||
2121 | 2122 | ||
2122 | SOC_SINGLE_TLV("Speaker Boost Volume", WM8962_CLASS_D_CONTROL_2, 0, 7, 0, | 2123 | SOC_SINGLE_TLV("Speaker Boost Volume", WM8962_CLASS_D_CONTROL_2, 0, 7, 0, |
2123 | classd_tlv), | 2124 | classd_tlv), |
2125 | |||
2126 | SOC_SINGLE("EQ Switch", WM8962_EQ1, WM8962_EQ_ENA_SHIFT, 1, 0), | ||
2127 | SOC_DOUBLE_R_TLV("EQ1 Volume", WM8962_EQ2, WM8962_EQ22, | ||
2128 | WM8962_EQL_B1_GAIN_SHIFT, 31, 0, eq_tlv), | ||
2129 | SOC_DOUBLE_R_TLV("EQ2 Volume", WM8962_EQ2, WM8962_EQ22, | ||
2130 | WM8962_EQL_B2_GAIN_SHIFT, 31, 0, eq_tlv), | ||
2131 | SOC_DOUBLE_R_TLV("EQ3 Volume", WM8962_EQ2, WM8962_EQ22, | ||
2132 | WM8962_EQL_B3_GAIN_SHIFT, 31, 0, eq_tlv), | ||
2133 | SOC_DOUBLE_R_TLV("EQ4 Volume", WM8962_EQ3, WM8962_EQ23, | ||
2134 | WM8962_EQL_B4_GAIN_SHIFT, 31, 0, eq_tlv), | ||
2135 | SOC_DOUBLE_R_TLV("EQ5 Volume", WM8962_EQ3, WM8962_EQ23, | ||
2136 | WM8962_EQL_B5_GAIN_SHIFT, 31, 0, eq_tlv), | ||
2124 | }; | 2137 | }; |
2125 | 2138 | ||
2126 | static const struct snd_kcontrol_new wm8962_spk_mono_controls[] = { | 2139 | static const struct snd_kcontrol_new wm8962_spk_mono_controls[] = { |
@@ -3898,6 +3911,9 @@ static int wm8962_probe(struct snd_soc_codec *codec) | |||
3898 | snd_soc_update_bits(codec, WM8962_HPOUTR_VOLUME, | 3911 | snd_soc_update_bits(codec, WM8962_HPOUTR_VOLUME, |
3899 | WM8962_HPOUT_VU, WM8962_HPOUT_VU); | 3912 | WM8962_HPOUT_VU, WM8962_HPOUT_VU); |
3900 | 3913 | ||
3914 | /* Stereo control for EQ */ | ||
3915 | snd_soc_update_bits(codec, WM8962_EQ1, WM8962_EQ_SHARED_COEFF, 0); | ||
3916 | |||
3901 | wm8962_add_widgets(codec); | 3917 | wm8962_add_widgets(codec); |
3902 | 3918 | ||
3903 | /* Save boards having to disable DMIC when not in use */ | 3919 | /* Save boards having to disable DMIC when not in use */ |