1 2 /* 3 * Diverse SLab audio routines. 4 * Copyright (c) by Nick Copeland <nickycopeland@hotmail.com> 1996,2012 5 * 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, see <http://www.gnu.org/licenses/>. 19 * 20 */ 21 22 #ifndef SLAB_MIXED 23 #define SLAB_MIXED 24 /* 25 * This should be set up according to system type. 26 */ 27 #ifndef INC_SOURCE 28 #define SLAB_NULL -1 29 #define SLAB_TREBLE SOUND_MIXER_TREBLE 30 #define SLAB_MID -1 31 #define SLAB_BASS SOUND_MIXER_BASS 32 #define SLAB_INPUT_GAIN SOUND_MIXER_IGAIN 33 #define SLAB_OUTPUT_GAIN SOUND_MIXER_OGAIN 34 #define SLAB_VOLUME SOUND_MIXER_VOLUME 35 #define SLAB_VOL_SYNTH SOUND_MIXER_SYNTH 36 #define SLAB_VOL_CD SOUND_MIXER_CD 37 #define SLAB_VOL_MIC SOUND_MIXER_MIC 38 #define SLAB_VOL_LINE SOUND_MIXER_LINE 39 #define SLAB_VOL_LINE1 SOUND_MIXER_LINE1 40 #define SLAB_VOL_LINE2 SOUND_MIXER_LINE2 41 #define SLAB_VOL_LINE3 SOUND_MIXER_LINE3 42 #define SLAB_VOL_PCM SOUND_MIXER_PCM 43 #define SLAB_VOL_SPEAKER SOUND_MIXER_SPEAKER 44 #define SLAB_VOL_ALT_PCM SOUND_MIXER_ALTPCM 45 #define SLAB_VOL_RECLEV SOUND_MIXER_RECLEV 46 #define SLAB_VOL_IMIX SOUND_MIXER_IMIX 47 #else 48 #define SLAB_NULL -1 49 #define SLAB_TREBLE 2 50 #define SLAB_MID -1 51 #define SLAB_BASS 1 52 #define SLAB_INPUT_GAIN 12 53 #define SLAB_OUTPUT_GAIN 13 54 #define SLAB_VOLUME 0 55 #define SLAB_VOL_SYNTH 3 56 #define SLAB_VOL_CD 8 57 #define SLAB_VOL_MIC 7 58 #define SLAB_VOL_LINE 6 59 #define SLAB_VOL_LINE1 14 60 #define SLAB_VOL_LINE2 15 61 #define SLAB_VOL_LINE3 16 62 #define SLAB_VOL_PCM 4 63 #define SLAB_VOL_SPEAKER 5 64 #define SLAB_VOL_ALT_PCM 10 65 #define SLAB_VOL_RECLEV 11 66 #define SLAB_VOL_IMIX 9 67 #endif 68 69 #define SLAB_CD SLAB_VOL_CD 70 #define SLAB_MIC SLAB_VOL_MIC 71 #define SLAB_LINE SLAB_VOL_LINE 72 #define SLAB_LINE1 SLAB_VOL_LINE1 73 #define SLAB_LINE2 SLAB_VOL_LINE2 74 #define SLAB_LINE3 SLAB_VOL_LINE3 75 #define SLAB_SYNTH SLAB_VOL_SYNTH 76 #define SLAB_PCM SLAB_VOL_PCM 77 78 #define SLAB_NULL_MASK 0 79 #define SLAB_TREBLE_MASK 1<<SLAB_TREBLE 80 #define SLAB_MID_MASK SLAB_NULL_MASK 81 #define SLAB_BASS_MASK 1<<SLAB_BASS 82 #define SLAB_INPUT_GAIN_MASK 1<<SLAB_INPUT_GAIN 83 #define SLAB_OUTPUT_GAIN_MASK 1<<SLAB_OUTPUT_GAIN 84 #define SLAB_VOLUME_MASK 1<<SLAB_VOLUME 85 #define SLAB_VOL_SYNTH_MASK 1<<SLAB_VOL_SYNTH 86 #define SLAB_VOL_CD_MASK 1<<SLAB_VOL_CD 87 #define SLAB_VOL_MIC_MASK 1<<SLAB_VOL_MIC 88 #define SLAB_VOL_LINE_MASK 1<<SLAB_VOL_LINE 89 #define SLAB_VOL_LINE1_MASK 1<<SLAB_VOL_LINE1 90 #define SLAB_VOL_LINE2_MASK 1<<SLAB_VOL_LINE2 91 #define SLAB_VOL_LINE3_MASK 1<<SLAB_VOL_LINE3 92 #define SLAB_VOL_PCM_MASK 1<<SLAB_VOL_PCM 93 94 #define SLAB_REC_SRC 0xff 95 96 /* 97 * These allow the same parameters to be used for either 0-100 ranges (this 98 * case, or 0-270 defined as per above. Scaling is done in libmixer. These are 99 * the MicroMix definitions. 100 */ 101 102 #define SLAB_MM_BIT 0x100000 103 #define SLAB_OPCODE_BIT 0x200000 104 105 #define SLAB_SPECIAL 0x400001 106 107 #define SLAB_MM_MASK ~SLAB_MM_BIT 108 #define SLAB_OPCODE_MASK ~SLAB_OPCODE_BIT 109 110 #define SLAB_MM_CD SLAB_VOL_CD | SLAB_MM_BIT 111 #define SLAB_MM_MIC SLAB_VOL_MIC | SLAB_MM_BIT 112 #define SLAB_MM_LINE SLAB_VOL_LINE | SLAB_MM_BIT 113 #define SLAB_MM_LINE1 SLAB_VOL_LINE1| SLAB_MM_BIT 114 #define SLAB_MM_LINE2 SLAB_VOL_LINE2| SLAB_MM_BIT 115 #define SLAB_MM_LINE3 SLAB_VOL_LINE3| SLAB_MM_BIT 116 #define SLAB_MM_SYNTH SLAB_VOL_SYNTH | SLAB_MM_BIT 117 #define SLAB_MM_PCM SLAB_VOL_PCM | SLAB_MM_BIT 118 119 /* 120 * These allow the same parameters to be used for either 0-100 ranges (this 121 * case, or 0-270 defined as per above. Scaling is done in libmixer. These are 122 * the MicroMix definitions. 123 */ 124 125 #define SLAB_MM_BIT 0x100000 126 #define SLAB_OPCODE_BIT 0x200000 127 128 #define SLAB_SPECIAL 0x400001 129 130 #define SLAB_MM_MASK ~SLAB_MM_BIT 131 #define SLAB_OPCODE_MASK ~SLAB_OPCODE_BIT 132 133 #define SLAB_MM_CD SLAB_VOL_CD | SLAB_MM_BIT 134 #define SLAB_MM_MIC SLAB_VOL_MIC | SLAB_MM_BIT 135 #define SLAB_MM_LINE SLAB_VOL_LINE | SLAB_MM_BIT 136 #define SLAB_MM_LINE1 SLAB_VOL_LINE1| SLAB_MM_BIT 137 #define SLAB_MM_LINE2 SLAB_VOL_LINE2| SLAB_MM_BIT 138 #define SLAB_MM_LINE3 SLAB_VOL_LINE3| SLAB_MM_BIT 139 #define SLAB_MM_SYNTH SLAB_VOL_SYNTH | SLAB_MM_BIT 140 #define SLAB_MM_PCM SLAB_VOL_PCM | SLAB_MM_BIT 141 142 #endif /* SLAB_MIXED */ 143