aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm9712.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/wm9712.c')
-rw-r--r--sound/soc/codecs/wm9712.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c
index 099e6ec32125..c6d2076a796b 100644
--- a/sound/soc/codecs/wm9712.c
+++ b/sound/soc/codecs/wm9712.c
@@ -148,7 +148,7 @@ SOC_SINGLE("Treble Volume", AC97_MASTER_TONE, 0, 15, 1),
148 148
149SOC_SINGLE("Capture ADC Switch", AC97_REC_GAIN, 15, 1, 1), 149SOC_SINGLE("Capture ADC Switch", AC97_REC_GAIN, 15, 1, 1),
150SOC_ENUM("Capture Volume Steps", wm9712_enum[6]), 150SOC_ENUM("Capture Volume Steps", wm9712_enum[6]),
151SOC_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 63, 1), 151SOC_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 63, 0),
152SOC_SINGLE("Capture ZC Switch", AC97_REC_GAIN, 7, 1, 0), 152SOC_SINGLE("Capture ZC Switch", AC97_REC_GAIN, 7, 1, 0),
153 153
154SOC_SINGLE_TLV("Mic 1 Volume", AC97_MIC, 8, 31, 1, main_tlv), 154SOC_SINGLE_TLV("Mic 1 Volume", AC97_MIC, 8, 31, 1, main_tlv),
@@ -272,7 +272,7 @@ SOC_DAPM_ENUM("Route", wm9712_enum[9]);
272 272
273/* Mic select */ 273/* Mic select */
274static const struct snd_kcontrol_new wm9712_mic_src_controls = 274static const struct snd_kcontrol_new wm9712_mic_src_controls =
275SOC_DAPM_ENUM("Route", wm9712_enum[7]); 275SOC_DAPM_ENUM("Mic Source Select", wm9712_enum[7]);
276 276
277/* diff select */ 277/* diff select */
278static const struct snd_kcontrol_new wm9712_diff_sel_controls = 278static const struct snd_kcontrol_new wm9712_diff_sel_controls =
@@ -291,7 +291,9 @@ SND_SOC_DAPM_MUX("Left Capture Select", SND_SOC_NOPM, 0, 0,
291 &wm9712_capture_selectl_controls), 291 &wm9712_capture_selectl_controls),
292SND_SOC_DAPM_MUX("Right Capture Select", SND_SOC_NOPM, 0, 0, 292SND_SOC_DAPM_MUX("Right Capture Select", SND_SOC_NOPM, 0, 0,
293 &wm9712_capture_selectr_controls), 293 &wm9712_capture_selectr_controls),
294SND_SOC_DAPM_MUX("Mic Select Source", SND_SOC_NOPM, 0, 0, 294SND_SOC_DAPM_MUX("Left Mic Select Source", SND_SOC_NOPM, 0, 0,
295 &wm9712_mic_src_controls),
296SND_SOC_DAPM_MUX("Right Mic Select Source", SND_SOC_NOPM, 0, 0,
295 &wm9712_mic_src_controls), 297 &wm9712_mic_src_controls),
296SND_SOC_DAPM_MUX("Differential Source", SND_SOC_NOPM, 0, 0, 298SND_SOC_DAPM_MUX("Differential Source", SND_SOC_NOPM, 0, 0,
297 &wm9712_diff_sel_controls), 299 &wm9712_diff_sel_controls),
@@ -319,6 +321,7 @@ SND_SOC_DAPM_PGA("Out 3 PGA", AC97_INT_PAGING, 5, 1, NULL, 0),
319SND_SOC_DAPM_PGA("Line PGA", AC97_INT_PAGING, 2, 1, NULL, 0), 321SND_SOC_DAPM_PGA("Line PGA", AC97_INT_PAGING, 2, 1, NULL, 0),
320SND_SOC_DAPM_PGA("Phone PGA", AC97_INT_PAGING, 1, 1, NULL, 0), 322SND_SOC_DAPM_PGA("Phone PGA", AC97_INT_PAGING, 1, 1, NULL, 0),
321SND_SOC_DAPM_PGA("Mic PGA", AC97_INT_PAGING, 0, 1, NULL, 0), 323SND_SOC_DAPM_PGA("Mic PGA", AC97_INT_PAGING, 0, 1, NULL, 0),
324SND_SOC_DAPM_PGA("Differential Mic", SND_SOC_NOPM, 0, 0, NULL, 0),
322SND_SOC_DAPM_MICBIAS("Mic Bias", AC97_INT_PAGING, 10, 1), 325SND_SOC_DAPM_MICBIAS("Mic Bias", AC97_INT_PAGING, 10, 1),
323SND_SOC_DAPM_OUTPUT("MONOOUT"), 326SND_SOC_DAPM_OUTPUT("MONOOUT"),
324SND_SOC_DAPM_OUTPUT("HPOUTL"), 327SND_SOC_DAPM_OUTPUT("HPOUTL"),
@@ -379,6 +382,18 @@ static const struct snd_soc_dapm_route wm9712_audio_map[] = {
379 {"Mic PGA", NULL, "MIC1"}, 382 {"Mic PGA", NULL, "MIC1"},
380 {"Mic PGA", NULL, "MIC2"}, 383 {"Mic PGA", NULL, "MIC2"},
381 384
385 /* microphones */
386 {"Differential Mic", NULL, "MIC1"},
387 {"Differential Mic", NULL, "MIC2"},
388 {"Left Mic Select Source", "Mic 1", "MIC1"},
389 {"Left Mic Select Source", "Mic 2", "MIC2"},
390 {"Left Mic Select Source", "Stereo", "MIC1"},
391 {"Left Mic Select Source", "Differential", "Differential Mic"},
392 {"Right Mic Select Source", "Mic 1", "MIC1"},
393 {"Right Mic Select Source", "Mic 2", "MIC2"},
394 {"Right Mic Select Source", "Stereo", "MIC2"},
395 {"Right Mic Select Source", "Differential", "Differential Mic"},
396
382 /* left capture selector */ 397 /* left capture selector */
383 {"Left Capture Select", "Mic", "MIC1"}, 398 {"Left Capture Select", "Mic", "MIC1"},
384 {"Left Capture Select", "Speaker Mixer", "Speaker Mixer"}, 399 {"Left Capture Select", "Speaker Mixer", "Speaker Mixer"},
@@ -619,6 +634,7 @@ static int wm9712_soc_probe(struct snd_soc_codec *codec)
619{ 634{
620 int ret = 0; 635 int ret = 0;
621 636
637 codec->control_data = codec; /* we don't use regmap! */
622 ret = snd_soc_new_ac97_codec(codec, &soc_ac97_ops, 0); 638 ret = snd_soc_new_ac97_codec(codec, &soc_ac97_ops, 0);
623 if (ret < 0) { 639 if (ret < 0) {
624 printk(KERN_ERR "wm9712: failed to register AC97 codec\n"); 640 printk(KERN_ERR "wm9712: failed to register AC97 codec\n");