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
147#define MSS_REC_DEVICES \
148 (SOUND_MASK_LINE | SOUND_MASK_MIC | SOUND_MASK_CD|SOUND_MASK_IMIX)
149
150
151/*
152 * Table of mixer registers. There is a default table for the
153 * AD1848/CS423x clones, and one for the OPTI931. As more WSS
154 * clones come out, there ought to be more tables.
155 *
156 * Fields in the table are : polarity, register, offset, bits
157 *
158 * The channel numbering used by individual soundcards is not fixed.
159 * Some cards have assigned different meanings for the AUX1, AUX2
160 * and LINE inputs. Some have different features...
161 *
162 * Following there is a macro ...MIXER_DEVICES which is a bitmap
163 * of all non-zero fields in the table.
164 * MODE1_MIXER_DEVICES is the basic mixer of the 1848 in mode 1
165 * registers I0..I15)
166 *
167 */
168
169mixer_ent mix_devices[32][2] = {
170MIX_NONE(SOUND_MIXER_VOLUME),
171MIX_NONE(SOUND_MIXER_BASS),
172MIX_NONE(SOUND_MIXER_TREBLE),
173MIX_ENT(SOUND_MIXER_SYNTH, 2, 1, 0, 5, 3, 1, 0, 5),
174MIX_ENT(SOUND_MIXER_PCM, 6, 1, 0, 6, 7, 1, 0, 6),
175MIX_ENT(SOUND_MIXER_SPEAKER, 26, 1, 0, 4, 0, 0, 0, 0),
176MIX_ENT(SOUND_MIXER_LINE, 18, 1, 0, 5, 19, 1, 0, 5),
177MIX_ENT(SOUND_MIXER_MIC, 0, 0, 5, 1, 1, 0, 5, 1),
178MIX_ENT(SOUND_MIXER_CD, 4, 1, 0, 5, 5, 1, 0, 5),
179MIX_ENT(SOUND_MIXER_IMIX, 13, 1, 2, 6, 0, 0, 0, 0),
180MIX_NONE(SOUND_MIXER_ALTPCM),
181MIX_NONE(SOUND_MIXER_RECLEV),
182MIX_ENT(SOUND_MIXER_IGAIN, 0, 0, 0, 4, 1, 0, 0, 4),
183MIX_NONE(SOUND_MIXER_OGAIN),
184MIX_NONE(SOUND_MIXER_LINE1),
185MIX_NONE(SOUND_MIXER_LINE2),
186MIX_NONE(SOUND_MIXER_LINE3),
187};
188
189#define MODE2_MIXER_DEVICES \
190 (SOUND_MASK_SYNTH | SOUND_MASK_PCM | SOUND_MASK_SPEAKER | \
191 SOUND_MASK_LINE | SOUND_MASK_MIC | SOUND_MASK_CD | \
192 SOUND_MASK_IMIX | SOUND_MASK_IGAIN )
193
194#define MODE1_MIXER_DEVICES \
195 (SOUND_MASK_SYNTH | SOUND_MASK_PCM | SOUND_MASK_MIC | \
196 SOUND_MASK_CD | SOUND_MASK_IMIX | SOUND_MASK_IGAIN )
197
198
199/*
200 * entries for the opti931...
201 */
202
203mixer_ent opti931_devices[32][2] = { /* for the opti931 */
204MIX_ENT(SOUND_MIXER_VOLUME, 22, 1, 1, 5, 23, 1, 1, 5),
205MIX_NONE(SOUND_MIXER_BASS),
206MIX_NONE(SOUND_MIXER_TREBLE),
207MIX_ENT(SOUND_MIXER_SYNTH, 4, 1, 1, 4, 5, 1, 1, 4),
208MIX_ENT(SOUND_MIXER_PCM, 6, 1, 0, 5, 7, 1, 0, 5),
209MIX_NONE(SOUND_MIXER_SPEAKER),
210MIX_ENT(SOUND_MIXER_LINE, 18, 1, 1, 4, 19, 1, 1, 4),
211MIX_ENT(SOUND_MIXER_MIC, 0, 0, 5, 1, 1, 0, 5, 1),
212MIX_ENT(SOUND_MIXER_CD, 2, 1, 1, 4, 3, 1, 1, 4),
213MIX_NONE(SOUND_MIXER_IMIX),
214MIX_NONE(SOUND_MIXER_ALTPCM),
215MIX_NONE(SOUND_MIXER_RECLEV),
216MIX_ENT(SOUND_MIXER_IGAIN, 0, 0, 0, 4, 1, 0, 0, 4),
217MIX_NONE(SOUND_MIXER_OGAIN),
218MIX_ENT(SOUND_MIXER_LINE1, 16, 1, 1, 4, 17, 1, 1, 4),
219MIX_NONE(SOUND_MIXER_LINE2),
220MIX_NONE(SOUND_MIXER_LINE3),
221};
222
223#define OPTI931_MIXER_DEVICES \
224 (SOUND_MASK_VOLUME | SOUND_MASK_SYNTH | SOUND_MASK_PCM | \
225 SOUND_MASK_LINE | SOUND_MASK_MIC | SOUND_MASK_CD | \
226 SOUND_MASK_IGAIN | SOUND_MASK_LINE1 )
227
228
229static u_short default_mixer_levels[SOUND_MIXER_NRDEVICES] = {
230 0x5a5a, /* Master Volume */
231 0x3232, /* Bass */
232 0x3232, /* Treble */
233 0x4b4b, /* FM */
234 0x4040, /* PCM */
235 0x4b4b, /* PC Speaker */
236 0x2020, /* Ext Line */

--- 13 unchanged lines hidden ---