mss.h (29415) | mss.h (30869) |
---|---|
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 */ | 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 \ | 146 147#define MSS_REC_DEVICES \ |
149 (SOUND_MASK_LINE | SOUND_MASK_MIC | SOUND_MASK_CD|SOUND_MASK_IMIX) 150 | 148 (SOUND_MASK_LINE | SOUND_MASK_MIC | SOUND_MASK_CD|SOUND_MASK_IMIX) 149 |
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 | 150 |
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/* | 151/* |
180 * Most of the mixer entries work in backwards. Setting the polarity field 181 * makes them to work correctly. | 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. |
182 * | 155 * |
156 * Fields in the table are : polarity, register, offset, bits 157 * |
|
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... | 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... |
186 * The current version doesn't try to compensate this. | |
187 * | 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 * |
|
188 */ 189 | 167 */ 168 |
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), | 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), |
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), | 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), |
199MIX_ENT(SOUND_MIXER_CD, 2, 1, 0, 5, 3, 1, 0, 5), | 178MIX_ENT(SOUND_MIXER_CD, 4, 1, 0, 5, 5, 1, 0, 5), |
200MIX_ENT(SOUND_MIXER_IMIX, 13, 1, 2, 6, 0, 0, 0, 0), | 179MIX_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), | 180MIX_NONE(SOUND_MIXER_ALTPCM), 181MIX_NONE(SOUND_MIXER_RECLEV), |
203MIX_ENT(SOUND_MIXER_IGAIN, 0, 0, 0, 4, 1, 0, 0, 4), | 182MIX_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) | 183MIX_NONE(SOUND_MIXER_OGAIN), 184MIX_NONE(SOUND_MIXER_LINE1), 185MIX_NONE(SOUND_MIXER_LINE2), 186MIX_NONE(SOUND_MIXER_LINE3), |
208}; 209 | 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 |
|
210mixer_ent opti931_devices[32][2] = { /* for the opti931 */ 211MIX_ENT(SOUND_MIXER_VOLUME, 22, 1, 1, 5, 23, 1, 1, 5), | 203mixer_ent opti931_devices[32][2] = { /* for the opti931 */ 204MIX_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), | 205MIX_NONE(SOUND_MIXER_BASS), 206MIX_NONE(SOUND_MIXER_TREBLE), |
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), | 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), |
216MIX_ENT(SOUND_MIXER_SPEAKER, 0, 0, 0, 0, 0, 0, 0, 0), | 209MIX_NONE(SOUND_MIXER_SPEAKER), |
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), | 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), |
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), | 213MIX_NONE(SOUND_MIXER_IMIX), 214MIX_NONE(SOUND_MIXER_ALTPCM), 215MIX_NONE(SOUND_MIXER_RECLEV), |
223MIX_ENT(SOUND_MIXER_IGAIN, 0, 0, 0, 4, 1, 0, 0, 4), | 216MIX_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) | 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), |
228}; 229 | 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 |
|
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 --- | 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 --- |