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 {
37 const struct usbmix_name_map *map;
38 const struct usbmix_selector_map *selector_map;
43 * USB control mappers for SB Exitigy
47 * Topology of SB Extigy (see on the wide screen :)
49 USB_IN[1] --->FU[2]------------------------------+->MU[16]-->PU[17]-+->FU[18]--+->EU[27]--+->EU[21]-->FU[22]--+->FU[23] > Dig_OUT[24]
51 USB_IN[3] -+->SU[5]-->FU[6]--+->MU[14] ->PU[15]->+ | | | +->FU[25] > Dig_OUT[26]
53 Dig_IN[4] -+ | | | | +->FU[28]---------------------> Spk_OUT[19]
55 Lin-IN[7] -+-->FU[8]---------+ | | +----------------------------------------> Hph_OUT[20]
57 Mic-IN[9] --+->FU[10]----------------------------+ |
59 || +----------------------------------------------------+
61 ++--+->SU[11]-->FU[12] --------------------------------------------------------------------------------------> USB_OUT[13]
64 static struct usbmix_name_map extigy_map[] = {
66 { 2, "PCM Playback" }, /* FU */
68 /* 4: IT digital in */
69 { 5, NULL }, /* DISABLED: this seems to be bogus on some firmware */
70 { 6, "Digital In" }, /* FU */
72 { 8, "Line Playback" }, /* FU */
74 { 10, "Mic Playback" }, /* FU */
75 { 11, "Capture Input Source" }, /* SU */
76 { 12, "Capture" }, /* FU */
77 /* 13: OT pcm capture */
78 /* 14: MU (w/o controls) */
80 /* 16: MU (w/o controls) */
81 { 17, NULL, 1 }, /* DISABLED: PU-switch (any effect?) */
82 { 17, "Channel Routing", 2 }, /* PU: mode select */
83 { 18, "Tone Control - Bass", USB_FEATURE_BASS }, /* FU */
84 { 18, "Tone Control - Treble", USB_FEATURE_TREBLE }, /* FU */
85 { 18, "Master Playback" }, /* FU; others */
87 /* 20: OT headphone */
88 { 21, NULL }, /* DISABLED: EU (for what?) */
89 { 22, "Digital Out Playback" }, /* FU */
90 { 23, "Digital Out1 Playback" }, /* FU */ /* FIXME: corresponds to 24 */
91 /* 24: OT digital out */
92 { 25, "IEC958 Optical Playback" }, /* FU */
93 { 26, "IEC958 Optical Playback" }, /* OT */
94 { 27, NULL }, /* DISABLED: EU (for what?) */
95 /* 28: FU speaker (mute) */
96 { 29, NULL }, /* Digital Input Playback Source? */
97 { 0 } /* terminator */
100 /* Sound Blaster MP3+ controls mapping
101 * The default mixer channels have totally misleading names,
102 * e.g. no Master and fake PCM volume
103 * Pavel Mihaylov <bin@bash.info>
105 static struct usbmix_name_map mp3plus_map[] = {
109 /* 4: IT digital in */
110 /* 5: OT digital out */
112 /* 7: OT pcm capture */
113 { 8, "Capture Input Source" }, /* FU, default PCM Capture Source */
114 /* (Mic, Input 1 = Line input, Input 2 = Optical input) */
115 { 9, "Master Playback" }, /* FU, default Speaker 1 */
116 /* { 10, "Mic Capture", 1 }, */ /* FU, Mic Capture */
117 /* { 10, "Mic Capture", 2 }, */ /* FU, Mic Capture */
118 { 10, "Mic Boost", 7 }, /* FU, default Auto Gain Input */
119 { 11, "Line Capture" }, /* FU, default PCM Capture */
120 { 12, "Digital In Playback" }, /* FU, default PCM 1 */
121 /* { 13, "Mic Playback" }, */ /* FU, default Mic Playback */
122 { 14, "Line Playback" }, /* FU, default Speaker */
124 { 0 } /* terminator */
127 /* Topology of SB Audigy 2 NX
129 +----------------------------->EU[27]--+
131 | +----------------------------------->SU[29]---->FU[22]-->Dig_OUT[24]
133 USB_IN[1]-+------------+ +->EU[17]->+->FU[11]-+
135 Dig_IN[4]---+->FU[6]-->MU[16]->FU[18]-+->EU[21]->SU[31]----->FU[30]->Hph_OUT[20]
137 Lin_IN[7]-+--->FU[8]---+ +->EU[23]->FU[28]------------->Spk_OUT[19]
139 +--->FU[12]------------------------------------->SU[14]--->USB_OUT[15]
141 +->FU[13]--------------------------------------+
143 static struct usbmix_name_map audigy2nx_map[] = {
144 /* 1: IT pcm playback */
145 /* 4: IT digital in */
146 { 6, "Digital In Playback" }, /* FU */
148 { 8, "Line Playback" }, /* FU */
149 { 11, "What-U-Hear Capture" }, /* FU */
150 { 12, "Line Capture" }, /* FU */
151 { 13, "Digital In Capture" }, /* FU */
152 { 14, "Capture Source" }, /* SU */
153 /* 15: OT pcm capture */
154 /* 16: MU w/o controls */
155 { 17, NULL }, /* DISABLED: EU (for what?) */
156 { 18, "Master Playback" }, /* FU */
158 /* 20: OT headphone */
159 { 21, NULL }, /* DISABLED: EU (for what?) */
160 { 22, "Digital Out Playback" }, /* FU */
161 { 23, NULL }, /* DISABLED: EU (for what?) */
162 /* 24: OT digital out */
163 { 27, NULL }, /* DISABLED: EU (for what?) */
164 { 28, "Speaker Playback" }, /* FU */
165 { 29, "Digital Out Source" }, /* SU */
166 { 30, "Headphone Playback" }, /* FU */
167 { 31, "Headphone Source" }, /* SU */
168 { 0 } /* terminator */
171 static struct usbmix_selector_map audigy2nx_selectors[] = {
173 .id = 14, /* Capture Source */
175 .names = (const char*[]) {"Line", "Digital In", "What-U-Hear"}
178 .id = 29, /* Digital Out Source */
180 .names = (const char*[]) {"Front", "PCM", "Digital In"}
183 .id = 31, /* Headphone Source */
185 .names = (const char*[]) {"Front", "Side"}
187 { 0 } /* terminator */
190 /* LineX FM Transmitter entry - needed to bypass controls bug */
191 static struct usbmix_name_map linex_map[] = {
194 { 3, "Master" }, /* FU: master volume - left / right / mute */
195 { 0 } /* terminator */
198 /* Section "justlink_map" below added by James Courtier-Dutton <James@superbug.demon.co.uk>
199 * sourced from Maplin Electronics (http://www.maplin.co.uk), part number A56AK
200 * Part has 2 connectors that act as a single output. (TOSLINK Optical for digital out, and 3.5mm Jack for Analogue out.)
201 * The USB Mixer publishes a Microphone and extra Volume controls for it, but none exist on the device,
202 * so this map removes all unwanted sliders from alsamixer
205 static struct usbmix_name_map justlink_map[] = {
206 /* 1: IT pcm playback */
208 { 3, NULL}, /* IT mic (No mic input on device) */
211 /* 6: OT pcm capture */
212 { 7, "Master Playback" }, /* Mute/volume for speaker */
213 { 8, NULL }, /* Capture Switch (No capture inputs on device) */
214 { 9, NULL }, /* Capture Mute/volume (No capture inputs on device */
215 /* 0xa: Not present */
216 /* 0xb: MU (w/o controls) */
217 { 0xc, NULL }, /* Mic feedback Mute/volume (No capture inputs on device) */
218 { 0 } /* terminator */
222 * Control map entries
225 static struct usbmix_ctl_map usbmix_ctl_maps[] = {
227 .id = USB_ID(0x041e, 0x3000),
229 .ignore_ctl_error = 1,
232 .id = USB_ID(0x041e, 0x3010),
236 .id = USB_ID(0x041e, 0x3020),
237 .map = audigy2nx_map,
238 .selector_map = audigy2nx_selectors,
241 .id = USB_ID(0x08bb, 0x2702),
243 .ignore_ctl_error = 1,
246 .id = USB_ID(0x0c45, 0x1158),
249 { 0 } /* terminator */