mixer_maps.c 22 KB

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