aboutsummaryrefslogtreecommitdiffstats
path: root/bsp/pandaboard/ASoC-sdp4430-Add-Mic-Bias-for-DMic0-DMic1-and-DMic2.patch
blob: 5a4ce5aff48863474691af728146addc32ae777b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
From c2b37a5830cdfd3079908569be3b889d6fc8bbfc Mon Sep 17 00:00:00 2001
From: Misael Lopez Cruz <misael.lopez@ti.com>
Date: Mon, 28 Feb 2011 21:17:24 -0600
Subject: [PATCH 51/60] ASoC: sdp4430: Add Mic Bias for DMic0, DMic1 and DMic2

commit 7439ca14fda00c1ff6e3ed975cb95a41f730aab2 upstream

Blaze/SDP4430 contains DMic0, DMic1 and DMic2 interfaces, which
are supplied by Digital Mic Bias 1 from TWL6040. An alternate
second digital microphone bias could be used from Digital Mic
Bias 2, but it's currently not installed in application board.

Change-Id: Icdbe25fffa627e373866de64c38dac4619622c5e
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Integrated-by: Jingdong Lu <jingdong.lu@windriver.com>
---
 sound/soc/omap/sdp4430.c |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/sound/soc/omap/sdp4430.c b/sound/soc/omap/sdp4430.c
index 9ee3aeb..88f8515 100644
--- a/sound/soc/omap/sdp4430.c
+++ b/sound/soc/omap/sdp4430.c
@@ -328,6 +328,9 @@ static const struct snd_kcontrol_new sdp4430_controls[] = {
 /* SDP4430 machine DAPM */
 static const struct snd_soc_dapm_widget sdp4430_twl6040_dapm_widgets[] = {
 	SND_SOC_DAPM_MIC("Ext Mic", NULL),
+	SND_SOC_DAPM_MIC("Ext DMic0", NULL),
+	SND_SOC_DAPM_MIC("Ext DMic1", NULL),
+	SND_SOC_DAPM_MIC("Ext DMic2", NULL),
 	SND_SOC_DAPM_SPK("Ext Spk", NULL),
 	SND_SOC_DAPM_MIC("Headset Mic", NULL),
 	SND_SOC_DAPM_HP("Headset Stereophone", NULL),
@@ -336,11 +339,20 @@ static const struct snd_soc_dapm_widget sdp4430_twl6040_dapm_widgets[] = {
 };
 
 static const struct snd_soc_dapm_route audio_map[] = {
-	/* External Mics: MAINMIC, SUBMIC with bias*/
+	/* External Mics: MAINMIC, SUBMIC and DMICs with bias */
 	{"MAINMIC", NULL, "Main Mic Bias"},
 	{"SUBMIC", NULL, "Main Mic Bias"},
 	{"Main Mic Bias", NULL, "Ext Mic"},
 
+	{"DMIC0", NULL, "Digital Mic1 Bias"},
+	{"Digital Mic1 Bias", NULL, "Ext DMic0"},
+
+	{"DMIC1", NULL, "Digital Mic1 Bias"},
+	{"Digital Mic1 Bias", NULL, "Ext DMic1"},
+
+	{"DMIC2", NULL, "Digital Mic1 Bias"},
+	{"Digital Mic1 Bias", NULL, "Ext DMic2"},
+
 	/* External Speakers: HFL, HFR */
 	{"Ext Spk", NULL, "HFL"},
 	{"Ext Spk", NULL, "HFR"},
@@ -384,6 +396,9 @@ static int sdp4430_twl6040_init_hs(struct snd_soc_pcm_runtime *rtd)
 
 	/* SDP4430 connected pins */
 	snd_soc_dapm_enable_pin(dapm, "Ext Mic");
+	snd_soc_dapm_enable_pin(dapm, "Ext DMic0");
+	snd_soc_dapm_enable_pin(dapm, "Ext DMic1");
+	snd_soc_dapm_enable_pin(dapm, "Ext DMic2");
 	snd_soc_dapm_enable_pin(dapm, "Ext Spk");
 	snd_soc_dapm_enable_pin(dapm, "AFML");
 	snd_soc_dapm_enable_pin(dapm, "AFMR");
@@ -392,6 +407,9 @@ static int sdp4430_twl6040_init_hs(struct snd_soc_pcm_runtime *rtd)
 
 	/* allow modem audio paths to run during suspend */
 	snd_soc_dapm_ignore_suspend(dapm, "Ext Mic");
+	snd_soc_dapm_ignore_suspend(dapm, "Ext DMic0");
+	snd_soc_dapm_ignore_suspend(dapm, "Ext DMic1");
+	snd_soc_dapm_ignore_suspend(dapm, "Ext DMic2");
 	snd_soc_dapm_ignore_suspend(dapm, "Ext Spk");
 	snd_soc_dapm_ignore_suspend(dapm, "AFML");
 	snd_soc_dapm_ignore_suspend(dapm, "AFMR");
-- 
1.7.4.1