Deleted Added
sdiff udiff text old ( 29415 ) new ( 30869 )
full compact
1/*
2 * file: mss.h
3 *
4 * (C) 1997 Luigi Rizzo (luigi@iet.unipi.it)
5 *
6 * This file contains information and macro definitions for
7 * AD1848-compatible devices, used in the MSS/WSS compatible boards.
8 *

--- 129 unchanged lines hidden (view full) ---

138 * Soundcard manufacturers have connected actual inputs (CD, synth, line,
139 * etc) to these inputs in different order. Therefore it's difficult
140 * to assign mixer channels to to these inputs correctly. The following
141 * contains two alternative mappings. The first one is for GUS MAX and
142 * the second is just a generic one (line1, line2 and line3).
143 * (Actually this is not a mapping but rather some kind of interleaving
144 * solution).
145 */
146#define GUSMAX_MIXER
147#ifdef GUSMAX_MIXER
148#define MODE1_REC_DEVICES \
149 (SOUND_MASK_LINE | SOUND_MASK_MIC | SOUND_MASK_CD|SOUND_MASK_IMIX)
150
151#define MODE1_MIXER_DEVICES \
152 (SOUND_MASK_SYNTH | SOUND_MASK_MIC | SOUND_MASK_CD | \
153 SOUND_MASK_IGAIN | SOUND_MASK_PCM|SOUND_MASK_IMIX)
154
155#define MODE2_MIXER_DEVICES \
156 (SOUND_MASK_SYNTH | SOUND_MASK_LINE | SOUND_MASK_MIC | \
157 SOUND_MASK_CD | SOUND_MASK_SPEAKER | SOUND_MASK_IGAIN | \
158 SOUND_MASK_PCM | SOUND_MASK_IMIX)
159
160#else /* Generic mapping */
161
162#define MODE1_REC_DEVICES \
163 (SOUND_MASK_LINE3 | SOUND_MASK_MIC | SOUND_MASK_LINE1|SOUND_MASK_IMIX)
164
165#define MODE1_MIXER_DEVICES \
166 (SOUND_MASK_LINE1 | SOUND_MASK_MIC | SOUND_MASK_LINE2 | \
167 SOUND_MASK_IGAIN | SOUND_MASK_PCM | SOUND_MASK_IMIX)
168
169#define MODE2_MIXER_DEVICES \
170 (SOUND_MASK_LINE1 | SOUND_MASK_MIC | SOUND_MASK_LINE2 | \
171 SOUND_MASK_LINE3 | SOUND_MASK_SPEAKER | \
172 SOUND_MASK_IGAIN | SOUND_MASK_PCM | SOUND_MASK_IMIX)
173#endif
174
175#define OPTI931_MIXER_DEVICES \
176 (SOUND_MASK_VOLUME | SOUND_MASK_SYNTH | SOUND_MASK_PCM | \
177 SOUND_MASK_LINE | SOUND_MASK_MIC | SOUND_MASK_CD | SOUND_MASK_IGAIN )
178
179/*
180 * Most of the mixer entries work in backwards. Setting the polarity field
181 * makes them to work correctly.
182 *
183 * The channel numbering used by individual soundcards is not fixed.
184 * Some cards have assigned different meanings for the AUX1, AUX2
185 * and LINE inputs. Some have different features...
186 * The current version doesn't try to compensate this.
187 *
188 */
189
190mixer_ent mix_devices[32][2] = { /* As used in GUS MAX */
191MIX_ENT(SOUND_MIXER_VOLUME, 0, 0, 0, 0, 0, 0, 0, 0),
192MIX_ENT(SOUND_MIXER_BASS, 0, 0, 0, 0, 0, 0, 0, 0),
193MIX_ENT(SOUND_MIXER_TREBLE, 0, 0, 0, 0, 0, 0, 0, 0),
194MIX_ENT(SOUND_MIXER_SYNTH, 4, 1, 0, 5, 5, 1, 0, 5),
195MIX_ENT(SOUND_MIXER_PCM, 6, 1, 0, 6, 7, 1, 0, 6),
196MIX_ENT(SOUND_MIXER_SPEAKER, 26, 1, 0, 4, 0, 0, 0, 0),
197MIX_ENT(SOUND_MIXER_LINE, 18, 1, 0, 5, 19, 1, 0, 5),
198MIX_ENT(SOUND_MIXER_MIC, 0, 0, 5, 1, 1, 0, 5, 1),
199MIX_ENT(SOUND_MIXER_CD, 2, 1, 0, 5, 3, 1, 0, 5),
200MIX_ENT(SOUND_MIXER_IMIX, 13, 1, 2, 6, 0, 0, 0, 0),
201MIX_ENT(SOUND_MIXER_ALTPCM, 0, 0, 0, 0, 0, 0, 0, 0),
202MIX_ENT(SOUND_MIXER_RECLEV, 0, 0, 0, 0, 0, 0, 0, 0),
203MIX_ENT(SOUND_MIXER_IGAIN, 0, 0, 0, 4, 1, 0, 0, 4),
204MIX_ENT(SOUND_MIXER_OGAIN, 0, 0, 0, 0, 0, 0, 0, 0),
205MIX_ENT(SOUND_MIXER_LINE1, 2, 1, 0, 5, 3, 1, 0, 5),
206MIX_ENT(SOUND_MIXER_LINE2, 4, 1, 0, 5, 5, 1, 0, 5),
207MIX_ENT(SOUND_MIXER_LINE3, 18, 1, 0, 5, 19, 1, 0, 5)
208};
209
210mixer_ent opti931_devices[32][2] = { /* for the opti931 */
211MIX_ENT(SOUND_MIXER_VOLUME, 22, 1, 1, 5, 23, 1, 1, 5),
212MIX_ENT(SOUND_MIXER_BASS, 0, 0, 0, 0, 0, 0, 0, 0),
213MIX_ENT(SOUND_MIXER_TREBLE, 0, 0, 0, 0, 0, 0, 0, 0),
214MIX_ENT(SOUND_MIXER_SYNTH, 4, 1, 1, 4, 5, 1, 1, 4),
215MIX_ENT(SOUND_MIXER_PCM, 6, 1, 0, 5, 7, 1, 0, 5),
216MIX_ENT(SOUND_MIXER_SPEAKER, 0, 0, 0, 0, 0, 0, 0, 0),
217MIX_ENT(SOUND_MIXER_LINE, 18, 1, 1, 4, 19, 1, 1, 4),
218MIX_ENT(SOUND_MIXER_MIC, 0, 0, 5, 1, 1, 0, 5, 1),
219MIX_ENT(SOUND_MIXER_CD, 2, 1, 1, 4, 3, 1, 1, 4),
220MIX_ENT(SOUND_MIXER_IMIX, 0, 0, 0, 0, 0, 0, 0, 0),
221MIX_ENT(SOUND_MIXER_ALTPCM, 0, 0, 0, 0, 0, 0, 0, 0),
222MIX_ENT(SOUND_MIXER_RECLEV, 0, 0, 0, 0, 0, 0, 0, 0),
223MIX_ENT(SOUND_MIXER_IGAIN, 0, 0, 0, 4, 1, 0, 0, 4),
224MIX_ENT(SOUND_MIXER_OGAIN, 0, 0, 0, 0, 0, 0, 0, 0),
225MIX_ENT(SOUND_MIXER_LINE1, 2, 1, 0, 5, 3, 1, 0, 5),
226MIX_ENT(SOUND_MIXER_LINE2, 4, 1, 0, 5, 5, 1, 0, 5),
227MIX_ENT(SOUND_MIXER_LINE3, 18, 1, 0, 5, 19, 1, 0, 5)
228};
229
230static u_short default_mixer_levels[SOUND_MIXER_NRDEVICES] = {
231 0x5a5a, /* Master Volume */
232 0x3232, /* Bass */
233 0x3232, /* Treble */
234 0x4b4b, /* FM */
235 0x4040, /* PCM */
236 0x4b4b, /* PC Speaker */
237 0x2020, /* Ext Line */

--- 13 unchanged lines hidden ---