Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into...
[openembedded.git] / recipes / zaurusd / files / alsa-cxx00-default.state.patch
1 http://bugs.openembedded.net/show_bug.cgi?id=2617
2 - Fixes default ALSA state for SL-Cxx00.
3   * Treble level reflects kernel fix alsa-wm8750-treble.patch (>2.6.24).
4   * Increased Mic Levels and Boost.
5   * Enabled Capture Switch.
6   * Improved Headphones / Speaker volume balance.
7   * 3D Mode changed to "Playback" (still Off by default).
8   * Disabled all bypasses.
9   * All Mono signals decreased to 0 (not connected).
10   * Line Mux changed to differential, keeping PGA unused.
11   * Using Digital mono for recording (jack supports ony mono).
12   * Enabled Automatic Level Control, optimized for voice recording.
13   * Enabled Zero Cross volume changes.
14 - Do not alter incorrect mixer levels by zaurus-mixer-callback.
15
16 Index: zaurusd/config/alsa/cxx00-default.state
17 ===================================================================
18 --- zaurusd.orig/config/alsa/cxx00-default.state        2006-06-28 08:45:07.000000000 +0000
19 +++ zaurusd/config/alsa/cxx00-default.state     2007-11-27 23:06:43.000000000 +0000
20 @@ -6,8 +6,8 @@
21                 comment.range '0 - 63'
22                 iface MIXER
23                 name 'Capture Volume'
24 -               value.0 23
25 -               value.1 23
26 +               value.0 48
27 +               value.1 48
28         }
29         control.2 {
30                 comment.access 'read write'
31 @@ -15,8 +15,8 @@
32                 comment.count 2
33                 iface MIXER
34                 name 'Capture ZC Switch'
35 -               value.0 false
36 -               value.1 false
37 +               value.0 true
38 +               value.1 true
39         }
40         control.3 {
41                 comment.access 'read write'
42 @@ -24,26 +24,26 @@
43                 comment.count 2
44                 iface MIXER
45                 name 'Capture Switch'
46 -               value.0 false
47 -               value.1 false
48 +               value.0 true
49 +               value.1 true
50         }
51         control.4 {
52                 comment.access 'read write'
53                 comment.type BOOLEAN
54                 comment.count 2
55                 iface MIXER
56 -               name 'Out1 Playback ZC Switch'
57 -               value.0 false
58 -               value.1 false
59 +               name 'Headphone Playback ZC Switch'
60 +               value.0 true
61 +               value.1 true
62         }
63         control.5 {
64                 comment.access 'read write'
65                 comment.type BOOLEAN
66                 comment.count 2
67                 iface MIXER
68 -               name 'Out2 Playback ZC Switch'
69 -               value.0 false
70 -               value.1 false
71 +               name 'Speaker Playback ZC Switch'
72 +               value.0 true
73 +               value.1 true
74         }
75         control.6 {
76                 comment.access 'read write'
77 @@ -92,8 +92,8 @@
78                 comment.range '0 - 255'
79                 iface MIXER
80                 name 'PCM Volume'
81 -               value.0 255
82 -               value.1 255
83 +               value.0 220
84 +               value.1 220
85         }
86         control.11 {
87                 comment.access 'read write'
88 @@ -131,7 +131,7 @@
89                 comment.range '0 - 15'
90                 iface MIXER
91                 name 'Treble Volume'
92 -               value 15
93 +               value 0
94         }
95         control.15 {
96                 comment.access 'read write'
97 @@ -188,7 +188,7 @@
98                 comment.item.1 Playback
99                 iface MIXER
100                 name '3D Mode'
101 -               value Capture
102 +               value Playback
103         }
104         control.21 {
105                 comment.access 'read write'
106 @@ -226,7 +226,7 @@
107                 comment.count 1
108                 iface MIXER
109                 name 'ALC Capture ZC Switch'
110 -               value false
111 +               value true
112         }
113         control.25 {
114                 comment.access 'read write'
115 @@ -235,7 +235,7 @@
116                 comment.range '0 - 15'
117                 iface MIXER
118                 name 'ALC Capture Hold Time'
119 -               value 0
120 +               value 9
121         }
122         control.26 {
123                 comment.access 'read write'
124 @@ -244,7 +244,7 @@
125                 comment.range '0 - 15'
126                 iface MIXER
127                 name 'ALC Capture Decay Time'
128 -               value 3
129 +               value 9
130         }
131         control.27 {
132                 comment.access 'read write'
133 @@ -253,7 +253,7 @@
134                 comment.range '0 - 15'
135                 iface MIXER
136                 name 'ALC Capture Attack Time'
137 -               value 2
138 +               value 3
139         }
140         control.28 {
141                 comment.access 'read write'
142 @@ -306,7 +306,7 @@
143                 comment.count 1
144                 iface MIXER
145                 name 'ZC Timeout Switch'
146 -               value false
147 +               value true
148         }
149         control.34 {
150                 comment.access 'read write'
151 @@ -321,7 +321,7 @@
152                 comment.type BOOLEAN
153                 comment.count 1
154                 iface MIXER
155 -               name 'Right Out2 Playback Invert Switch'
156 +               name 'Right Speaker Playback Invert Switch'
157                 value true
158         }
159         control.36 {
160 @@ -331,8 +331,8 @@
161                 comment.range '0 - 3'
162                 iface MIXER
163                 name 'Mic Boost'
164 -               value.0 2
165 -               value.1 2
166 +               value.0 3
167 +               value.1 3
168         }
169         control.37 {
170                 comment.access 'read write'
171 @@ -341,8 +341,8 @@
172                 comment.range '0 - 7'
173                 iface MIXER
174                 name 'Bypass Left Playback Volume'
175 -               value.0 2
176 -               value.1 2
177 +               value.0 0
178 +               value.1 0
179         }
180         control.38 {
181                 comment.access 'read write'
182 @@ -361,8 +361,8 @@
183                 comment.range '0 - 7'
184                 iface MIXER
185                 name 'Bypass Mono Playback Volume'
186 -               value.0 2
187 -               value.1 2
188 +               value.0 0
189 +               value.1 0
190         }
191         control.40 {
192                 comment.access 'read write'
193 @@ -378,9 +378,9 @@
194                 comment.count 2
195                 comment.range '0 - 127'
196                 iface MIXER
197 -               name 'Out1 Playback Volume'
198 -               value.0 120
199 -               value.1 120
200 +               name 'Headphone Playback Volume'
201 +               value.0 105
202 +               value.1 105
203         }
204         control.42 {
205                 comment.access 'read write'
206 @@ -388,9 +388,9 @@
207                 comment.count 2
208                 comment.range '0 - 127'
209                 iface MIXER
210 -               name 'Out2 Playback Volume'
211 -               value.0 119
212 -               value.1 119
213 +               name 'Speaker Playback Volume'
214 +               value.0 127
215 +               value.1 127
216         }
217         control.43 {
218                 comment.access 'read write'
219 @@ -399,7 +399,7 @@
220                 comment.range '0 - 127'
221                 iface MIXER
222                 name 'Mono Playback Volume'
223 -               value 121
224 +               value 0
225         }
226         control.44 {
227                 comment.access 'read write'
228 @@ -411,7 +411,7 @@
229                 comment.item.3 'Digital Mono'
230                 iface MIXER
231                 name 'Right ADC Mux'
232 -               value 'Mono (Left)'
233 +               value 'Digital Mono'
234         }
235         control.45 {
236                 comment.access 'read write'
237 @@ -423,7 +423,7 @@
238                 comment.item.3 'Digital Mono'
239                 iface MIXER
240                 name 'Left ADC Mux'
241 -               value 'Mono (Left)'
242 +               value 'Digital Mono'
243         }
244         control.46 {
245                 comment.access 'read write'
246 @@ -471,7 +471,7 @@
247                 comment.item.4 Differential
248                 iface MIXER
249                 name 'Left Line Mux'
250 -               value PGA
251 +               value Differential
252         }
253         control.50 {
254                 comment.access 'read write'
255 @@ -610,9 +610,8 @@
256                 comment.access 'read write'
257                 comment.type ENUMERATED
258                 comment.count 1
259 -               comment.item.0 Auto
260 -               comment.item.1 On
261 -               comment.item.2 Off
262 +               comment.item.0 On
263 +               comment.item.1 Off
264                 iface MIXER
265                 name 'Speaker Function'
266                 value On
267 Index: zaurusd/scripts/zaurus-mixer-callback.in
268 ===================================================================
269 --- zaurusd.orig/scripts/zaurus-mixer-callback.in       2007-11-27 23:32:45.000000000 +0000
270 +++ zaurusd/scripts/zaurus-mixer-callback.in    2007-11-27 23:36:54.000000000 +0000
271 @@ -16,8 +16,6 @@
272  JACK="$1"
273  SPK="$2"
274  LEFT="true"
275 -RLPLAYBACK="false"
276 -RLBYPASS="false"
277  
278  case $SPK in
279    "On")
280 @@ -37,8 +35,6 @@
281      ;;
282    "Headset" | "Mic" | "Line")
283      LEFT="false"
284 -    RLPLAYBACK="true"
285 -    RLBYPASS="true"
286      SPK="Off"
287      ;;
288    *)
289 @@ -58,12 +54,6 @@
290  }; /Speaker Function/ {
291  N
292  s:\(Speaker Function.*\n.*value \).*$:\1$SPK:
293 -}; /Right Mixer Left Playback/ {
294 -N
295 -s:\(Right Mixer Left Playback.*\n.*value \).*$:\1$RLPLAYBACK:
296 -}; /Right Mixer Left Bypass/ {
297 -N
298 -s:\(Right Mixer Left Bypass.*\n.*value \).*$:\1$RLBYPASS:
299  }; /Left Mixer Playback/ {
300  N
301  s:\(Left Mixer Playback.*\n.*value \).*$:\1$LEFT: