From: Lu Guanqun <guanqun.lu@intel.com>
To: ALSA <alsa-devel@alsa-project.org>, Lu Guanqun <guanqun.lu@intel.com>
Cc: Takashi Iwai <tiwai@suse.de>, Koul Vinod <vinod.koul@intel.com>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
Liam Girdwood <lrg@ti.com>,
Wang Xingchao <xingchao.wang@intel.com>
Subject: [PATCH 08/19] ASoC: upd9976: add DMIC support
Date: Wed, 04 May 2011 21:45:34 +0800 [thread overview]
Message-ID: <20110504134534.32443.79243.stgit@localhost> (raw)
In-Reply-To: <20110504133756.32443.6282.stgit@localhost>
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
---
sound/soc/codecs/upd9976.c | 67 ++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 67 insertions(+), 0 deletions(-)
diff --git a/sound/soc/codecs/upd9976.c b/sound/soc/codecs/upd9976.c
index dc7920c..fb3a4fc 100644
--- a/sound/soc/codecs/upd9976.c
+++ b/sound/soc/codecs/upd9976.c
@@ -81,6 +81,29 @@ static const struct snd_kcontrol_new upd9976_hp_spkr_mixer_right_controls[] = {
SOC_DAPM_SINGLE("Audio DAC Right", UPD9976_HPRMIXSEL, 3, 1, 1),
};
+/* PCM2 Left Mux */
+static const char *upd9976_pcm2_left_mux_texts[] = {"AADC Left", "DMIC"};
+static const struct soc_enum upd9976_pcm2_left_mux_enum =
+ SOC_ENUM_SINGLE(UPD9976_ADCSAMPLERATE, 5, 2,
+ upd9976_pcm2_left_mux_texts);
+static const struct snd_kcontrol_new upd9976_pcm2_left_mux_control =
+ SOC_DAPM_ENUM("PCM2 Left Mux", upd9976_pcm2_left_mux_enum);
+
+/* PCM2 Right Mux */
+static const char *upd9976_pcm2_right_mux_texts[] = {"AADC Right", "DMIC"};
+static const struct soc_enum upd9976_pcm2_right_mux_enum =
+ SOC_ENUM_SINGLE(UPD9976_ADCSAMPLERATE, 4, 2,
+ upd9976_pcm2_right_mux_texts);
+static const struct snd_kcontrol_new upd9976_pcm2_right_mux_control =
+ SOC_DAPM_ENUM("PCM2 Right Mux", upd9976_pcm2_right_mux_enum);
+
+/* PCM2 Mux */
+static const char *upd9976_pcm2_mux_texts[] = {"No Mix", "Mix"};
+static const struct soc_enum upd9976_pcm2_mux_enum =
+ SOC_ENUM_SINGLE(UPD9976_ADCSAMPLERATE, 3, 2, upd9976_pcm2_mux_texts);
+static const struct snd_kcontrol_new upd9976_pcm2_mux_control =
+ SOC_DAPM_ENUM("PCM2 Mux", upd9976_pcm2_mux_enum);
+
static const struct snd_soc_dapm_widget upd9976_dapm_widgets[] = {
/* Input */
SND_SOC_DAPM_INPUT("LINEINL"),
@@ -117,12 +140,34 @@ static const struct snd_soc_dapm_widget upd9976_dapm_widgets[] = {
upd9976_hp_spkr_mixer_right_controls,
ARRAY_SIZE(upd9976_hp_spkr_mixer_right_controls)),
+ SND_SOC_DAPM_MIXER("PCM2 IN Mix", SND_SOC_NOPM, 0, 0, NULL, 0),
+ SND_SOC_DAPM_MIXER("PCM2 IN No Mix", SND_SOC_NOPM, 0, 0, NULL, 0),
+
+ /* Mux */
+ SND_SOC_DAPM_MUX("PCM2 Left", SND_SOC_NOPM, 0, 0,
+ &upd9976_pcm2_left_mux_control),
+ SND_SOC_DAPM_MUX("PCM2 Right", SND_SOC_NOPM, 0, 0,
+ &upd9976_pcm2_right_mux_control),
+ SND_SOC_DAPM_MUX("PCM2 Mux", SND_SOC_NOPM, 0, 0,
+ &upd9976_pcm2_mux_control),
+
/* PGA */
SND_SOC_DAPM_PGA("HP Playback Left", UPD9976_DRVPOWERCTRL,
2, 0, NULL, 0),
SND_SOC_DAPM_PGA("HP Playback Right", UPD9976_DRVPOWERCTRL,
1, 0, NULL, 0),
+ SND_SOC_DAPM_PGA("AADC Left", SND_SOC_NOPM, 0, 0, NULL, 0),
+ SND_SOC_DAPM_PGA("AADC Right", SND_SOC_NOPM, 0, 0, NULL, 0),
+
+ SND_SOC_DAPM_PGA("DMIC Gain", UPD9976_DMICCTRL1, 7, 0, NULL, 0),
+
+ /* Audio Interface */
+ SND_SOC_DAPM_AIF_OUT("PCM2 Out", "Audio Capture", 0, SND_SOC_NOPM, 0,
+ 0),
+
+ /* Supply */
+ SND_SOC_DAPM_SUPPLY("DMIC Supply", UPD9976_POWERCTRL2, 1, 0, NULL, 0),
};
static const struct snd_soc_dapm_route upd9976_dapm_routes[] = {
@@ -141,6 +186,28 @@ static const struct snd_soc_dapm_route upd9976_dapm_routes[] = {
{"HPOUTL", NULL, "HP Playback Left"},
{"HPOUTR", NULL, "HP Playback Right"},
+ {"DMICDAT", NULL, "DMIC Supply"},
+ {"DMIC Gain", NULL, "DMICDAT"},
+
+ {"AADC Left", NULL, "AADC"},
+ {"AADC Right", NULL, "AADC"},
+
+ {"PCM2 Left", "DMIC", "DMIC Gain"},
+ {"PCM2 Left", "AADC Left", "AADC Left"},
+
+ {"PCM2 Right", "DMIC", "DMIC Gain"},
+ {"PCM2 Right", "AADC Right", "AADC Right"},
+
+ {"PCM2 IN Mix", NULL, "PCM2 Left"},
+ {"PCM2 IN No Mix", NULL, "PCM2 Left"},
+
+ {"PCM2 IN No Mix", NULL, "PCM2 Right"},
+ {"PCM2 IN Mix", NULL, "PCM2 Right"},
+
+ {"PCM2 Mux", "No Mix", "PCM2 IN No Mix"},
+ {"PCM2 Mux", "Mix", "PCM2 IN Mix"},
+
+ {"PCM2 Out", NULL, "PCM2 Mux"},
};
static int upd9976_audio_digital_mute(struct snd_soc_dai *dai, int mute)
next prev parent reply other threads:[~2011-05-04 13:44 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-04 13:44 [PATCH 00/19] ASoC for moorestown Lu Guanqun
2011-05-04 13:44 ` [PATCH 01/19] ASoC: upd9976: Add Renesas uPD9976 codec driver Lu Guanqun
2011-05-04 14:34 ` Mark Brown
2011-05-04 15:05 ` Lu Guanqun
2011-05-05 3:14 ` Koul, Vinod
2011-05-05 3:51 ` Lu Guanqun
2011-05-04 15:07 ` Takashi Iwai
2011-05-04 15:18 ` Lu Guanqun
2011-05-04 15:38 ` Takashi Iwai
2011-05-04 16:15 ` Mark Brown
2011-05-05 0:33 ` Lu Guanqun
2011-05-05 0:30 ` Lu Guanqun
2011-05-04 16:13 ` Mark Brown
2011-05-05 16:26 ` Lu Guanqun
2011-05-06 9:37 ` Mark Brown
2011-05-04 14:46 ` Dimitris Papastamos
2011-05-04 15:12 ` Lu Guanqun
2011-05-04 16:11 ` Mark Brown
2011-05-05 3:12 ` Koul, Vinod
2011-05-05 8:07 ` Mark Brown
2011-05-04 13:45 ` [PATCH 02/19] ASoC: sst_platform: add cpu dai driver for moorestown platform Lu Guanqun
2011-05-05 3:23 ` Koul, Vinod
2011-05-05 4:48 ` Lu Guanqun
2011-05-05 9:26 ` Koul, Vinod
2011-05-05 8:05 ` Mark Brown
2011-05-05 9:28 ` Koul, Vinod
2011-05-05 10:26 ` Mark Brown
2011-05-05 10:00 ` Koul, Vinod
2011-05-05 13:46 ` Mark Brown
2011-05-05 14:55 ` Koul, Vinod
2011-05-06 9:37 ` Mark Brown
2011-05-04 13:45 ` [PATCH 03/19] ASoC: mrst_machine: add moorestown machine driver Lu Guanqun
2011-05-04 14:55 ` Dimitris Papastamos
2011-05-04 15:25 ` Lu Guanqun
2011-05-04 13:45 ` [PATCH 04/19] ASoC: mrst_machine: add speaker widget to " Lu Guanqun
2011-05-04 16:17 ` Mark Brown
2011-05-04 13:45 ` [PATCH 05/19] ASoC: mrst_machine: enable user to select different output Lu Guanqun
2011-05-04 16:22 ` Mark Brown
2011-05-05 0:34 ` Lu Guanqun
2011-05-04 13:45 ` [PATCH 06/19] ASoC: upd9976: add capture ability for dai driver Lu Guanqun
2011-05-04 16:22 ` Mark Brown
2011-05-04 13:45 ` [PATCH 07/19] ASoC: sst_platform: add capture capability for cpu " Lu Guanqun
2011-05-04 13:45 ` Lu Guanqun [this message]
2011-05-04 15:03 ` [PATCH 08/19] ASoC: upd9976: add DMIC support Dimitris Papastamos
2011-05-04 15:20 ` Lu Guanqun
2011-05-04 13:45 ` [PATCH 09/19] ASoC: upd9976: add Analog MIC support Lu Guanqun
2011-05-04 13:45 ` [PATCH 10/19] ASoC: upd9976: add microphone bias support Lu Guanqun
2011-05-04 16:25 ` Mark Brown
2011-05-05 0:40 ` Lu Guanqun
2011-05-04 13:45 ` [PATCH 11/19] ASoC: upd9976: add jack detection function Lu Guanqun
2011-05-04 16:32 ` Mark Brown
2011-05-05 0:37 ` Lu Guanqun
2011-05-04 13:45 ` [PATCH 12/19] ASoC: mrst_machine: add capture functionality Lu Guanqun
2011-05-04 13:45 ` [PATCH 13/19] ASoC: mrst_machine: add jack detection support Lu Guanqun
2011-05-04 13:46 ` [PATCH 14/19] ASoC: upd9976: add mute switch for DMIC Lu Guanqun
2011-05-04 13:46 ` [PATCH 15/19] ASoC: upd9976: add mute switch for analog Lu Guanqun
2011-05-04 13:46 ` [PATCH 16/19] ASoC: mrst_machine: make DMIC's output to PCM2 mono Lu Guanqun
2011-05-04 13:46 ` [PATCH 17/19] ASoC: mrst_machine: make MIC2 pseudo-differential Lu Guanqun
2011-05-04 13:46 ` [PATCH 18/19] ASoC: upd9976: add capture volume for analog inputs Lu Guanqun
2011-05-04 13:46 ` [PATCH 19/19] ASoC: upd9976: add capture volume for DMIC Lu Guanqun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110504134534.32443.79243.stgit@localhost \
--to=guanqun.lu@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@ti.com \
--cc=tiwai@suse.de \
--cc=vinod.koul@intel.com \
--cc=xingchao.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.