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 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 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 struct usbmix_dB_map mp3plus_dB_1 = {.min = -4781, .max = 0}; 112 /* just guess */ 113 static struct usbmix_dB_map mp3plus_dB_2 = {.min = -1781, .max = 618}; 114 /* just guess */ 115 116 static 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 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 struct usbmix_name_map mbox1_map[] = { 186 { 1, "Clock" }, 187 { 0 } /* terminator */ 188 }; 189 190 static 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 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 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 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 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 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 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 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 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 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 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 struct usbmix_dB_map bose_companion5_dB = {-5006, -6}; 349 static struct usbmix_name_map bose_companion5_map[] = { 350 { 3, NULL, .dB = &bose_companion5_dB }, 351 { 0 } /* terminator */ 352 }; 353 354 /* 355 * Dell usb dock with ALC4020 codec had a firmware problem where it got 356 * screwed up when zero volume is passed; just skip it as a workaround 357 * 358 * Also the extension unit gives an access error, so skip it as well. 359 */ 360 static const struct usbmix_name_map dell_alc4020_map[] = { 361 { 4, NULL }, /* extension unit */ 362 { 16, NULL }, 363 { 19, NULL }, 364 { 0 } 365 }; 366 367 /* Some mobos shipped with a dummy HD-audio show the invalid GET_MIN/GET_MAX 368 * response for Input Gain Pad (id=19, control=12) and the connector status 369 * for SPDIF terminal (id=18). Skip them. 370 */ 371 static const struct usbmix_name_map asus_rog_map[] = { 372 { 18, NULL }, /* OT, connector control */ 373 { 19, NULL, 12 }, /* FU, Input Gain Pad */ 374 {} 375 }; 376 377 /* TRX40 mobos with Realtek ALC1220-VB */ 378 static const struct usbmix_name_map trx40_mobo_map[] = { 379 { 18, NULL }, /* OT, IEC958 - broken response, disabled */ 380 { 19, NULL, 12 }, /* FU, Input Gain Pad - broken response, disabled */ 381 { 16, "Speaker" }, /* OT */ 382 { 22, "Speaker Playback" }, /* FU */ 383 { 7, "Line" }, /* IT */ 384 { 19, "Line Capture" }, /* FU */ 385 { 17, "Front Headphone" }, /* OT */ 386 { 23, "Front Headphone Playback" }, /* FU */ 387 { 8, "Mic" }, /* IT */ 388 { 20, "Mic Capture" }, /* FU */ 389 { 9, "Front Mic" }, /* IT */ 390 { 21, "Front Mic Capture" }, /* FU */ 391 { 24, "IEC958 Playback" }, /* FU */ 392 {} 393 }; 394 395 static const struct usbmix_connector_map trx40_mobo_connector_map[] = { 396 { 10, 16 }, /* (Back) Speaker */ 397 { 11, 17 }, /* Front Headphone */ 398 { 13, 7 }, /* Line */ 399 { 14, 8 }, /* Mic */ 400 { 15, 9 }, /* Front Mic */ 401 {} 402 }; 403 404 /* Rear panel + front mic on Gigabyte TRX40 Aorus Master with ALC1220-VB */ 405 static const struct usbmix_name_map aorus_master_alc1220vb_map[] = { 406 { 17, NULL }, /* OT, IEC958?, disabled */ 407 { 19, NULL, 12 }, /* FU, Input Gain Pad - broken response, disabled */ 408 { 16, "Line Out" }, /* OT */ 409 { 22, "Line Out Playback" }, /* FU */ 410 { 7, "Line" }, /* IT */ 411 { 19, "Line Capture" }, /* FU */ 412 { 8, "Mic" }, /* IT */ 413 { 20, "Mic Capture" }, /* FU */ 414 { 9, "Front Mic" }, /* IT */ 415 { 21, "Front Mic Capture" }, /* FU */ 416 {} 417 }; 418 419 /* 420 * Control map entries 421 */ 422 423 static struct usbmix_ctl_map usbmix_ctl_maps[] = { 424 { 425 .id = USB_ID(0x041e, 0x3000), 426 .map = extigy_map, 427 .ignore_ctl_error = 1, 428 }, 429 { 430 .id = USB_ID(0x041e, 0x3010), 431 .map = mp3plus_map, 432 }, 433 { 434 .id = USB_ID(0x041e, 0x3020), 435 .map = audigy2nx_map, 436 .selector_map = audigy2nx_selectors, 437 }, 438 { 439 .id = USB_ID(0x041e, 0x3040), 440 .map = live24ext_map, 441 }, 442 { 443 .id = USB_ID(0x041e, 0x3048), 444 .map = audigy2nx_map, 445 .selector_map = audigy2nx_selectors, 446 }, 447 { /* Logitech, Inc. QuickCam Pro for Notebooks */ 448 .id = USB_ID(0x046d, 0x0991), 449 .ignore_ctl_error = 1, 450 }, 451 { /* Logitech, Inc. QuickCam E 3500 */ 452 .id = USB_ID(0x046d, 0x09a4), 453 .ignore_ctl_error = 1, 454 }, 455 { /* Plantronics GameCom 780 */ 456 .id = USB_ID(0x047f, 0xc010), 457 .map = gamecom780_map, 458 }, 459 { 460 /* Hercules DJ Console (Windows Edition) */ 461 .id = USB_ID(0x06f8, 0xb000), 462 .ignore_ctl_error = 1, 463 }, 464 { 465 /* Hercules DJ Console (Macintosh Edition) */ 466 .id = USB_ID(0x06f8, 0xd002), 467 .ignore_ctl_error = 1, 468 }, 469 { 470 /* Hercules Gamesurround Muse Pocket LT 471 * (USB 5.1 Channel Audio Adapter) 472 */ 473 .id = USB_ID(0x06f8, 0xc000), 474 .map = hercules_usb51_map, 475 }, 476 { 477 .id = USB_ID(0x0763, 0x2030), 478 .selector_map = c400_selectors, 479 }, 480 { 481 .id = USB_ID(0x0763, 0x2031), 482 .selector_map = c400_selectors, 483 }, 484 { 485 .id = USB_ID(0x08bb, 0x2702), 486 .map = linex_map, 487 .ignore_ctl_error = 1, 488 }, 489 { 490 .id = USB_ID(0x0a92, 0x0091), 491 .map = maya44_map, 492 }, 493 { 494 .id = USB_ID(0x0c45, 0x1158), 495 .map = justlink_map, 496 }, 497 { 498 .id = USB_ID(0x0ccd, 0x0028), 499 .map = aureon_51_2_map, 500 }, 501 { 502 .id = USB_ID(0x0bda, 0x4014), 503 .map = dell_alc4020_map, 504 }, 505 { 506 .id = USB_ID(0x0dba, 0x1000), 507 .map = mbox1_map, 508 }, 509 { 510 .id = USB_ID(0x13e5, 0x0001), 511 .map = scratch_live_map, 512 .ignore_ctl_error = 1, 513 }, 514 { 515 .id = USB_ID(0x200c, 0x1018), 516 .map = ebox44_map, 517 }, 518 { 519 /* MAYA44 USB+ */ 520 .id = USB_ID(0x2573, 0x0008), 521 .map = maya44_map, 522 }, 523 { 524 /* KEF X300A */ 525 .id = USB_ID(0x27ac, 0x1000), 526 .map = scms_usb3318_map, 527 }, 528 { 529 /* Arcam rPAC */ 530 .id = USB_ID(0x25c4, 0x0003), 531 .map = scms_usb3318_map, 532 }, 533 { 534 /* Bose Companion 5 */ 535 .id = USB_ID(0x05a7, 0x1020), 536 .map = bose_companion5_map, 537 }, 538 { /* Gigabyte TRX40 Aorus Master (rear panel + front mic) */ 539 .id = USB_ID(0x0414, 0xa001), 540 .map = aorus_master_alc1220vb_map, 541 }, 542 { /* Gigabyte TRX40 Aorus Pro WiFi */ 543 .id = USB_ID(0x0414, 0xa002), 544 .map = trx40_mobo_map, 545 .connector_map = trx40_mobo_connector_map, 546 }, 547 { /* ASUS ROG Zenith II */ 548 .id = USB_ID(0x0b05, 0x1916), 549 .map = asus_rog_map, 550 }, 551 { /* ASUS ROG Strix */ 552 .id = USB_ID(0x0b05, 0x1917), 553 .map = asus_rog_map, 554 }, 555 { /* MSI TRX40 Creator */ 556 .id = USB_ID(0x0db0, 0x0d64), 557 .map = trx40_mobo_map, 558 .connector_map = trx40_mobo_connector_map, 559 }, 560 { /* MSI TRX40 */ 561 .id = USB_ID(0x0db0, 0x543d), 562 .map = trx40_mobo_map, 563 .connector_map = trx40_mobo_connector_map, 564 }, 565 { /* Asrock TRX40 Creator */ 566 .id = USB_ID(0x26ce, 0x0a01), 567 .map = trx40_mobo_map, 568 .connector_map = trx40_mobo_connector_map, 569 }, 570 { 0 } /* terminator */ 571 }; 572 573 /* 574 * Control map entries for UAC3 BADD profiles 575 */ 576 577 static struct usbmix_name_map uac3_badd_generic_io_map[] = { 578 { UAC3_BADD_FU_ID2, "Generic Out Playback" }, 579 { UAC3_BADD_FU_ID5, "Generic In Capture" }, 580 { 0 } /* terminator */ 581 }; 582 static struct usbmix_name_map uac3_badd_headphone_map[] = { 583 { UAC3_BADD_FU_ID2, "Headphone Playback" }, 584 { 0 } /* terminator */ 585 }; 586 static struct usbmix_name_map uac3_badd_speaker_map[] = { 587 { UAC3_BADD_FU_ID2, "Speaker Playback" }, 588 { 0 } /* terminator */ 589 }; 590 static struct usbmix_name_map uac3_badd_microphone_map[] = { 591 { UAC3_BADD_FU_ID5, "Mic Capture" }, 592 { 0 } /* terminator */ 593 }; 594 /* Covers also 'headset adapter' profile */ 595 static struct usbmix_name_map uac3_badd_headset_map[] = { 596 { UAC3_BADD_FU_ID2, "Headset Playback" }, 597 { UAC3_BADD_FU_ID5, "Headset Capture" }, 598 { UAC3_BADD_FU_ID7, "Sidetone Mixing" }, 599 { 0 } /* terminator */ 600 }; 601 static struct usbmix_name_map uac3_badd_speakerphone_map[] = { 602 { UAC3_BADD_FU_ID2, "Speaker Playback" }, 603 { UAC3_BADD_FU_ID5, "Mic Capture" }, 604 { 0 } /* terminator */ 605 }; 606 607 static struct usbmix_ctl_map uac3_badd_usbmix_ctl_maps[] = { 608 { 609 .id = UAC3_FUNCTION_SUBCLASS_GENERIC_IO, 610 .map = uac3_badd_generic_io_map, 611 }, 612 { 613 .id = UAC3_FUNCTION_SUBCLASS_HEADPHONE, 614 .map = uac3_badd_headphone_map, 615 }, 616 { 617 .id = UAC3_FUNCTION_SUBCLASS_SPEAKER, 618 .map = uac3_badd_speaker_map, 619 }, 620 { 621 .id = UAC3_FUNCTION_SUBCLASS_MICROPHONE, 622 .map = uac3_badd_microphone_map, 623 }, 624 { 625 .id = UAC3_FUNCTION_SUBCLASS_HEADSET, 626 .map = uac3_badd_headset_map, 627 }, 628 { 629 .id = UAC3_FUNCTION_SUBCLASS_HEADSET_ADAPTER, 630 .map = uac3_badd_headset_map, 631 }, 632 { 633 .id = UAC3_FUNCTION_SUBCLASS_SPEAKERPHONE, 634 .map = uac3_badd_speakerphone_map, 635 }, 636 { 0 } /* terminator */ 637 }; 638