Package: alsa-lib / 1.0.28-1

0004-Add-UCM-config-files-for-Nexus-10.patch Patch series | download
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
From c148a16236422ad36320029cb72b920e3fc589f0 Mon Sep 17 00:00:00 2001
From: David Henningsson <david.henningsson@canonical.com>
Date: Tue, 3 Sep 2013 13:35:35 +0200
Subject: [PATCH 4/4] Add UCM config files for Nexus 10

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
---
 configure.ac                              |   2 +
 src/conf/ucm/Makefile.am                  |   2 +-
 src/conf/ucm/Manta-I2S/HiFi               | 211 ++++++++++++++++++++++++++++++
 src/conf/ucm/Manta-I2S/Makefile.am        |   4 +
 src/conf/ucm/Manta-I2S/Manta-I2S.conf     |   7 +
 src/conf/ucm/Manta-SPDIF/Dummy            |   3 +
 src/conf/ucm/Manta-SPDIF/Makefile.am      |   4 +
 src/conf/ucm/Manta-SPDIF/Manta-SPDIF.conf |   6 +
 8 files changed, 238 insertions(+), 1 deletion(-)
 create mode 100644 src/conf/ucm/Manta-I2S/HiFi
 create mode 100644 src/conf/ucm/Manta-I2S/Makefile.am
 create mode 100644 src/conf/ucm/Manta-I2S/Manta-I2S.conf
 create mode 100644 src/conf/ucm/Manta-SPDIF/Dummy
 create mode 100644 src/conf/ucm/Manta-SPDIF/Makefile.am
 create mode 100644 src/conf/ucm/Manta-SPDIF/Manta-SPDIF.conf

diff --git a/configure.ac b/configure.ac
index 92e5db5..daf3b91 100644
--- a/configure.ac
+++ b/configure.ac
@@ -672,6 +672,8 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
 	  src/conf/ucm/apq8064-tabla-snd-card/Makefile \
 	  src/conf/ucm/Tuna/Makefile \
 	  src/conf/ucm/tegra-rt5640/Makefile \
+	  src/conf/ucm/Manta-I2S/Makefile \
+	  src/conf/ucm/Manta-SPDIF/Makefile \
 	  modules/Makefile modules/mixer/Makefile modules/mixer/simple/Makefile \
 	  alsalisp/Makefile aserver/Makefile \
 	  test/Makefile test/lsb/Makefile \
diff --git a/src/conf/ucm/Makefile.am b/src/conf/ucm/Makefile.am
index e8cc02d..d284864 100644
--- a/src/conf/ucm/Makefile.am
+++ b/src/conf/ucm/Makefile.am
@@ -1 +1 @@
-SUBDIRS=DAISY-I2S PandaBoard PandaBoardES SDP4430 tegraalc5632 apq8064-tabla-snd-card Tuna tegra-rt5640
+SUBDIRS=DAISY-I2S PandaBoard PandaBoardES SDP4430 tegraalc5632 apq8064-tabla-snd-card Tuna tegra-rt5640 Manta-I2S Manta-SPDIF
diff --git a/src/conf/ucm/Manta-I2S/HiFi b/src/conf/ucm/Manta-I2S/HiFi
new file mode 100644
index 0000000..9e0f00c
--- /dev/null
+++ b/src/conf/ucm/Manta-I2S/HiFi
@@ -0,0 +1,211 @@
+# By David Henningsson <david.henningsson@canonical.com>
+# Translated from mixer_paths.xml in Manta repository
+
+SectionVerb {
+
+	EnableSequence [
+		cdev "hw:MantaI2S"
+
+		# A lot of defaults
+		cset "name='DAC2 Switch' 0"
+		cset "name='AIF1DRC1 Mode' Default"
+		cset "name='AIF1DAC1 DRC Switch' 0"
+		cset "name='Speaker Switch' 0"
+		cset "name='SPKR DAC1 Switch' 0"
+		cset "name='SPKL DAC1 Switch' 0"
+		cset "name='Speaker Mixer Volume' 0"
+
+		cset "name='Headphone Switch' 0"
+		cset "name='Left Output Mixer DAC Switch' 0"
+		cset "name='Right Output Mixer DAC Switch' 0"
+
+		cset "name='MIXINL IN1L Switch' 0"
+		cset "name='IN1L Switch' 0"
+		cset "name='IN1L PGA IN1LP Switch' 0"
+		cset "name='IN1L PGA IN1LN Switch' 1"
+
+		cset "name='MIXINL IN2L Switch' 0"
+		cset "name='IN2L Switch' 0"
+		cset "name='IN2L PGA IN2LP Switch' 0"
+		cset "name='IN2L PGA IN2LN Switch' 1"
+
+		cset "name='MIXINR IN1R Switch' 0"
+		cset "name='IN1R Switch' 0"
+		cset "name='IN1R PGA IN1RP Switch' 0"
+		cset "name='IN1R PGA IN1RN Switch' 1"
+
+		cset "name='MIXINR IN2R Switch' 0"
+		cset "name='IN2R Switch' 0"
+		cset "name='IN2R PGA IN2RP Switch' 0"
+		cset "name='IN2R PGA IN2RN Switch' 1"
+
+		cset "name='AIF2DACL Mux' AIF3"
+		cset "name='AIF2DACR Mux' AIF3"
+		cset "name='AIF2DAC Mux' AIF3DACDAT"
+		cset "name='AIF3ADC Mux' AIF2ADCDAT"
+
+		cset "name='AIF1ADC1L Mixer AIF2 Switch' 0"
+		cset "name='AIF1ADC1R Mixer AIF2 Switch' 0"
+		cset "name='AIF1ADC2L Mixer AIF2 Switch' 0"
+		cset "name='AIF1ADC2R Mixer AIF2 Switch' 0"
+
+		# Enable dac1
+		cset "name='DAC1R Mixer AIF1.1 Switch' 1"
+		cset "name='DAC1L Mixer AIF1.1 Switch' 1"
+		cset "name='DAC1 Switch' 1"
+
+		# Enable adc to aif1adc
+		cset "name='AIF1ADC1L Mixer ADC/DMIC Switch' 1"
+		cset "name='AIF1ADC1R Mixer ADC/DMIC Switch' 1"
+	]
+
+	DisableSequence [
+		cdev "hw:MantaI2S"
+
+		# Disable dac1
+		cset "name='DAC1R Mixer AIF1.1 Switch' 0"
+		cset "name='DAC1L Mixer AIF1.1 Switch' 0"
+		cset "name='DAC1 Switch' 0"
+
+		# Disable adc to aif1adc
+		cset "name='AIF1ADC1L Mixer ADC/DMIC Switch' 0"
+		cset "name='AIF1ADC1R Mixer ADC/DMIC Switch' 0"
+	]
+
+	# ALSA PCM
+	Value {
+
+		TQ "HiFi"
+
+		# ALSA PCM device for HiFi
+		PlaybackPCM "hw:MantaI2S,0"
+		CapturePCM "hw:MantaI2S,0"
+	}
+
+}
+
+SectionDevice."Speaker" {
+	Comment "Main speaker"
+
+	EnableSequence [
+		cdev "hw:MantaI2S"
+
+		# Enable speaker
+		cset "name='Speaker Switch' 1"
+		cset "name='SPKR DAC1 Switch' 1"
+		cset "name='SPKL DAC1 Switch' 1"
+		cset "name='Speaker Mixer Volume' 3"
+		cset "name='Speaker Boost Volume' 5"
+		cset "name='AIF1DRC1 Mode' 'Speakers Media'"
+		cset "name='AIF1DAC1 DRC Switch' 1"
+
+		# Set EQ for speaker
+		cset "name='AIF1DAC1 EQ Switch' 1"
+		cset "name='AIF1DAC1 EQ1 Volume' 3"
+		cset "name='AIF1DAC1 EQ2 Volume' 8"
+		cset "name='AIF1DAC1 EQ3 Volume' 16"
+		cset "name='AIF1DAC1 EQ4 Volume' 10"
+		cset "name='AIF1DAC1 EQ5 Volume' 11"
+
+		# Set Volume for speaker
+		cset "name='Speaker Volume' 61,62"
+	]
+
+	DisableSequence [
+		cdev "hw:MantaI2S"
+
+		cset "name='Speaker Switch' 0"
+		cset "name='AIF1DAC1 EQ Switch' 0"
+	]
+
+	Value {
+		PlaybackChannels "2"
+		PlaybackPriority "150"
+	}
+}
+
+SectionDevice."Headphones" {
+	Comment "Headphone jack"
+
+	EnableSequence [
+		cdev "hw:MantaI2S"
+
+		cset "name='Headphone Switch' 1"
+		cset "name='AIF1DAC1 EQ Switch' 0"
+		cset "name='Headphone Volume' 55,55"
+		cset "name='Left Headphone Mux' 'DAC'"
+		cset "name='Right Headphone Mux' 'DAC'"
+	]
+
+	DisableSequence [
+		cdev "hw:MantaI2S"
+
+		cset "name='Headphone Switch' 0"
+	]
+
+	Value {
+		PlaybackChannels "2"
+	}
+}
+
+SectionDevice."Microphone" {
+	Comment "Internal microphone"
+
+	EnableSequence [
+		cdev "hw:MantaI2S"
+
+		# Main mic
+		cset "name='MIXINR IN2R Switch' 1"
+		cset "name='MIXINR IN2R Volume' 1"
+		cset "name='IN2R Switch' 1"
+		cset "name='AIF1ADCL Source' Right"
+
+		# Second mic right
+		cset "name='MIXINL IN2L Switch' 1"
+		cset "name='MIXINL IN2L Volume' 1"
+		cset "name='IN2L Switch' 1"
+		cset "name='AIF1ADCR Source' Left"
+
+		# Volume
+		cset "name='IN2R Volume' 16"
+		cset "name='IN2L Volume' 16"
+		cset "name='AIF1ADC1 HPF Switch' 1"
+		cset "name='AIF1ADC1 HPF Mode' HiFi"
+	]
+
+	DisableSequence [
+		cdev "hw:MantaI2S"
+
+	]
+
+	Value {
+		CaptureChannels "2"
+	}
+}
+
+SectionDevice."HeadsetMic" {
+	Comment "Headset microphone"
+
+	EnableSequence [
+		cdev "hw:MantaI2S"
+
+		# Headset Mic
+		# Is this really correct? It looks a lot like main mic
+		cset "name='MIXINR IN2R Switch' 1"
+		cset "name='MIXINR IN2R Volume' 1"
+		cset "name='IN2R Switch' 1"
+		cset "name='AIF1ADCL Source' Right"
+
+		cset "name='IN2R Volume' 16"
+		cset "name='AIF1ADC1 HPF Mode' HiFi"
+	]
+
+	DisableSequence [
+		cdev "hw:MantaI2S"
+
+	]
+
+	Value {
+		CaptureChannels "1"
+	}
+}
diff --git a/src/conf/ucm/Manta-I2S/Makefile.am b/src/conf/ucm/Manta-I2S/Makefile.am
new file mode 100644
index 0000000..f053707
--- /dev/null
+++ b/src/conf/ucm/Manta-I2S/Makefile.am
@@ -0,0 +1,4 @@
+alsaconfigdir = @ALSA_CONFIG_DIR@
+ucmdir = $(alsaconfigdir)/ucm/Manta-I2S
+ucm_DATA = Manta-I2S.conf HiFi
+EXTRA_DIST = $(ucm_DATA)
diff --git a/src/conf/ucm/Manta-I2S/Manta-I2S.conf b/src/conf/ucm/Manta-I2S/Manta-I2S.conf
new file mode 100644
index 0000000..83b61ec
--- /dev/null
+++ b/src/conf/ucm/Manta-I2S/Manta-I2S.conf
@@ -0,0 +1,7 @@
+# UCM configuration for Manta / Nexus 10
+
+SectionUseCase."HiFi" {
+	File "HiFi"
+	Comment "Play HiFi quality Music."
+}
+
diff --git a/src/conf/ucm/Manta-SPDIF/Dummy b/src/conf/ucm/Manta-SPDIF/Dummy
new file mode 100644
index 0000000..a2ad2a7
--- /dev/null
+++ b/src/conf/ucm/Manta-SPDIF/Dummy
@@ -0,0 +1,3 @@
+SectionVerb {
+}
+SectionDevice.Dummy { }
diff --git a/src/conf/ucm/Manta-SPDIF/Makefile.am b/src/conf/ucm/Manta-SPDIF/Makefile.am
new file mode 100644
index 0000000..0e2c0dc
--- /dev/null
+++ b/src/conf/ucm/Manta-SPDIF/Makefile.am
@@ -0,0 +1,4 @@
+alsaconfigdir = @ALSA_CONFIG_DIR@
+ucmdir = $(alsaconfigdir)/ucm/Manta-SPDIF
+ucm_DATA = Manta-SPDIF.conf Dummy
+EXTRA_DIST = $(ucm_DATA)
diff --git a/src/conf/ucm/Manta-SPDIF/Manta-SPDIF.conf b/src/conf/ucm/Manta-SPDIF/Manta-SPDIF.conf
new file mode 100644
index 0000000..1db14c9
--- /dev/null
+++ b/src/conf/ucm/Manta-SPDIF/Manta-SPDIF.conf
@@ -0,0 +1,6 @@
+# This empty file makes PulseAudio avoid the card.
+
+SectionUseCase."Dummy" {
+	File Dummy
+	Comment "Dummy"
+}
-- 
1.8.3.2