diff options
author | Jarkko Nikula <jarkko.nikula@nokia.com> | 2008-06-25 07:58:46 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-06-26 03:02:21 -0400 |
commit | ee15ffdb140b1a4fda5f6a3a8b9994031de5edb4 (patch) | |
tree | 2ef5be4fa70998bf9eb215a36f6dffa9aafe4116 /sound/soc/codecs | |
parent | 81971a14947b344ee7f6e3781f7ef36d8996f57a (diff) |
ALSA: ASoC: TLV320AIC3X: Add support for digital microphone input
AIC33 and AIC34 codecs in TLV320AIC3x family support digital microphone
input. When enabled, the codec ADC takes bitstream input to low-pass
filter from GPIO2 instead of its own delta-sigma modulator while providing
oversampling clock through GPIO1.
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index 29dc0ec3dd23..4f0bf26f170b 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c | |||
@@ -455,6 +455,27 @@ static const struct snd_soc_dapm_widget aic3x_dapm_widgets[] = { | |||
455 | SND_SOC_DAPM_MUX("Right Line2R Mux", SND_SOC_NOPM, 0, 0, | 455 | SND_SOC_DAPM_MUX("Right Line2R Mux", SND_SOC_NOPM, 0, 0, |
456 | &aic3x_right_line2_mux_controls), | 456 | &aic3x_right_line2_mux_controls), |
457 | 457 | ||
458 | /* | ||
459 | * Not a real mic bias widget but similar function. This is for dynamic | ||
460 | * control of GPIO1 digital mic modulator clock output function when | ||
461 | * using digital mic. | ||
462 | */ | ||
463 | SND_SOC_DAPM_REG(snd_soc_dapm_micbias, "GPIO1 dmic modclk", | ||
464 | AIC3X_GPIO1_REG, 4, 0xf, | ||
465 | AIC3X_GPIO1_FUNC_DIGITAL_MIC_MODCLK, | ||
466 | AIC3X_GPIO1_FUNC_DISABLED), | ||
467 | |||
468 | /* | ||
469 | * Also similar function like mic bias. Selects digital mic with | ||
470 | * configurable oversampling rate instead of ADC converter. | ||
471 | */ | ||
472 | SND_SOC_DAPM_REG(snd_soc_dapm_micbias, "DMic Rate 128", | ||
473 | AIC3X_ASD_INTF_CTRLA, 0, 3, 1, 0), | ||
474 | SND_SOC_DAPM_REG(snd_soc_dapm_micbias, "DMic Rate 64", | ||
475 | AIC3X_ASD_INTF_CTRLA, 0, 3, 2, 0), | ||
476 | SND_SOC_DAPM_REG(snd_soc_dapm_micbias, "DMic Rate 32", | ||
477 | AIC3X_ASD_INTF_CTRLA, 0, 3, 3, 0), | ||
478 | |||
458 | /* Mic Bias */ | 479 | /* Mic Bias */ |
459 | SND_SOC_DAPM_REG(snd_soc_dapm_micbias, "Mic Bias 2V", | 480 | SND_SOC_DAPM_REG(snd_soc_dapm_micbias, "Mic Bias 2V", |
460 | MICBIAS_CTRL, 6, 3, 1, 0), | 481 | MICBIAS_CTRL, 6, 3, 1, 0), |
@@ -570,6 +591,7 @@ static const struct snd_soc_dapm_route intercon[] = { | |||
570 | {"Left PGA Mixer", "Mic3L Switch", "MIC3L"}, | 591 | {"Left PGA Mixer", "Mic3L Switch", "MIC3L"}, |
571 | 592 | ||
572 | {"Left ADC", NULL, "Left PGA Mixer"}, | 593 | {"Left ADC", NULL, "Left PGA Mixer"}, |
594 | {"Left ADC", NULL, "GPIO1 dmic modclk"}, | ||
573 | 595 | ||
574 | /* Right Input */ | 596 | /* Right Input */ |
575 | {"Right Line1R Mux", "single-ended", "LINE1R"}, | 597 | {"Right Line1R Mux", "single-ended", "LINE1R"}, |
@@ -583,6 +605,7 @@ static const struct snd_soc_dapm_route intercon[] = { | |||
583 | {"Right PGA Mixer", "Mic3R Switch", "MIC3R"}, | 605 | {"Right PGA Mixer", "Mic3R Switch", "MIC3R"}, |
584 | 606 | ||
585 | {"Right ADC", NULL, "Right PGA Mixer"}, | 607 | {"Right ADC", NULL, "Right PGA Mixer"}, |
608 | {"Right ADC", NULL, "GPIO1 dmic modclk"}, | ||
586 | 609 | ||
587 | /* Left PGA Bypass */ | 610 | /* Left PGA Bypass */ |
588 | {"Left PGA Bypass Mixer", "Line Switch", "Left PGA Mixer"}, | 611 | {"Left PGA Bypass Mixer", "Line Switch", "Left PGA Mixer"}, |
@@ -643,6 +666,14 @@ static const struct snd_soc_dapm_route intercon[] = { | |||
643 | {"Right Line Out", NULL, "Right Line2 Bypass Mixer"}, | 666 | {"Right Line Out", NULL, "Right Line2 Bypass Mixer"}, |
644 | {"Mono Out", NULL, "Right Line2 Bypass Mixer"}, | 667 | {"Mono Out", NULL, "Right Line2 Bypass Mixer"}, |
645 | {"Right HP Out", NULL, "Right Line2 Bypass Mixer"}, | 668 | {"Right HP Out", NULL, "Right Line2 Bypass Mixer"}, |
669 | |||
670 | /* | ||
671 | * Logical path between digital mic enable and GPIO1 modulator clock | ||
672 | * output function | ||
673 | */ | ||
674 | {"GPIO1 dmic modclk", NULL, "DMic Rate 128"}, | ||
675 | {"GPIO1 dmic modclk", NULL, "DMic Rate 64"}, | ||
676 | {"GPIO1 dmic modclk", NULL, "DMic Rate 32"}, | ||
646 | }; | 677 | }; |
647 | 678 | ||
648 | static int aic3x_add_widgets(struct snd_soc_codec *codec) | 679 | static int aic3x_add_widgets(struct snd_soc_codec *codec) |