2 * Additional mixer mapping
4 * Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 struct usbmix_name_map {
29 struct usbmix_selector_map {
35 struct usbmix_ctl_map {
38 const struct usbmix_name_map *map;
39 const struct usbmix_selector_map *selector_map;
44 * USB control mappers for SB Exitigy
48 * Topology of SB Extigy (see on the wide screen :)
50 USB_IN[1] --->FU[2]------------------------------+->MU[16]-->PU[17]-+->FU[18]--+->EU[27]--+->EU[21]-->FU[22]--+->FU[23] > Dig_OUT[24]
52 USB_IN[3] -+->SU[5]-->FU[6]--+->MU[14] ->PU[15]->+ | | | +->FU[25] > Dig_OUT[26]
54 Dig_IN[4] -+ | | | | +->FU[28]---------------------> Spk_OUT[19]
56 Lin-IN[7] -+-->FU[8]---------+ | | +----------------------------------------> Hph_OUT[20]
58 Mic-IN[9] --+->FU[10]----------------------------+ |
60 || +----------------------------------------------------+
62 ++--+->SU[11]-->FU[12] --------------------------------------------------------------------------------------> USB_OUT[13]
65 static struct usbmix_name_map extigy_map[] = {
67 { 2, "PCM Playback" }, /* FU */
69 /* 4: IT digital in */
70 { 5, NULL }, /* DISABLED: this seems to be bogus on some firmware */
71 { 6, "Digital In" }, /* FU */
73 { 8, "Line Playback" }, /* FU */
75 { 10, "Mic Playback" }, /* FU */
76 { 11, "Capture Input Source" }, /* SU */
77 { 12, "Capture" }, /* FU */
78 /* 13: OT pcm capture */
79 /* 14: MU (w/o controls) */
81 /* 16: MU (w/o controls) */
82 { 17, NULL, 1 }, /* DISABLED: PU-switch (any effect?) */
83 { 17, "Channel Routing", 2 }, /* PU: mode select */
84 { 18, "Tone Control - Bass", USB_FEATURE_BASS }, /* FU */
85 { 18, "Tone Control - Treble", USB_FEATURE_TREBLE }, /* FU */
86 { 18, "Master Playback" }, /* FU; others */
88 /* 20: OT headphone */
89 { 21, NULL }, /* DISABLED: EU (for what?) */
90 { 22, "Digital Out Playback" }, /* FU */
91 { 23, "Digital Out1 Playback" }, /* FU */ /* FIXME: corresponds to 24 */
92 /* 24: OT digital out */
93 { 25, "IEC958 Optical Playback" }, /* FU */
94 { 26, "IEC958 Optical Playback" }, /* OT */
95 { 27, NULL }, /* DISABLED: EU (for what?) */
96 /* 28: FU speaker (mute) */
97 { 29, NULL }, /* Digital Input Playback Source? */
98 { 0 } /* terminator */
101 /* Sound Blaster MP3+ controls mapping
102 * The default mixer channels have totally misleading names,
103 * e.g. no Master and fake PCM volume
104 * Pavel Mihaylov <bin@bash.info>
106 static struct usbmix_name_map mp3plus_map[] = {
110 /* 4: IT digital in */
111 /* 5: OT digital out */
113 /* 7: OT pcm capture */
114 { 8, "Capture Input Source" }, /* FU, default PCM Capture Source */
115 /* (Mic, Input 1 = Line input, Input 2 = Optical input) */
116 { 9, "Master Playback" }, /* FU, default Speaker 1 */
117 /* { 10, "Mic Capture", 1 }, */ /* FU, Mic Capture */
118 /* { 10, "Mic Capture", 2 }, */ /* FU, Mic Capture */
119 { 10, "Mic Boost", 7 }, /* FU, default Auto Gain Input */
120 { 11, "Line Capture" }, /* FU, default PCM Capture */
121 { 12, "Digital In Playback" }, /* FU, default PCM 1 */
122 /* { 13, "Mic Playback" }, */ /* FU, default Mic Playback */
123 { 14, "Line Playback" }, /* FU, default Speaker */
125 { 0 } /* terminator */
128 /* Topology of SB Audigy 2 NX
130 +----------------------------->EU[27]--+
132 | +----------------------------------->SU[29]---->FU[22]-->Dig_OUT[24]
134 USB_IN[1]-+------------+ +->EU[17]->+->FU[11]-+
136 Dig_IN[4]---+->FU[6]-->MU[16]->FU[18]-+->EU[21]->SU[31]----->FU[30]->Hph_OUT[20]
138 Lin_IN[7]-+--->FU[8]---+ +->EU[23]->FU[28]------------->Spk_OUT[19]
140 +--->FU[12]------------------------------------->SU[14]--->USB_OUT[15]
142 +->FU[13]--------------------------------------+
144 static struct usbmix_name_map audigy2nx_map[] = {
145 /* 1: IT pcm playback */
146 /* 4: IT digital in */
147 { 6, "Digital In Playback" }, /* FU */
149 { 8, "Line Playback" }, /* FU */
150 { 11, "What-U-Hear Capture" }, /* FU */
151 { 12, "Line Capture" }, /* FU */
152 { 13, "Digital In Capture" }, /* FU */
153 { 14, "Capture Source" }, /* SU */
154 /* 15: OT pcm capture */
155 /* 16: MU w/o controls */
156 { 17, NULL }, /* DISABLED: EU (for what?) */
157 { 18, "Master Playback" }, /* FU */
159 /* 20: OT headphone */
160 { 21, NULL }, /* DISABLED: EU (for what?) */
161 { 22, "Digital Out Playback" }, /* FU */
162 { 23, NULL }, /* DISABLED: EU (for what?) */
163 /* 24: OT digital out */
164 { 27, NULL }, /* DISABLED: EU (for what?) */
165 { 28, "Speaker Playback" }, /* FU */
166 { 29, "Digital Out Source" }, /* SU */
167 { 30, "Headphone Playback" }, /* FU */
168 { 31, "Headphone Source" }, /* SU */
169 { 0 } /* terminator */
172 static struct usbmix_selector_map audigy2nx_selectors[] = {
174 .id = 14, /* Capture Source */
176 .names = (const char*[]) {"Line", "Digital In", "What-U-Hear"}
179 .id = 29, /* Digital Out Source */
181 .names = (const char*[]) {"Front", "PCM", "Digital In"}
184 .id = 31, /* Headphone Source */
186 .names = (const char*[]) {"Front", "Side"}
188 { 0 } /* terminator */
191 /* LineX FM Transmitter entry - needed to bypass controls bug */
192 static struct usbmix_name_map linex_map[] = {
195 { 3, "Master" }, /* FU: master volume - left / right / mute */
196 { 0 } /* terminator */
199 /* Section "justlink_map" below added by James Courtier-Dutton <James@superbug.demon.co.uk>
200 * sourced from Maplin Electronics (http://www.maplin.co.uk), part number A56AK
201 * Part has 2 connectors that act as a single output. (TOSLINK Optical for digital out, and 3.5mm Jack for Analogue out.)
202 * The USB Mixer publishes a Microphone and extra Volume controls for it, but none exist on the device,
203 * so this map removes all unwanted sliders from alsamixer
206 static struct usbmix_name_map justlink_map[] = {
207 /* 1: IT pcm playback */
209 { 3, NULL}, /* IT mic (No mic input on device) */
212 /* 6: OT pcm capture */
213 { 7, "Master Playback" }, /* Mute/volume for speaker */
214 { 8, NULL }, /* Capture Switch (No capture inputs on device) */
215 { 9, NULL }, /* Capture Mute/volume (No capture inputs on device */
216 /* 0xa: Not present */
217 /* 0xb: MU (w/o controls) */
218 { 0xc, NULL }, /* Mic feedback Mute/volume (No capture inputs on device) */
219 { 0 } /* terminator */
223 * Control map entries
226 static struct usbmix_ctl_map usbmix_ctl_maps[] = {
228 .vendor = 0x41e, .product = 0x3000,
230 .ignore_ctl_error = 1,
233 .vendor = 0x41e, .product = 0x3010,
237 .vendor = 0x41e, .product = 0x3020,
238 .map = audigy2nx_map,
239 .selector_map = audigy2nx_selectors,
242 .vendor = 0x8bb, .product = 0x2702,
244 .ignore_ctl_error = 1,
247 .vendor = 0xc45, .product = 0x1158,
250 { 0 } /* terminator */