GNU Linux-libre 4.19.264-gnu1
[releases.git] / sound / usb / mixer_maps.c
1 /*
2  *   Additional mixer mapping
3  *
4  *   Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de>
5  *
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.
10  *
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.
15  *
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
19  *
20  */
21
22 struct usbmix_dB_map {
23         u32 min;
24         u32 max;
25 };
26
27 struct usbmix_name_map {
28         int id;
29         const char *name;
30         int control;
31         const struct usbmix_dB_map *dB;
32 };
33
34 struct usbmix_selector_map {
35         int id;
36         int count;
37         const char **names;
38 };
39
40 struct usbmix_ctl_map {
41         u32 id;
42         const struct usbmix_name_map *map;
43         const struct usbmix_selector_map *selector_map;
44         const struct usbmix_connector_map *connector_map;
45         int ignore_ctl_error;
46 };
47
48 /*
49  * USB control mappers for SB Exitigy
50  */
51
52 /*
53  * Topology of SB Extigy (see on the wide screen :)
54
55 USB_IN[1] --->FU[2]------------------------------+->MU[16]-->PU[17]-+->FU[18]--+->EU[27]--+->EU[21]-->FU[22]--+->FU[23] > Dig_OUT[24]
56                                                  ^                  |          |          |                   |
57 USB_IN[3] -+->SU[5]-->FU[6]--+->MU[14] ->PU[15]->+                  |          |          |                   +->FU[25] > Dig_OUT[26]
58            ^                 ^                   |                  |          |          |
59 Dig_IN[4] -+                 |                   |                  |          |          +->FU[28]---------------------> Spk_OUT[19]
60                              |                   |                  |          |
61 Lin-IN[7] -+-->FU[8]---------+                   |                  |          +----------------------------------------> Hph_OUT[20]
62            |                                     |                  |
63 Mic-IN[9] --+->FU[10]----------------------------+                  |
64            ||                                                       |
65            ||  +----------------------------------------------------+
66            VV  V
67            ++--+->SU[11]-->FU[12] --------------------------------------------------------------------------------------> USB_OUT[13]
68 */
69
70 static const struct usbmix_name_map extigy_map[] = {
71         /* 1: IT pcm */
72         { 2, "PCM Playback" }, /* FU */
73         /* 3: IT pcm */
74         /* 4: IT digital in */
75         { 5, NULL }, /* DISABLED: this seems to be bogus on some firmware */
76         { 6, "Digital In" }, /* FU */
77         /* 7: IT line */
78         { 8, "Line Playback" }, /* FU */
79         /* 9: IT mic */
80         { 10, "Mic Playback" }, /* FU */
81         { 11, "Capture Source" }, /* SU */
82         { 12, "Capture" }, /* FU */
83         /* 13: OT pcm capture */
84         /* 14: MU (w/o controls) */
85         /* 15: PU (3D enh) */
86         /* 16: MU (w/o controls) */
87         { 17, NULL, 1 }, /* DISABLED: PU-switch (any effect?) */
88         { 17, "Channel Routing", 2 },   /* PU: mode select */
89         { 18, "Tone Control - Bass", UAC_FU_BASS }, /* FU */
90         { 18, "Tone Control - Treble", UAC_FU_TREBLE }, /* FU */
91         { 18, "Master Playback" }, /* FU; others */
92         /* 19: OT speaker */
93         /* 20: OT headphone */
94         { 21, NULL }, /* DISABLED: EU (for what?) */
95         { 22, "Digital Out Playback" }, /* FU */
96         { 23, "Digital Out1 Playback" }, /* FU */  /* FIXME: corresponds to 24 */
97         /* 24: OT digital out */
98         { 25, "IEC958 Optical Playback" }, /* FU */
99         { 26, "IEC958 Optical Playback" }, /* OT */
100         { 27, NULL }, /* DISABLED: EU (for what?) */
101         /* 28: FU speaker (mute) */
102         { 29, NULL }, /* Digital Input Playback Source? */
103         { 0 } /* terminator */
104 };
105
106 /* Sound Blaster MP3+ controls mapping
107  * The default mixer channels have totally misleading names,
108  * e.g. no Master and fake PCM volume
109  *                      Pavel Mihaylov <bin@bash.info>
110  */
111 static const struct usbmix_dB_map mp3plus_dB_1 = {.min = -4781, .max = 0};
112                                                 /* just guess */
113 static const struct usbmix_dB_map mp3plus_dB_2 = {.min = -1781, .max = 618};
114                                                 /* just guess */
115
116 static const struct usbmix_name_map mp3plus_map[] = {
117         /* 1: IT pcm */
118         /* 2: IT mic */
119         /* 3: IT line */
120         /* 4: IT digital in */
121         /* 5: OT digital out */
122         /* 6: OT speaker */
123         /* 7: OT pcm capture */
124         { 8, "Capture Source" }, /* FU, default PCM Capture Source */
125                 /* (Mic, Input 1 = Line input, Input 2 = Optical input) */
126         { 9, "Master Playback" }, /* FU, default Speaker 1 */
127         /* { 10, "Mic Capture", 1 }, */ /* FU, Mic Capture */
128         { 10, /* "Mic Capture", */ NULL, 2, .dB = &mp3plus_dB_2 },
129                 /* FU, Mic Capture */
130         { 10, "Mic Boost", 7 }, /* FU, default Auto Gain Input */
131         { 11, "Line Capture", .dB = &mp3plus_dB_2 },
132                 /* FU, default PCM Capture */
133         { 12, "Digital In Playback" }, /* FU, default PCM 1 */
134         { 13, /* "Mic Playback", */ .dB = &mp3plus_dB_1 },
135                 /* FU, default Mic Playback */
136         { 14, "Line Playback", .dB = &mp3plus_dB_1 }, /* FU, default Speaker */
137         /* 15: MU */
138         { 0 } /* terminator */
139 };
140
141 /* Topology of SB Audigy 2 NX
142
143           +----------------------------->EU[27]--+
144           |                                      v
145           | +----------------------------------->SU[29]---->FU[22]-->Dig_OUT[24]
146           | |                                    ^
147 USB_IN[1]-+------------+              +->EU[17]->+->FU[11]-+
148             |          v              |          v         |
149 Dig_IN[4]---+->FU[6]-->MU[16]->FU[18]-+->EU[21]->SU[31]----->FU[30]->Hph_OUT[20]
150             |          ^              |                    |
151 Lin_IN[7]-+--->FU[8]---+              +->EU[23]->FU[28]------------->Spk_OUT[19]
152           | |                                              v
153           +--->FU[12]------------------------------------->SU[14]--->USB_OUT[15]
154             |                                              ^
155             +->FU[13]--------------------------------------+
156 */
157 static const struct usbmix_name_map audigy2nx_map[] = {
158         /* 1: IT pcm playback */
159         /* 4: IT digital in */
160         { 6, "Digital In Playback" }, /* FU */
161         /* 7: IT line in */
162         { 8, "Line Playback" }, /* FU */
163         { 11, "What-U-Hear Capture" }, /* FU */
164         { 12, "Line Capture" }, /* FU */
165         { 13, "Digital In Capture" }, /* FU */
166         { 14, "Capture Source" }, /* SU */
167         /* 15: OT pcm capture */
168         /* 16: MU w/o controls */
169         { 17, NULL }, /* DISABLED: EU (for what?) */
170         { 18, "Master Playback" }, /* FU */
171         /* 19: OT speaker */
172         /* 20: OT headphone */
173         { 21, NULL }, /* DISABLED: EU (for what?) */
174         { 22, "Digital Out Playback" }, /* FU */
175         { 23, NULL }, /* DISABLED: EU (for what?) */
176         /* 24: OT digital out */
177         { 27, NULL }, /* DISABLED: EU (for what?) */
178         { 28, "Speaker Playback" }, /* FU */
179         { 29, "Digital Out Source" }, /* SU */
180         { 30, "Headphone Playback" }, /* FU */
181         { 31, "Headphone Source" }, /* SU */
182         { 0 } /* terminator */
183 };
184
185 static const struct usbmix_name_map mbox1_map[] = {
186         { 1, "Clock" },
187         { 0 } /* terminator */
188 };
189
190 static const struct usbmix_selector_map c400_selectors[] = {
191         {
192                 .id = 0x80,
193                 .count = 2,
194                 .names = (const char*[]) {"Internal", "SPDIF"}
195         },
196         { 0 } /* terminator */
197 };
198
199 static const struct usbmix_selector_map audigy2nx_selectors[] = {
200         {
201                 .id = 14, /* Capture Source */
202                 .count = 3,
203                 .names = (const char*[]) {"Line", "Digital In", "What-U-Hear"}
204         },
205         {
206                 .id = 29, /* Digital Out Source */
207                 .count = 3,
208                 .names = (const char*[]) {"Front", "PCM", "Digital In"}
209         },
210         {
211                 .id = 31, /* Headphone Source */
212                 .count = 2,
213                 .names = (const char*[]) {"Front", "Side"}
214         },
215         { 0 } /* terminator */
216 };
217
218 /* Creative SoundBlaster Live! 24-bit External */
219 static const struct usbmix_name_map live24ext_map[] = {
220         /* 2: PCM Playback Volume */
221         { 5, "Mic Capture" }, /* FU, default PCM Capture Volume */
222         { 0 } /* terminator */
223 };
224
225 /* LineX FM Transmitter entry - needed to bypass controls bug */
226 static const struct usbmix_name_map linex_map[] = {
227         /* 1: IT pcm */
228         /* 2: OT Speaker */ 
229         { 3, "Master" }, /* FU: master volume - left / right / mute */
230         { 0 } /* terminator */
231 };
232
233 static const struct usbmix_name_map maya44_map[] = {
234         /* 1: IT line */
235         { 2, "Line Playback" }, /* FU */
236         /* 3: IT line */
237         { 4, "Line Playback" }, /* FU */
238         /* 5: IT pcm playback */
239         /* 6: MU */
240         { 7, "Master Playback" }, /* FU */
241         /* 8: OT speaker */
242         /* 9: IT line */
243         { 10, "Line Capture" }, /* FU */
244         /* 11: MU */
245         /* 12: OT pcm capture */
246         { }
247 };
248
249 /* Section "justlink_map" below added by James Courtier-Dutton <James@superbug.demon.co.uk>
250  * sourced from Maplin Electronics (http://www.maplin.co.uk), part number A56AK
251  * Part has 2 connectors that act as a single output. (TOSLINK Optical for digital out, and 3.5mm Jack for Analogue out.)
252  * The USB Mixer publishes a Microphone and extra Volume controls for it, but none exist on the device,
253  * so this map removes all unwanted sliders from alsamixer
254  */
255
256 static const struct usbmix_name_map justlink_map[] = {
257         /* 1: IT pcm playback */
258         /* 2: Not present */
259         { 3, NULL}, /* IT mic (No mic input on device) */
260         /* 4: Not present */
261         /* 5: OT speacker */
262         /* 6: OT pcm capture */
263         { 7, "Master Playback" }, /* Mute/volume for speaker */
264         { 8, NULL }, /* Capture Switch (No capture inputs on device) */
265         { 9, NULL }, /* Capture Mute/volume (No capture inputs on device */
266         /* 0xa: Not present */
267         /* 0xb: MU (w/o controls) */
268         { 0xc, NULL }, /* Mic feedback Mute/volume (No capture inputs on device) */
269         { 0 } /* terminator */
270 };
271
272 /* TerraTec Aureon 5.1 MkII USB */
273 static const struct usbmix_name_map aureon_51_2_map[] = {
274         /* 1: IT USB */
275         /* 2: IT Mic */
276         /* 3: IT Line */
277         /* 4: IT SPDIF */
278         /* 5: OT SPDIF */
279         /* 6: OT Speaker */
280         /* 7: OT USB */
281         { 8, "Capture Source" }, /* SU */
282         { 9, "Master Playback" }, /* FU */
283         { 10, "Mic Capture" }, /* FU */
284         { 11, "Line Capture" }, /* FU */
285         { 12, "IEC958 In Capture" }, /* FU */
286         { 13, "Mic Playback" }, /* FU */
287         { 14, "Line Playback" }, /* FU */
288         /* 15: MU */
289         {} /* terminator */
290 };
291
292 static const struct usbmix_name_map scratch_live_map[] = {
293         /* 1: IT Line 1 (USB streaming) */
294         /* 2: OT Line 1 (Speaker) */
295         /* 3: IT Line 1 (Line connector) */
296         { 4, "Line 1 In" }, /* FU */
297         /* 5: OT Line 1 (USB streaming) */
298         /* 6: IT Line 2 (USB streaming) */
299         /* 7: OT Line 2 (Speaker) */
300         /* 8: IT Line 2 (Line connector) */
301         { 9, "Line 2 In" }, /* FU */
302         /* 10: OT Line 2 (USB streaming) */
303         /* 11: IT Mic (Line connector) */
304         /* 12: OT Mic (USB streaming) */
305         { 0 } /* terminator */
306 };
307
308 static const struct usbmix_name_map ebox44_map[] = {
309         { 4, NULL }, /* FU */
310         { 6, NULL }, /* MU */
311         { 7, NULL }, /* FU */
312         { 10, NULL }, /* FU */
313         { 11, NULL }, /* MU */
314         { 0 }
315 };
316
317 /* "Gamesurround Muse Pocket LT" looks same like "Sound Blaster MP3+"
318  *  most importand difference is SU[8], it should be set to "Capture Source"
319  *  to make alsamixer and PA working properly.
320  *  FIXME: or mp3plus_map should use "Capture Source" too,
321  *  so this maps can be merget
322  */
323 static const struct usbmix_name_map hercules_usb51_map[] = {
324         { 8, "Capture Source" },        /* SU, default "PCM Capture Source" */
325         { 9, "Master Playback" },       /* FU, default "Speaker Playback" */
326         { 10, "Mic Boost", 7 },         /* FU, default "Auto Gain Input" */
327         { 11, "Line Capture" },         /* FU, default "PCM Capture" */
328         { 13, "Mic Bypass Playback" },  /* FU, default "Mic Playback" */
329         { 14, "Line Bypass Playback" }, /* FU, default "Line Playback" */
330         { 0 }                           /* terminator */
331 };
332
333 /* Plantronics Gamecom 780 has a broken volume control, better to disable it */
334 static const struct usbmix_name_map gamecom780_map[] = {
335         { 9, NULL }, /* FU, speaker out */
336         {}
337 };
338
339 /* some (all?) SCMS USB3318 devices are affected by a firmware lock up
340  * when anything attempts to access FU 10 (control)
341  */
342 static const struct usbmix_name_map scms_usb3318_map[] = {
343         { 10, NULL },
344         { 0 }
345 };
346
347 /* Bose companion 5, the dB conversion factor is 16 instead of 256 */
348 static const struct usbmix_dB_map bose_companion5_dB = {-5006, -6};
349 static const struct usbmix_name_map bose_companion5_map[] = {
350         { 3, NULL, .dB = &bose_companion5_dB },
351         { 0 }   /* terminator */
352 };
353
354 /* Sennheiser Communications Headset [PC 8], the dB value is reported as -6 negative maximum  */
355 static const struct usbmix_dB_map sennheiser_pc8_dB = {-9500, 0};
356 static const struct usbmix_name_map sennheiser_pc8_map[] = {
357         { 9, NULL, .dB = &sennheiser_pc8_dB },
358         { 0 }   /* terminator */
359 };
360
361 /*
362  * Dell usb dock with ALC4020 codec had a firmware problem where it got
363  * screwed up when zero volume is passed; just skip it as a workaround
364  *
365  * Also the extension unit gives an access error, so skip it as well.
366  */
367 static const struct usbmix_name_map dell_alc4020_map[] = {
368         { 4, NULL },    /* extension unit */
369         { 16, NULL },
370         { 19, NULL },
371         { 0 }
372 };
373
374 /* Some mobos shipped with a dummy HD-audio show the invalid GET_MIN/GET_MAX
375  * response for Input Gain Pad (id=19, control=12) and the connector status
376  * for SPDIF terminal (id=18).  Skip them.
377  */
378 static const struct usbmix_name_map asus_rog_map[] = {
379         { 18, NULL }, /* OT, connector control */
380         { 19, NULL, 12 }, /* FU, Input Gain Pad */
381         {}
382 };
383
384 /* TRX40 mobos with Realtek ALC1220-VB */
385 static const struct usbmix_name_map trx40_mobo_map[] = {
386         { 18, NULL }, /* OT, IEC958 - broken response, disabled */
387         { 19, NULL, 12 }, /* FU, Input Gain Pad - broken response, disabled */
388         { 16, "Speaker" },              /* OT */
389         { 22, "Speaker Playback" },     /* FU */
390         { 7, "Line" },                  /* IT */
391         { 19, "Line Capture" },         /* FU */
392         { 17, "Front Headphone" },      /* OT */
393         { 23, "Front Headphone Playback" },     /* FU */
394         { 8, "Mic" },                   /* IT */
395         { 20, "Mic Capture" },          /* FU */
396         { 9, "Front Mic" },             /* IT */
397         { 21, "Front Mic Capture" },    /* FU */
398         { 24, "IEC958 Playback" },      /* FU */
399         {}
400 };
401
402 static const struct usbmix_connector_map trx40_mobo_connector_map[] = {
403         { 10, 16 },     /* (Back) Speaker */
404         { 11, 17 },     /* Front Headphone */
405         { 13, 7 },      /* Line */
406         { 14, 8 },      /* Mic */
407         { 15, 9 },      /* Front Mic */
408         {}
409 };
410
411 /* Rear panel + front mic on Gigabyte TRX40 Aorus Master with ALC1220-VB */
412 static const struct usbmix_name_map aorus_master_alc1220vb_map[] = {
413         { 17, NULL },                   /* OT, IEC958?, disabled */
414         { 19, NULL, 12 }, /* FU, Input Gain Pad - broken response, disabled */
415         { 16, "Line Out" },             /* OT */
416         { 22, "Line Out Playback" },    /* FU */
417         { 7, "Line" },                  /* IT */
418         { 19, "Line Capture" },         /* FU */
419         { 8, "Mic" },                   /* IT */
420         { 20, "Mic Capture" },          /* FU */
421         { 9, "Front Mic" },             /* IT */
422         { 21, "Front Mic Capture" },    /* FU */
423         {}
424 };
425
426 /*
427  * Control map entries
428  */
429
430 static const struct usbmix_ctl_map usbmix_ctl_maps[] = {
431         {
432                 .id = USB_ID(0x041e, 0x3000),
433                 .map = extigy_map,
434                 .ignore_ctl_error = 1,
435         },
436         {
437                 .id = USB_ID(0x041e, 0x3010),
438                 .map = mp3plus_map,
439         },
440         {
441                 .id = USB_ID(0x041e, 0x3020),
442                 .map = audigy2nx_map,
443                 .selector_map = audigy2nx_selectors,
444         },
445         {
446                 .id = USB_ID(0x041e, 0x3040),
447                 .map = live24ext_map,
448         },
449         {
450                 .id = USB_ID(0x041e, 0x3048),
451                 .map = audigy2nx_map,
452                 .selector_map = audigy2nx_selectors,
453         },
454         {       /* Logitech, Inc. QuickCam Pro for Notebooks */
455                 .id = USB_ID(0x046d, 0x0991),
456                 .ignore_ctl_error = 1,
457         },
458         {       /* Logitech, Inc. QuickCam E 3500 */
459                 .id = USB_ID(0x046d, 0x09a4),
460                 .ignore_ctl_error = 1,
461         },
462         {       /* Plantronics GameCom 780 */
463                 .id = USB_ID(0x047f, 0xc010),
464                 .map = gamecom780_map,
465         },
466         {
467                 /* Hercules DJ Console (Windows Edition) */
468                 .id = USB_ID(0x06f8, 0xb000),
469                 .ignore_ctl_error = 1,
470         },
471         {
472                 /* Hercules DJ Console (Macintosh Edition) */
473                 .id = USB_ID(0x06f8, 0xd002),
474                 .ignore_ctl_error = 1,
475         },
476         {
477                 /* Hercules Gamesurround Muse Pocket LT
478                  * (USB 5.1 Channel Audio Adapter)
479                  */
480                 .id = USB_ID(0x06f8, 0xc000),
481                 .map = hercules_usb51_map,
482         },
483         {
484                 .id = USB_ID(0x0763, 0x2030),
485                 .selector_map = c400_selectors,
486         },
487         {
488                 .id = USB_ID(0x0763, 0x2031),
489                 .selector_map = c400_selectors,
490         },
491         {
492                 .id = USB_ID(0x08bb, 0x2702),
493                 .map = linex_map,
494                 .ignore_ctl_error = 1,
495         },
496         {
497                 .id = USB_ID(0x0a92, 0x0091),
498                 .map = maya44_map,
499         },
500         {
501                 .id = USB_ID(0x0c45, 0x1158),
502                 .map = justlink_map,
503         },
504         {
505                 .id = USB_ID(0x0ccd, 0x0028),
506                 .map = aureon_51_2_map,
507         },
508         {
509                 .id = USB_ID(0x0bda, 0x4014),
510                 .map = dell_alc4020_map,
511         },
512         {
513                 .id = USB_ID(0x0dba, 0x1000),
514                 .map = mbox1_map,
515         },
516         {
517                 .id = USB_ID(0x13e5, 0x0001),
518                 .map = scratch_live_map,
519                 .ignore_ctl_error = 1,
520         },
521         {
522                 .id = USB_ID(0x200c, 0x1018),
523                 .map = ebox44_map,
524         },
525         {
526                 /* MAYA44 USB+ */
527                 .id = USB_ID(0x2573, 0x0008),
528                 .map = maya44_map,
529         },
530         {
531                 /* KEF X300A */
532                 .id = USB_ID(0x27ac, 0x1000),
533                 .map = scms_usb3318_map,
534         },
535         {
536                 /* Arcam rPAC */
537                 .id = USB_ID(0x25c4, 0x0003),
538                 .map = scms_usb3318_map,
539         },
540         {
541                 /* Bose Companion 5 */
542                 .id = USB_ID(0x05a7, 0x1020),
543                 .map = bose_companion5_map,
544         },
545         {       /* Gigabyte TRX40 Aorus Master (rear panel + front mic) */
546                 .id = USB_ID(0x0414, 0xa001),
547                 .map = aorus_master_alc1220vb_map,
548         },
549         {       /* Gigabyte TRX40 Aorus Pro WiFi */
550                 .id = USB_ID(0x0414, 0xa002),
551                 .map = trx40_mobo_map,
552                 .connector_map = trx40_mobo_connector_map,
553         },
554         {       /* ASUS ROG Zenith II */
555                 .id = USB_ID(0x0b05, 0x1916),
556                 .map = asus_rog_map,
557         },
558         {       /* ASUS ROG Strix */
559                 .id = USB_ID(0x0b05, 0x1917),
560                 .map = asus_rog_map,
561         },
562         {       /* MSI TRX40 Creator */
563                 .id = USB_ID(0x0db0, 0x0d64),
564                 .map = trx40_mobo_map,
565                 .connector_map = trx40_mobo_connector_map,
566         },
567         {       /* MSI TRX40 */
568                 .id = USB_ID(0x0db0, 0x543d),
569                 .map = trx40_mobo_map,
570                 .connector_map = trx40_mobo_connector_map,
571         },
572         {       /* Asrock TRX40 Creator */
573                 .id = USB_ID(0x26ce, 0x0a01),
574                 .map = trx40_mobo_map,
575                 .connector_map = trx40_mobo_connector_map,
576         },
577         { 0 } /* terminator */
578 };
579
580 /*
581  * Control map entries for UAC3 BADD profiles
582  */
583
584 static const struct usbmix_name_map uac3_badd_generic_io_map[] = {
585         { UAC3_BADD_FU_ID2, "Generic Out Playback" },
586         { UAC3_BADD_FU_ID5, "Generic In Capture" },
587         { 0 }                                   /* terminator */
588 };
589 static const struct usbmix_name_map uac3_badd_headphone_map[] = {
590         { UAC3_BADD_FU_ID2, "Headphone Playback" },
591         { 0 }                                   /* terminator */
592 };
593 static const struct usbmix_name_map uac3_badd_speaker_map[] = {
594         { UAC3_BADD_FU_ID2, "Speaker Playback" },
595         { 0 }                                   /* terminator */
596 };
597 static const struct usbmix_name_map uac3_badd_microphone_map[] = {
598         { UAC3_BADD_FU_ID5, "Mic Capture" },
599         { 0 }                                   /* terminator */
600 };
601 /* Covers also 'headset adapter' profile */
602 static const struct usbmix_name_map uac3_badd_headset_map[] = {
603         { UAC3_BADD_FU_ID2, "Headset Playback" },
604         { UAC3_BADD_FU_ID5, "Headset Capture" },
605         { UAC3_BADD_FU_ID7, "Sidetone Mixing" },
606         { 0 }                                   /* terminator */
607 };
608 static const struct usbmix_name_map uac3_badd_speakerphone_map[] = {
609         { UAC3_BADD_FU_ID2, "Speaker Playback" },
610         { UAC3_BADD_FU_ID5, "Mic Capture" },
611         { 0 }                                   /* terminator */
612 };
613
614 static const struct usbmix_ctl_map uac3_badd_usbmix_ctl_maps[] = {
615         {
616                 .id = UAC3_FUNCTION_SUBCLASS_GENERIC_IO,
617                 .map = uac3_badd_generic_io_map,
618         },
619         {
620                 .id = UAC3_FUNCTION_SUBCLASS_HEADPHONE,
621                 .map = uac3_badd_headphone_map,
622         },
623         {
624                 .id = UAC3_FUNCTION_SUBCLASS_SPEAKER,
625                 .map = uac3_badd_speaker_map,
626         },
627         {
628                 .id = UAC3_FUNCTION_SUBCLASS_MICROPHONE,
629                 .map = uac3_badd_microphone_map,
630         },
631         {
632                 .id = UAC3_FUNCTION_SUBCLASS_HEADSET,
633                 .map = uac3_badd_headset_map,
634         },
635         {
636                 .id = UAC3_FUNCTION_SUBCLASS_HEADSET_ADAPTER,
637                 .map = uac3_badd_headset_map,
638         },
639         {
640                 .id = UAC3_FUNCTION_SUBCLASS_SPEAKERPHONE,
641                 .map = uac3_badd_speakerphone_map,
642         },
643         {
644                 /* Sennheiser Communications Headset [PC 8] */
645                 .id = USB_ID(0x1395, 0x0025),
646                 .map = sennheiser_pc8_map,
647         },
648         { 0 } /* terminator */
649 };