mixer_maps.c 19 KB

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