26 #define MODE1_REC_DEVICES (SOUND_MASK_LINE3 | SOUND_MASK_MIC | \
27 SOUND_MASK_LINE1 | SOUND_MASK_IMIX)
29 #define SPRO_REC_DEVICES (SOUND_MASK_LINE | SOUND_MASK_MIC | \
30 SOUND_MASK_CD | SOUND_MASK_LINE1)
32 #define MODE1_MIXER_DEVICES (SOUND_MASK_LINE1 | SOUND_MASK_MIC | \
35 SOUND_MASK_PCM | SOUND_MASK_IMIX)
37 #define MODE2_MIXER_DEVICES (SOUND_MASK_LINE1 | SOUND_MASK_LINE2 | \
39 SOUND_MASK_LINE3 | SOUND_MASK_SPEAKER | \
41 SOUND_MASK_PCM | SOUND_MASK_IMIX)
43 #define MODE3_MIXER_DEVICES (MODE2_MIXER_DEVICES | SOUND_MASK_VOLUME)
48 #define C930_MIXER_DEVICES (SOUND_MASK_LINE1 | SOUND_MASK_LINE2 | \
49 SOUND_MASK_MIC | SOUND_MASK_VOLUME | \
51 SOUND_MASK_IGAIN | SOUND_MASK_PCM)
53 #define SPRO_MIXER_DEVICES (SOUND_MASK_VOLUME | SOUND_MASK_PCM | \
54 SOUND_MASK_LINE | SOUND_MASK_SYNTH | \
55 SOUND_MASK_CD | SOUND_MASK_MIC | \
56 SOUND_MASK_SPEAKER | SOUND_MASK_LINE1 | \
72 static char mix_cvt[101] = {
73 0, 0, 3, 7,10,13,16,19,21,23,26,28,30,32,34,35,37,39,40,42,
74 43,45,46,47,49,50,51,52,53,55,56,57,58,59,60,61,62,63,64,65,
75 65,66,67,68,69,70,70,71,72,73,73,74,75,75,76,77,77,78,79,79,
76 80,81,81,82,82,83,84,84,85,85,86,86,87,87,88,88,89,89,90,90,
77 91,91,92,92,93,93,94,94,95,95,96,96,96,97,97,98,98,98,99,99,
93 #define MIX_ENT(name, reg_l, pola_l, pos_l, len_l, reg_r, pola_r, pos_r, len_r, mute_bit) \
94 [name] = {{reg_l, pola_l, pos_l, len_l, reg_l, 0, mute_bit, 0, 0, 8}, \
95 {reg_r, pola_r, pos_r, len_r, reg_r, 0, mute_bit, 0, 0, 8}}
97 #define MIX_ENT2(name, reg_l, pola_l, pos_l, len_l, mute_reg_l, mute_pola_l, mute_pos_l, \
98 rec_reg_l, rec_pola_l, rec_pos_l, \
99 reg_r, pola_r, pos_r, len_r, mute_reg_r, mute_pola_r, mute_pos_r, \
100 rec_reg_r, rec_pola_r, rec_pos_r) \
101 [name] = {{reg_l, pola_l, pos_l, len_l, mute_reg_l, mute_pola_l, mute_pos_l, \
102 rec_reg_l, rec_pola_l, rec_pos_l}, \
103 {reg_r, pola_r, pos_r, len_r, mute_reg_r, mute_pola_r, mute_pos_r, \
104 rec_reg_r, rec_pola_r, rec_pos_r}}
107 MIX_ENT(
SOUND_MIXER_VOLUME, 27, 1, 0, 4, 29, 1, 0, 4, 8),
108 MIX_ENT(
SOUND_MIXER_BASS, 0, 0, 0, 0, 0, 0, 0, 0, 8),
109 MIX_ENT(
SOUND_MIXER_TREBLE, 0, 0, 0, 0, 0, 0, 0, 0, 8),
110 MIX_ENT(
SOUND_MIXER_SYNTH, 4, 1, 0, 5, 5, 1, 0, 5, 7),
111 MIX_ENT(
SOUND_MIXER_PCM, 6, 1, 0, 6, 7, 1, 0, 6, 7),
112 MIX_ENT(
SOUND_MIXER_SPEAKER, 26, 1, 0, 4, 0, 0, 0, 0, 8),
113 MIX_ENT(
SOUND_MIXER_LINE, 18, 1, 0, 5, 19, 1, 0, 5, 7),
114 MIX_ENT(
SOUND_MIXER_MIC, 0, 0, 5, 1, 1, 0, 5, 1, 8),
115 MIX_ENT(
SOUND_MIXER_CD, 2, 1, 0, 5, 3, 1, 0, 5, 7),
116 MIX_ENT(
SOUND_MIXER_IMIX, 13, 1, 2, 6, 0, 0, 0, 0, 8),
117 MIX_ENT(
SOUND_MIXER_ALTPCM, 0, 0, 0, 0, 0, 0, 0, 0, 8),
118 MIX_ENT(
SOUND_MIXER_RECLEV, 0, 0, 0, 0, 0, 0, 0, 0, 8),
119 MIX_ENT(
SOUND_MIXER_IGAIN, 0, 0, 0, 4, 1, 0, 0, 4, 8),
120 MIX_ENT(
SOUND_MIXER_OGAIN, 0, 0, 0, 0, 0, 0, 0, 0, 8),
121 MIX_ENT(
SOUND_MIXER_LINE1, 2, 1, 0, 5, 3, 1, 0, 5, 7),
122 MIX_ENT(
SOUND_MIXER_LINE2, 4, 1, 0, 5, 5, 1, 0, 5, 7),
127 MIX_ENT(
SOUND_MIXER_VOLUME, 25, 1, 0, 5, 27, 1, 0, 5, 8),
128 MIX_ENT(
SOUND_MIXER_BASS, 0, 0, 0, 0, 0, 0, 0, 0, 8),
129 MIX_ENT(
SOUND_MIXER_TREBLE, 0, 0, 0, 0, 0, 0, 0, 0, 8),
130 MIX_ENT(
SOUND_MIXER_SYNTH, 4, 1, 0, 5, 5, 1, 0, 5, 7),
131 MIX_ENT(
SOUND_MIXER_PCM, 6, 1, 0, 6, 7, 1, 0, 6, 7),
132 MIX_ENT(
SOUND_MIXER_SPEAKER, 26, 1, 0, 4, 0, 0, 0, 0, 8),
133 MIX_ENT(
SOUND_MIXER_LINE, 18, 1, 0, 5, 19, 1, 0, 5, 7),
134 MIX_ENT(
SOUND_MIXER_MIC, 0, 0, 5, 1, 1, 0, 5, 1, 8),
135 MIX_ENT(
SOUND_MIXER_CD, 2, 1, 0, 5, 3, 1, 0, 5, 7),
136 MIX_ENT(
SOUND_MIXER_IMIX, 16, 1, 0, 5, 17, 1, 0, 5, 8),
137 MIX_ENT(
SOUND_MIXER_ALTPCM, 0, 0, 0, 0, 0, 0, 0, 0, 8),
138 MIX_ENT(
SOUND_MIXER_RECLEV, 0, 0, 0, 0, 0, 0, 0, 0, 8),
139 MIX_ENT(
SOUND_MIXER_IGAIN, 0, 0, 0, 4, 1, 0, 0, 4, 8),
140 MIX_ENT(
SOUND_MIXER_OGAIN, 0, 0, 0, 0, 0, 0, 0, 0, 8),
141 MIX_ENT(
SOUND_MIXER_LINE1, 2, 1, 0, 5, 3, 1, 0, 5, 7),
142 MIX_ENT(
SOUND_MIXER_LINE2, 4, 1, 0, 5, 5, 1, 0, 5, 7),
149 MIX_ENT(
SOUND_MIXER_VOLUME, 46, 1, 0, 6, 47, 1, 0, 6, 7),
150 MIX_ENT(
SOUND_MIXER_BASS, 0, 0, 0, 0, 0, 0, 0, 0, 8),
151 MIX_ENT(
SOUND_MIXER_TREBLE, 0, 0, 0, 0, 0, 0, 0, 0, 8),
152 MIX_ENT(
SOUND_MIXER_SYNTH, 4, 1, 0, 5, 5, 1, 0, 5, 7),
153 MIX_ENT(
SOUND_MIXER_PCM, 6, 1, 0, 6, 7, 1, 0, 6, 7),
154 MIX_ENT(
SOUND_MIXER_SPEAKER, 26, 1, 0, 4, 0, 0, 0, 0, 8),
155 MIX_ENT(
SOUND_MIXER_LINE, 18, 1, 0, 5, 19, 1, 0, 5, 7),
156 MIX_ENT(
SOUND_MIXER_MIC, 34, 1, 0, 5, 35, 1, 0, 5, 7),
157 MIX_ENT(
SOUND_MIXER_CD, 2, 1, 0, 5, 3, 1, 0, 5, 7),
161 [
SOUND_MIXER_IMIX] = {{13, 1, 2, 6, 13, 1, 0, 0, 0, 8},
162 {42, 1, 0, 6, 42, 1, 7, 0, 0, 8}},
163 MIX_ENT(
SOUND_MIXER_ALTPCM, 0, 0, 0, 0, 0, 0, 0, 0, 8),
164 MIX_ENT(
SOUND_MIXER_RECLEV, 0, 0, 0, 0, 0, 0, 0, 0, 8),
165 MIX_ENT(
SOUND_MIXER_IGAIN, 0, 0, 0, 4, 1, 0, 0, 4, 8),
166 MIX_ENT(
SOUND_MIXER_OGAIN, 0, 0, 0, 0, 0, 0, 0, 0, 8),
167 MIX_ENT(
SOUND_MIXER_LINE1, 2, 1, 0, 5, 3, 1, 0, 5, 7),
168 MIX_ENT(
SOUND_MIXER_LINE2, 4, 1, 0, 5, 5, 1, 0, 5, 7),
178 MIX_ENT(
SOUND_MIXER_VOLUME, 22, 1, 1, 5, 23, 1, 1, 5, 7),
179 MIX_ENT(
SOUND_MIXER_BASS, 0, 0, 0, 0, 0, 0, 0, 0, 8),
180 MIX_ENT(
SOUND_MIXER_TREBLE, 0, 0, 0, 0, 0, 0, 0, 0, 8),
181 MIX_ENT(
SOUND_MIXER_SYNTH, 4, 1, 1, 4, 5, 1, 1, 4, 7),
182 MIX_ENT(
SOUND_MIXER_PCM, 6, 1, 0, 5, 7, 1, 0, 5, 7),
183 MIX_ENT(
SOUND_MIXER_SPEAKER, 22, 1, 1, 5, 23, 1, 1, 5, 7),
184 MIX_ENT(
SOUND_MIXER_LINE, 18, 1, 1, 4, 19, 1, 1, 4, 7),
185 MIX_ENT(
SOUND_MIXER_MIC, 20, 1, 1, 4, 21, 1, 1, 4, 7),
186 MIX_ENT(
SOUND_MIXER_CD, 2, 1, 1, 4, 3, 1, 1, 4, 7),
187 MIX_ENT(
SOUND_MIXER_IMIX, 0, 0, 0, 0, 0, 0, 0, 0, 8),
188 MIX_ENT(
SOUND_MIXER_ALTPCM, 0, 0, 0, 0, 0, 0, 0, 0, 8),
189 MIX_ENT(
SOUND_MIXER_RECLEV, 0, 0, 0, 0, 0, 0, 0, 0, 8),
190 MIX_ENT(
SOUND_MIXER_IGAIN, 0, 0, 0, 4, 1, 0, 0, 4, 8),
191 MIX_ENT(
SOUND_MIXER_OGAIN, 0, 0, 0, 0, 0, 0, 0, 0, 8),
192 MIX_ENT(
SOUND_MIXER_LINE1, 2, 1, 1, 4, 3, 1, 1, 4, 7),
193 MIX_ENT(
SOUND_MIXER_LINE2, 4, 1, 1, 4, 5, 1, 1, 4, 7),
198 MIX_ENT (
SOUND_MIXER_VOLUME, 19, 0, 4, 4, 19, 0, 0, 4, 8),
199 MIX_ENT (
SOUND_MIXER_BASS, 0, 0, 0, 0, 0, 0, 0, 0, 8),
200 MIX_ENT (
SOUND_MIXER_TREBLE, 0, 0, 0, 0, 0, 0, 0, 0, 8),
201 MIX_ENT2(
SOUND_MIXER_SYNTH, 4, 1, 1, 4, 23, 0, 3, 0, 0, 8,
202 5, 1, 1, 4, 23, 0, 3, 0, 0, 8),
203 MIX_ENT (
SOUND_MIXER_PCM, 6, 1, 1, 4, 7, 1, 1, 4, 8),
204 MIX_ENT (
SOUND_MIXER_SPEAKER, 18, 0, 3, 2, 0, 0, 0, 0, 8),
205 MIX_ENT2(
SOUND_MIXER_LINE, 20, 0, 4, 4, 17, 1, 4, 16, 0, 2,
206 20, 0, 0, 4, 17, 1, 3, 16, 0, 1),
207 MIX_ENT2(
SOUND_MIXER_MIC, 18, 0, 0, 3, 17, 1, 0, 16, 0, 0,
208 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
209 MIX_ENT2(
SOUND_MIXER_CD, 21, 0, 4, 4, 17, 1, 2, 16, 0, 4,
210 21, 0, 0, 4, 17, 1, 1, 16, 0, 3),
211 MIX_ENT (
SOUND_MIXER_IMIX, 0, 0, 0, 0, 0, 0, 0, 0, 8),
212 MIX_ENT (
SOUND_MIXER_ALTPCM, 0, 0, 0, 0, 0, 0, 0, 0, 8),
213 MIX_ENT (
SOUND_MIXER_RECLEV, 0, 0, 0, 0, 0, 0, 0, 0, 8),
214 MIX_ENT (
SOUND_MIXER_IGAIN, 0, 0, 0, 0, 0, 0, 0, 0, 8),
215 MIX_ENT (
SOUND_MIXER_OGAIN, 17, 1, 6, 1, 0, 0, 0, 0, 8),
217 MIX_ENT2(
SOUND_MIXER_LINE1, 22, 0, 4, 4, 23, 1, 1, 23, 0, 4,
218 22, 0, 0, 4, 23, 1, 0, 23, 0, 5),
221 static int default_mixer_levels[32] =
249 #ifndef AUDIO_SPEAKER
250 #define AUDIO_SPEAKER 0x01
251 #define AUDIO_HEADPHONE 0x02
252 #define AUDIO_LINE_OUT 0x04