Package: alsa-lib / 1.0.28-1

0003-Add-UCM-files-for-Nexus-7.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
From b2f9e96bb12f2df988d47bd392418fec7a5a4043 Mon Sep 17 00:00:00 2001
From: David Henningsson <david.henningsson@canonical.com>
Date: Wed, 28 Aug 2013 11:35:24 +0200
Subject: [PATCH 3/4] Add UCM files for Nexus 7

---
 configure.ac                                |    1 +
 src/conf/ucm/Makefile.am                    |    2 +-
 src/conf/ucm/tegra-rt5640/HiFi              |   98 +++++++++++++++++++++++++++
 src/conf/ucm/tegra-rt5640/Makefile.am       |    4 ++
 src/conf/ucm/tegra-rt5640/tegra-rt5640.conf |    8 +++
 5 files changed, 112 insertions(+), 1 deletion(-)
 create mode 100644 src/conf/ucm/tegra-rt5640/HiFi
 create mode 100644 src/conf/ucm/tegra-rt5640/Makefile.am
 create mode 100644 src/conf/ucm/tegra-rt5640/tegra-rt5640.conf

diff --git a/configure.ac b/configure.ac
index de4e2ef..92e5db5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -671,6 +671,7 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
 	  src/conf/ucm/tegraalc5632/Makefile \
 	  src/conf/ucm/apq8064-tabla-snd-card/Makefile \
 	  src/conf/ucm/Tuna/Makefile \
+	  src/conf/ucm/tegra-rt5640/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 029e1e8..e8cc02d 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
+SUBDIRS=DAISY-I2S PandaBoard PandaBoardES SDP4430 tegraalc5632 apq8064-tabla-snd-card Tuna tegra-rt5640
diff --git a/src/conf/ucm/tegra-rt5640/HiFi b/src/conf/ucm/tegra-rt5640/HiFi
new file mode 100644
index 0000000..3f2e77b
--- /dev/null
+++ b/src/conf/ucm/tegra-rt5640/HiFi
@@ -0,0 +1,98 @@
+# Use case Configuration for Nexus 7
+# Adapted to Ubuntu Touch by David Henningsson <david.henningsson@canonical.com>
+
+SectionVerb {
+
+	EnableSequence [
+	]
+
+	DisableSequence [
+	]
+
+	# ALSA PCM
+	Value {
+		# ALSA PCM device for HiFi
+		PlaybackPCM "hw:tegrart5640"
+		CapturePCM "hw:tegrart5640"
+	}
+}
+
+SectionDevice."Headphones" {
+	Comment "Headphones playback"
+
+	ConflictingDevice [
+		"Speaker"
+	]
+
+	EnableSequence [
+		cdev "hw:tegrart5640"
+		cset "name='Headphone Jack Switch' on"
+		cset "name='HP Playback Switch' on"
+		cset "name='HP Playback Volume' 29"
+	]
+
+	DisableSequence [
+		cdev "hw:tegrart5640"
+		cset "name='Headphone Jack Switch' on"
+		cset "name='HP Playback Switch' off"
+		cset "name='HP Playback Volume' 0"
+	]
+
+	Value {
+		PlaybackChannels "2"
+	}
+}
+
+SectionDevice."Speaker" {
+	Comment "Speaker playback"
+
+	ConflictingDevice [
+		"Headphones"
+	]
+
+	EnableSequence [
+		cdev "hw:tegrart5640"
+		cset "name='Int Spk Switch' on"
+		cset "name='Speaker Playback Switch' on"
+		cset "name='Speaker Playback Volume' 29"
+	]
+
+	DisableSequence [
+		cdev "hw:tegrart5640"
+		cset "name='Int Spk Switch' off"
+		cset "name='Speaker Playback Switch' off"
+		cset "name='Speaker Playback Volume' 0"
+	]
+
+	Value {
+		PlaybackChannels "2"
+	}
+}
+
+SectionDevice."Handset" {
+	Comment "Main Microphone"
+
+	EnableSequence [
+		cdev "hw:tegrart5640"
+
+		cset "name='ADC Switch' on"
+		cset "name='ADC Capture Switch' on"
+		cset "name='ADC Capture Volume' 100"
+		cset "name='ADC Boost Gain' 1"
+		cset "name='DMIC Switch' DMIC1"
+		cset "name='Int Mic Switch' on"
+	]
+
+	DisableSequence [
+		cdev "hw:tegrart5640"
+		cset "name='ADC Switch' off"
+		cset "name='ADC Capture Switch' off"
+		cset "name='Int Mic Switch' off"
+	]
+
+	Value {
+		CaptureChannels "2"
+	}
+}
+
+
diff --git a/src/conf/ucm/tegra-rt5640/Makefile.am b/src/conf/ucm/tegra-rt5640/Makefile.am
new file mode 100644
index 0000000..408e065
--- /dev/null
+++ b/src/conf/ucm/tegra-rt5640/Makefile.am
@@ -0,0 +1,4 @@
+alsaconfigdir = @ALSA_CONFIG_DIR@
+ucmdir = $(alsaconfigdir)/ucm/tegra-rt5640
+ucm_DATA = tegra-rt5640.conf HiFi
+EXTRA_DIST = $(ucm_DATA)
diff --git a/src/conf/ucm/tegra-rt5640/tegra-rt5640.conf b/src/conf/ucm/tegra-rt5640/tegra-rt5640.conf
new file mode 100644
index 0000000..f86e080
--- /dev/null
+++ b/src/conf/ucm/tegra-rt5640/tegra-rt5640.conf
@@ -0,0 +1,8 @@
+SectionUseCase."HiFi" {
+	File "HiFi"
+	Comment "Play HiFi quality Music"
+}
+
+SectionDefaults [
+	cdev "hw:tegrart5640"
+]
-- 
1.7.9.5