|
20 | 20 | #include <sound/ac97_codec.h>
|
21 | 21 | #include <sound/initval.h>
|
22 | 22 | #include <sound/soc.h>
|
| 23 | +#include <sound/tlv.h> |
23 | 24 | #include "wm9712.h"
|
24 | 25 |
|
25 | 26 | static unsigned int ac97_read(struct snd_soc_codec *codec,
|
@@ -69,6 +70,9 @@ static const char *wm9712_rec_sel[] = {"Mic", "NC", "NC", "Speaker Mixer",
|
69 | 70 | static const char *wm9712_ng_type[] = {"Constant Gain", "Mute"};
|
70 | 71 | static const char *wm9712_diff_sel[] = {"Mic", "Line"};
|
71 | 72 |
|
| 73 | +static const DECLARE_TLV_DB_SCALE(main_tlv, -3450, 150, 0); |
| 74 | +static const DECLARE_TLV_DB_SCALE(boost_tlv, 0, 2000, 0); |
| 75 | + |
72 | 76 | static const struct soc_enum wm9712_enum[] = {
|
73 | 77 | SOC_ENUM_SINGLE(AC97_PCI_SVID, 14, 4, wm9712_alc_select),
|
74 | 78 | SOC_ENUM_SINGLE(AC97_VIDEO, 12, 4, wm9712_alc_mux),
|
@@ -147,9 +151,9 @@ SOC_ENUM("Capture Volume Steps", wm9712_enum[6]),
|
147 | 151 | SOC_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 63, 1),
|
148 | 152 | SOC_SINGLE("Capture ZC Switch", AC97_REC_GAIN, 7, 1, 0),
|
149 | 153 |
|
150 |
| -SOC_SINGLE("Mic 1 Volume", AC97_MIC, 8, 31, 1), |
151 |
| -SOC_SINGLE("Mic 2 Volume", AC97_MIC, 0, 31, 1), |
152 |
| -SOC_SINGLE("Mic 20dB Boost Switch", AC97_MIC, 7, 1, 0), |
| 154 | +SOC_SINGLE_TLV("Mic 1 Volume", AC97_MIC, 8, 31, 1, main_tlv), |
| 155 | +SOC_SINGLE_TLV("Mic 2 Volume", AC97_MIC, 0, 31, 1, main_tlv), |
| 156 | +SOC_SINGLE_TLV("Mic Boost Volume", AC97_MIC, 7, 1, 0, boost_tlv), |
153 | 157 | };
|
154 | 158 |
|
155 | 159 | /* We have to create a fake left and right HP mixers because
|
|
0 commit comments