Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 /*
0003  *   Additional mixer mapping
0004  *
0005  *   Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de>
0006  */
0007 
0008 struct usbmix_dB_map {
0009     int min;
0010     int max;
0011     bool min_mute;
0012 };
0013 
0014 struct usbmix_name_map {
0015     int id;
0016     const char *name;
0017     int control;
0018     const struct usbmix_dB_map *dB;
0019 };
0020 
0021 struct usbmix_selector_map {
0022     int id;
0023     int count;
0024     const char **names;
0025 };
0026 
0027 struct usbmix_ctl_map {
0028     u32 id;
0029     const struct usbmix_name_map *map;
0030     const struct usbmix_selector_map *selector_map;
0031     const struct usbmix_connector_map *connector_map;
0032 };
0033 
0034 /*
0035  * USB control mappers for SB Exitigy
0036  */
0037 
0038 /*
0039  * Topology of SB Extigy (see on the wide screen :)
0040 
0041 USB_IN[1] --->FU[2]------------------------------+->MU[16]-->PU[17]-+->FU[18]--+->EU[27]--+->EU[21]-->FU[22]--+->FU[23] > Dig_OUT[24]
0042                                                  ^                  |          |          |                   |
0043 USB_IN[3] -+->SU[5]-->FU[6]--+->MU[14] ->PU[15]->+                  |          |          |                   +->FU[25] > Dig_OUT[26]
0044            ^                 ^                   |                  |          |          |
0045 Dig_IN[4] -+                 |                   |                  |          |          +->FU[28]---------------------> Spk_OUT[19]
0046                              |                   |                  |          |
0047 Lin-IN[7] -+-->FU[8]---------+                   |                  |          +----------------------------------------> Hph_OUT[20]
0048            |                                     |                  |
0049 Mic-IN[9] --+->FU[10]----------------------------+                  |
0050            ||                                                       |
0051            ||  +----------------------------------------------------+
0052            VV  V
0053            ++--+->SU[11]-->FU[12] --------------------------------------------------------------------------------------> USB_OUT[13]
0054 */
0055 
0056 static const struct usbmix_name_map extigy_map[] = {
0057     /* 1: IT pcm */
0058     { 2, "PCM Playback" }, /* FU */
0059     /* 3: IT pcm */
0060     /* 4: IT digital in */
0061     { 5, NULL }, /* DISABLED: this seems to be bogus on some firmware */
0062     { 6, "Digital In" }, /* FU */
0063     /* 7: IT line */
0064     { 8, "Line Playback" }, /* FU */
0065     /* 9: IT mic */
0066     { 10, "Mic Playback" }, /* FU */
0067     { 11, "Capture Source" }, /* SU */
0068     { 12, "Capture" }, /* FU */
0069     /* 13: OT pcm capture */
0070     /* 14: MU (w/o controls) */
0071     /* 15: PU (3D enh) */
0072     /* 16: MU (w/o controls) */
0073     { 17, NULL, 1 }, /* DISABLED: PU-switch (any effect?) */
0074     { 17, "Channel Routing", 2 },   /* PU: mode select */
0075     { 18, "Tone Control - Bass", UAC_FU_BASS }, /* FU */
0076     { 18, "Tone Control - Treble", UAC_FU_TREBLE }, /* FU */
0077     { 18, "Master Playback" }, /* FU; others */
0078     /* 19: OT speaker */
0079     /* 20: OT headphone */
0080     { 21, NULL }, /* DISABLED: EU (for what?) */
0081     { 22, "Digital Out Playback" }, /* FU */
0082     { 23, "Digital Out1 Playback" }, /* FU */  /* FIXME: corresponds to 24 */
0083     /* 24: OT digital out */
0084     { 25, "IEC958 Optical Playback" }, /* FU */
0085     { 26, "IEC958 Optical Playback" }, /* OT */
0086     { 27, NULL }, /* DISABLED: EU (for what?) */
0087     /* 28: FU speaker (mute) */
0088     { 29, NULL }, /* Digital Input Playback Source? */
0089     { 0 } /* terminator */
0090 };
0091 
0092 /* Sound Blaster MP3+ controls mapping
0093  * The default mixer channels have totally misleading names,
0094  * e.g. no Master and fake PCM volume
0095  *          Pavel Mihaylov <bin@bash.info>
0096  */
0097 static const struct usbmix_dB_map mp3plus_dB_1 = {.min = -4781, .max = 0};
0098                         /* just guess */
0099 static const struct usbmix_dB_map mp3plus_dB_2 = {.min = -1781, .max = 618};
0100                         /* just guess */
0101 
0102 static const struct usbmix_name_map mp3plus_map[] = {
0103     /* 1: IT pcm */
0104     /* 2: IT mic */
0105     /* 3: IT line */
0106     /* 4: IT digital in */
0107     /* 5: OT digital out */
0108     /* 6: OT speaker */
0109     /* 7: OT pcm capture */
0110     { 8, "Capture Source" }, /* FU, default PCM Capture Source */
0111         /* (Mic, Input 1 = Line input, Input 2 = Optical input) */
0112     { 9, "Master Playback" }, /* FU, default Speaker 1 */
0113     /* { 10, "Mic Capture", 1 }, */ /* FU, Mic Capture */
0114     { 10, /* "Mic Capture", */ NULL, 2, .dB = &mp3plus_dB_2 },
0115         /* FU, Mic Capture */
0116     { 10, "Mic Boost", 7 }, /* FU, default Auto Gain Input */
0117     { 11, "Line Capture", .dB = &mp3plus_dB_2 },
0118         /* FU, default PCM Capture */
0119     { 12, "Digital In Playback" }, /* FU, default PCM 1 */
0120     { 13, /* "Mic Playback", */ .dB = &mp3plus_dB_1 },
0121         /* FU, default Mic Playback */
0122     { 14, "Line Playback", .dB = &mp3plus_dB_1 }, /* FU, default Speaker */
0123     /* 15: MU */
0124     { 0 } /* terminator */
0125 };
0126 
0127 /* Topology of SB Audigy 2 NX
0128 
0129           +----------------------------->EU[27]--+
0130           |                                      v
0131           | +----------------------------------->SU[29]---->FU[22]-->Dig_OUT[24]
0132           | |                                    ^
0133 USB_IN[1]-+------------+              +->EU[17]->+->FU[11]-+
0134             |          v              |          v         |
0135 Dig_IN[4]---+->FU[6]-->MU[16]->FU[18]-+->EU[21]->SU[31]----->FU[30]->Hph_OUT[20]
0136             |          ^              |                    |
0137 Lin_IN[7]-+--->FU[8]---+              +->EU[23]->FU[28]------------->Spk_OUT[19]
0138           | |                                              v
0139           +--->FU[12]------------------------------------->SU[14]--->USB_OUT[15]
0140             |                                              ^
0141             +->FU[13]--------------------------------------+
0142 */
0143 static const struct usbmix_name_map audigy2nx_map[] = {
0144     /* 1: IT pcm playback */
0145     /* 4: IT digital in */
0146     { 6, "Digital In Playback" }, /* FU */
0147     /* 7: IT line in */
0148     { 8, "Line Playback" }, /* FU */
0149     { 11, "What-U-Hear Capture" }, /* FU */
0150     { 12, "Line Capture" }, /* FU */
0151     { 13, "Digital In Capture" }, /* FU */
0152     { 14, "Capture Source" }, /* SU */
0153     /* 15: OT pcm capture */
0154     /* 16: MU w/o controls */
0155     { 17, NULL }, /* DISABLED: EU (for what?) */
0156     { 18, "Master Playback" }, /* FU */
0157     /* 19: OT speaker */
0158     /* 20: OT headphone */
0159     { 21, NULL }, /* DISABLED: EU (for what?) */
0160     { 22, "Digital Out Playback" }, /* FU */
0161     { 23, NULL }, /* DISABLED: EU (for what?) */
0162     /* 24: OT digital out */
0163     { 27, NULL }, /* DISABLED: EU (for what?) */
0164     { 28, "Speaker Playback" }, /* FU */
0165     { 29, "Digital Out Source" }, /* SU */
0166     { 30, "Headphone Playback" }, /* FU */
0167     { 31, "Headphone Source" }, /* SU */
0168     { 0 } /* terminator */
0169 };
0170 
0171 static const struct usbmix_name_map mbox1_map[] = {
0172     { 1, "Clock" },
0173     { 0 } /* terminator */
0174 };
0175 
0176 static const struct usbmix_selector_map c400_selectors[] = {
0177     {
0178         .id = 0x80,
0179         .count = 2,
0180         .names = (const char*[]) {"Internal", "SPDIF"}
0181     },
0182     { 0 } /* terminator */
0183 };
0184 
0185 static const struct usbmix_selector_map audigy2nx_selectors[] = {
0186     {
0187         .id = 14, /* Capture Source */
0188         .count = 3,
0189         .names = (const char*[]) {"Line", "Digital In", "What-U-Hear"}
0190     },
0191     {
0192         .id = 29, /* Digital Out Source */
0193         .count = 3,
0194         .names = (const char*[]) {"Front", "PCM", "Digital In"}
0195     },
0196     {
0197         .id = 31, /* Headphone Source */
0198         .count = 2,
0199         .names = (const char*[]) {"Front", "Side"}
0200     },
0201     { 0 } /* terminator */
0202 };
0203 
0204 /* Creative SoundBlaster Live! 24-bit External */
0205 static const struct usbmix_name_map live24ext_map[] = {
0206     /* 2: PCM Playback Volume */
0207     { 5, "Mic Capture" }, /* FU, default PCM Capture Volume */
0208     { 0 } /* terminator */
0209 };
0210 
0211 /* LineX FM Transmitter entry - needed to bypass controls bug */
0212 static const struct usbmix_name_map linex_map[] = {
0213     /* 1: IT pcm */
0214     /* 2: OT Speaker */ 
0215     { 3, "Master" }, /* FU: master volume - left / right / mute */
0216     { 0 } /* terminator */
0217 };
0218 
0219 static const struct usbmix_name_map maya44_map[] = {
0220     /* 1: IT line */
0221     { 2, "Line Playback" }, /* FU */
0222     /* 3: IT line */
0223     { 4, "Line Playback" }, /* FU */
0224     /* 5: IT pcm playback */
0225     /* 6: MU */
0226     { 7, "Master Playback" }, /* FU */
0227     /* 8: OT speaker */
0228     /* 9: IT line */
0229     { 10, "Line Capture" }, /* FU */
0230     /* 11: MU */
0231     /* 12: OT pcm capture */
0232     { }
0233 };
0234 
0235 /* Section "justlink_map" below added by James Courtier-Dutton <James@superbug.demon.co.uk>
0236  * sourced from Maplin Electronics (https://www.maplin.co.uk), part number A56AK
0237  * Part has 2 connectors that act as a single output. (TOSLINK Optical for digital out, and 3.5mm Jack for Analogue out.)
0238  * The USB Mixer publishes a Microphone and extra Volume controls for it, but none exist on the device,
0239  * so this map removes all unwanted sliders from alsamixer
0240  */
0241 
0242 static const struct usbmix_name_map justlink_map[] = {
0243     /* 1: IT pcm playback */
0244     /* 2: Not present */
0245     { 3, NULL}, /* IT mic (No mic input on device) */
0246     /* 4: Not present */
0247     /* 5: OT speacker */
0248     /* 6: OT pcm capture */
0249     { 7, "Master Playback" }, /* Mute/volume for speaker */
0250     { 8, NULL }, /* Capture Switch (No capture inputs on device) */
0251     { 9, NULL }, /* Capture Mute/volume (No capture inputs on device */
0252     /* 0xa: Not present */
0253     /* 0xb: MU (w/o controls) */
0254     { 0xc, NULL }, /* Mic feedback Mute/volume (No capture inputs on device) */
0255     { 0 } /* terminator */
0256 };
0257 
0258 /* TerraTec Aureon 5.1 MkII USB */
0259 static const struct usbmix_name_map aureon_51_2_map[] = {
0260     /* 1: IT USB */
0261     /* 2: IT Mic */
0262     /* 3: IT Line */
0263     /* 4: IT SPDIF */
0264     /* 5: OT SPDIF */
0265     /* 6: OT Speaker */
0266     /* 7: OT USB */
0267     { 8, "Capture Source" }, /* SU */
0268     { 9, "Master Playback" }, /* FU */
0269     { 10, "Mic Capture" }, /* FU */
0270     { 11, "Line Capture" }, /* FU */
0271     { 12, "IEC958 In Capture" }, /* FU */
0272     { 13, "Mic Playback" }, /* FU */
0273     { 14, "Line Playback" }, /* FU */
0274     /* 15: MU */
0275     {} /* terminator */
0276 };
0277 
0278 static const struct usbmix_name_map scratch_live_map[] = {
0279     /* 1: IT Line 1 (USB streaming) */
0280     /* 2: OT Line 1 (Speaker) */
0281     /* 3: IT Line 1 (Line connector) */
0282     { 4, "Line 1 In" }, /* FU */
0283     /* 5: OT Line 1 (USB streaming) */
0284     /* 6: IT Line 2 (USB streaming) */
0285     /* 7: OT Line 2 (Speaker) */
0286     /* 8: IT Line 2 (Line connector) */
0287     { 9, "Line 2 In" }, /* FU */
0288     /* 10: OT Line 2 (USB streaming) */
0289     /* 11: IT Mic (Line connector) */
0290     /* 12: OT Mic (USB streaming) */
0291     { 0 } /* terminator */
0292 };
0293 
0294 static const struct usbmix_name_map ebox44_map[] = {
0295     { 4, NULL }, /* FU */
0296     { 6, NULL }, /* MU */
0297     { 7, NULL }, /* FU */
0298     { 10, NULL }, /* FU */
0299     { 11, NULL }, /* MU */
0300     { 0 }
0301 };
0302 
0303 /* "Gamesurround Muse Pocket LT" looks same like "Sound Blaster MP3+"
0304  *  most importand difference is SU[8], it should be set to "Capture Source"
0305  *  to make alsamixer and PA working properly.
0306  *  FIXME: or mp3plus_map should use "Capture Source" too,
0307  *  so this maps can be merget
0308  */
0309 static const struct usbmix_name_map hercules_usb51_map[] = {
0310     { 8, "Capture Source" },    /* SU, default "PCM Capture Source" */
0311     { 9, "Master Playback" },   /* FU, default "Speaker Playback" */
0312     { 10, "Mic Boost", 7 },     /* FU, default "Auto Gain Input" */
0313     { 11, "Line Capture" },     /* FU, default "PCM Capture" */
0314     { 13, "Mic Bypass Playback" },  /* FU, default "Mic Playback" */
0315     { 14, "Line Bypass Playback" }, /* FU, default "Line Playback" */
0316     { 0 }               /* terminator */
0317 };
0318 
0319 /* Plantronics Gamecom 780 has a broken volume control, better to disable it */
0320 static const struct usbmix_name_map gamecom780_map[] = {
0321     { 9, NULL }, /* FU, speaker out */
0322     {}
0323 };
0324 
0325 /* some (all?) SCMS USB3318 devices are affected by a firmware lock up
0326  * when anything attempts to access FU 10 (control)
0327  */
0328 static const struct usbmix_name_map scms_usb3318_map[] = {
0329     { 10, NULL },
0330     { 0 }
0331 };
0332 
0333 /* Bose companion 5, the dB conversion factor is 16 instead of 256 */
0334 static const struct usbmix_dB_map bose_companion5_dB = {-5006, -6};
0335 static const struct usbmix_name_map bose_companion5_map[] = {
0336     { 3, NULL, .dB = &bose_companion5_dB },
0337     { 0 }   /* terminator */
0338 };
0339 
0340 /* Bose Revolve+ SoundLink, correction of dB maps */
0341 static const struct usbmix_dB_map bose_soundlink_dB = {-8283, -0, true};
0342 static const struct usbmix_name_map bose_soundlink_map[] = {
0343     { 2, NULL, .dB = &bose_soundlink_dB },
0344     { 0 }   /* terminator */
0345 };
0346 
0347 /* Sennheiser Communications Headset [PC 8], the dB value is reported as -6 negative maximum  */
0348 static const struct usbmix_dB_map sennheiser_pc8_dB = {-9500, 0};
0349 static const struct usbmix_name_map sennheiser_pc8_map[] = {
0350     { 9, NULL, .dB = &sennheiser_pc8_dB },
0351     { 0 }   /* terminator */
0352 };
0353 
0354 /*
0355  * Dell usb dock with ALC4020 codec had a firmware problem where it got
0356  * screwed up when zero volume is passed; just skip it as a workaround
0357  *
0358  * Also the extension unit gives an access error, so skip it as well.
0359  */
0360 static const struct usbmix_name_map dell_alc4020_map[] = {
0361     { 4, NULL },    /* extension unit */
0362     { 16, NULL },
0363     { 19, NULL },
0364     { 0 }
0365 };
0366 
0367 /*
0368  * Corsair Virtuoso calls everything "Headset" without this, leading to
0369  * applications moving the sidetone control instead of the main one.
0370  */
0371 static const struct usbmix_name_map corsair_virtuoso_map[] = {
0372     { 3, "Mic Capture" },
0373     { 6, "Sidetone Playback" },
0374     { 0 }
0375 };
0376 
0377 /* ASUS ROG Zenith II with Realtek ALC1220-VB */
0378 static const struct usbmix_name_map asus_zenith_ii_map[] = {
0379     { 19, NULL, 12 }, /* FU, Input Gain Pad - broken response, disabled */
0380     { 16, "Speaker" },      /* OT */
0381     { 22, "Speaker Playback" }, /* FU */
0382     { 7, "Line" },          /* IT */
0383     { 19, "Line Capture" },     /* FU */
0384     { 8, "Mic" },           /* IT */
0385     { 20, "Mic Capture" },      /* FU */
0386     { 9, "Front Mic" },     /* IT */
0387     { 21, "Front Mic Capture" },    /* FU */
0388     { 17, "IEC958" },       /* OT */
0389     { 23, "IEC958 Playback" },  /* FU */
0390     {}
0391 };
0392 
0393 static const struct usbmix_connector_map asus_zenith_ii_connector_map[] = {
0394     { 10, 16 }, /* (Back) Speaker */
0395     { 11, 17 }, /* SPDIF */
0396     { 13, 7 },  /* Line */
0397     { 14, 8 },  /* Mic */
0398     { 15, 9 },  /* Front Mic */
0399     {}
0400 };
0401 
0402 static const struct usbmix_name_map lenovo_p620_rear_map[] = {
0403     { 19, NULL, 12 }, /* FU, Input Gain Pad */
0404     {}
0405 };
0406 
0407 /* TRX40 mobos with Realtek ALC1220-VB */
0408 static const struct usbmix_name_map trx40_mobo_map[] = {
0409     { 18, NULL }, /* OT, IEC958 - broken response, disabled */
0410     { 19, NULL, 12 }, /* FU, Input Gain Pad - broken response, disabled */
0411     { 16, "Speaker" },      /* OT */
0412     { 22, "Speaker Playback" }, /* FU */
0413     { 7, "Line" },          /* IT */
0414     { 19, "Line Capture" },     /* FU */
0415     { 17, "Front Headphone" },  /* OT */
0416     { 23, "Front Headphone Playback" }, /* FU */
0417     { 8, "Mic" },           /* IT */
0418     { 20, "Mic Capture" },      /* FU */
0419     { 9, "Front Mic" },     /* IT */
0420     { 21, "Front Mic Capture" },    /* FU */
0421     { 24, "IEC958 Playback" },  /* FU */
0422     {}
0423 };
0424 
0425 static const struct usbmix_connector_map trx40_mobo_connector_map[] = {
0426     { 10, 16 }, /* (Back) Speaker */
0427     { 11, 17 }, /* Front Headphone */
0428     { 13, 7 },  /* Line */
0429     { 14, 8 },  /* Mic */
0430     { 15, 9 },  /* Front Mic */
0431     {}
0432 };
0433 
0434 /* Rear panel + front mic on Gigabyte TRX40 Aorus Master with ALC1220-VB */
0435 static const struct usbmix_name_map aorus_master_alc1220vb_map[] = {
0436     { 17, NULL },           /* OT, IEC958?, disabled */
0437     { 19, NULL, 12 }, /* FU, Input Gain Pad - broken response, disabled */
0438     { 16, "Line Out" },     /* OT */
0439     { 22, "Line Out Playback" },    /* FU */
0440     { 7, "Line" },          /* IT */
0441     { 19, "Line Capture" },     /* FU */
0442     { 8, "Mic" },           /* IT */
0443     { 20, "Mic Capture" },      /* FU */
0444     { 9, "Front Mic" },     /* IT */
0445     { 21, "Front Mic Capture" },    /* FU */
0446     {}
0447 };
0448 
0449 /* MSI MPG X570S Carbon Max Wifi with ALC4080  */
0450 static const struct usbmix_name_map msi_mpg_x570s_carbon_max_wifi_alc4080_map[] = {
0451     { 29, "Speaker Playback" },
0452     { 30, "Front Headphone Playback" },
0453     { 32, "IEC958 Playback" },
0454     {}
0455 };
0456 
0457 /* Gigabyte B450/550 Mobo */
0458 static const struct usbmix_name_map gigabyte_b450_map[] = {
0459     { 24, NULL },           /* OT, IEC958?, disabled */
0460     { 21, "Speaker" },      /* OT */
0461     { 29, "Speaker Playback" }, /* FU */
0462     { 22, "Headphone" },        /* OT */
0463     { 30, "Headphone Playback" },   /* FU */
0464     { 11, "Line" },         /* IT */
0465     { 27, "Line Capture" },     /* FU */
0466     { 12, "Mic" },          /* IT */
0467     { 28, "Mic Capture" },      /* FU */
0468     { 9, "Front Mic" },     /* IT */
0469     { 25, "Front Mic Capture" },    /* FU */
0470     {}
0471 };
0472 
0473 static const struct usbmix_connector_map gigabyte_b450_connector_map[] = {
0474     { 13, 21 }, /* Speaker */
0475     { 14, 22 }, /* Headphone */
0476     { 19, 11 }, /* Line */
0477     { 20, 12 }, /* Mic */
0478     { 17, 9 },  /* Front Mic */
0479     {}
0480 };
0481 
0482 /*
0483  * Control map entries
0484  */
0485 
0486 static const struct usbmix_ctl_map usbmix_ctl_maps[] = {
0487     {
0488         .id = USB_ID(0x041e, 0x3000),
0489         .map = extigy_map,
0490     },
0491     {
0492         .id = USB_ID(0x041e, 0x3010),
0493         .map = mp3plus_map,
0494     },
0495     {
0496         .id = USB_ID(0x041e, 0x3020),
0497         .map = audigy2nx_map,
0498         .selector_map = audigy2nx_selectors,
0499     },
0500     {
0501         .id = USB_ID(0x041e, 0x3040),
0502         .map = live24ext_map,
0503     },
0504     {
0505         .id = USB_ID(0x041e, 0x3048),
0506         .map = audigy2nx_map,
0507         .selector_map = audigy2nx_selectors,
0508     },
0509     {   /* Plantronics GameCom 780 */
0510         .id = USB_ID(0x047f, 0xc010),
0511         .map = gamecom780_map,
0512     },
0513     {
0514         /* Hercules Gamesurround Muse Pocket LT
0515          * (USB 5.1 Channel Audio Adapter)
0516          */
0517         .id = USB_ID(0x06f8, 0xc000),
0518         .map = hercules_usb51_map,
0519     },
0520     {
0521         .id = USB_ID(0x0763, 0x2030),
0522         .selector_map = c400_selectors,
0523     },
0524     {
0525         .id = USB_ID(0x0763, 0x2031),
0526         .selector_map = c400_selectors,
0527     },
0528     {
0529         .id = USB_ID(0x08bb, 0x2702),
0530         .map = linex_map,
0531     },
0532     {
0533         .id = USB_ID(0x0a92, 0x0091),
0534         .map = maya44_map,
0535     },
0536     {
0537         .id = USB_ID(0x0c45, 0x1158),
0538         .map = justlink_map,
0539     },
0540     {
0541         .id = USB_ID(0x0ccd, 0x0028),
0542         .map = aureon_51_2_map,
0543     },
0544     {
0545         .id = USB_ID(0x0bda, 0x4014),
0546         .map = dell_alc4020_map,
0547     },
0548     {
0549         .id = USB_ID(0x0dba, 0x1000),
0550         .map = mbox1_map,
0551     },
0552     {
0553         .id = USB_ID(0x13e5, 0x0001),
0554         .map = scratch_live_map,
0555     },
0556     {
0557         .id = USB_ID(0x200c, 0x1018),
0558         .map = ebox44_map,
0559     },
0560     {
0561         /* MAYA44 USB+ */
0562         .id = USB_ID(0x2573, 0x0008),
0563         .map = maya44_map,
0564     },
0565     {
0566         /* KEF X300A */
0567         .id = USB_ID(0x27ac, 0x1000),
0568         .map = scms_usb3318_map,
0569     },
0570     {
0571         /* Arcam rPAC */
0572         .id = USB_ID(0x25c4, 0x0003),
0573         .map = scms_usb3318_map,
0574     },
0575     {
0576         /* Bose Companion 5 */
0577         .id = USB_ID(0x05a7, 0x1020),
0578         .map = bose_companion5_map,
0579     },
0580     {
0581         /* Bose Revolve+ SoundLink */
0582         .id = USB_ID(0x05a7, 0x40fa),
0583         .map = bose_soundlink_map,
0584     },
0585     {
0586         /* Corsair Virtuoso SE Latest (wired mode) */
0587         .id = USB_ID(0x1b1c, 0x0a3f),
0588         .map = corsair_virtuoso_map,
0589     },
0590     {
0591         /* Corsair Virtuoso SE Latest (wireless mode) */
0592         .id = USB_ID(0x1b1c, 0x0a40),
0593         .map = corsair_virtuoso_map,
0594     },
0595     {
0596         /* Corsair Virtuoso SE (wired mode) */
0597         .id = USB_ID(0x1b1c, 0x0a3d),
0598         .map = corsair_virtuoso_map,
0599     },
0600     {
0601         /* Corsair Virtuoso SE (wireless mode) */
0602         .id = USB_ID(0x1b1c, 0x0a3e),
0603         .map = corsair_virtuoso_map,
0604     },
0605     {
0606         /* Corsair Virtuoso (wired mode) */
0607         .id = USB_ID(0x1b1c, 0x0a41),
0608         .map = corsair_virtuoso_map,
0609     },
0610     {
0611         /* Corsair Virtuoso (wireless mode) */
0612         .id = USB_ID(0x1b1c, 0x0a42),
0613         .map = corsair_virtuoso_map,
0614     },
0615     {   /* Gigabyte TRX40 Aorus Master (rear panel + front mic) */
0616         .id = USB_ID(0x0414, 0xa001),
0617         .map = aorus_master_alc1220vb_map,
0618     },
0619     {   /* Gigabyte TRX40 Aorus Pro WiFi */
0620         .id = USB_ID(0x0414, 0xa002),
0621         .map = trx40_mobo_map,
0622         .connector_map = trx40_mobo_connector_map,
0623     },
0624     {   /* Gigabyte B450/550 Mobo */
0625         .id = USB_ID(0x0414, 0xa00d),
0626         .map = gigabyte_b450_map,
0627         .connector_map = gigabyte_b450_connector_map,
0628     },
0629     {   /* ASUS ROG Zenith II (main audio) */
0630         .id = USB_ID(0x0b05, 0x1916),
0631         .map = asus_zenith_ii_map,
0632         .connector_map = asus_zenith_ii_connector_map,
0633     },
0634     {   /* ASUS ROG Strix */
0635         .id = USB_ID(0x0b05, 0x1917),
0636         .map = trx40_mobo_map,
0637         .connector_map = trx40_mobo_connector_map,
0638     },
0639     {   /* MSI TRX40 Creator */
0640         .id = USB_ID(0x0db0, 0x0d64),
0641         .map = trx40_mobo_map,
0642         .connector_map = trx40_mobo_connector_map,
0643     },
0644     {   /* MSI MPG X570S Carbon Max Wifi */
0645         .id = USB_ID(0x0db0, 0x419c),
0646         .map = msi_mpg_x570s_carbon_max_wifi_alc4080_map,
0647     },
0648     {   /* MSI MAG X570S Torpedo Max */
0649         .id = USB_ID(0x0db0, 0xa073),
0650         .map = msi_mpg_x570s_carbon_max_wifi_alc4080_map,
0651     },
0652     {   /* MSI TRX40 */
0653         .id = USB_ID(0x0db0, 0x543d),
0654         .map = trx40_mobo_map,
0655         .connector_map = trx40_mobo_connector_map,
0656     },
0657     {   /* Asrock TRX40 Creator */
0658         .id = USB_ID(0x26ce, 0x0a01),
0659         .map = trx40_mobo_map,
0660         .connector_map = trx40_mobo_connector_map,
0661     },
0662     {   /* Lenovo ThinkStation P620 Rear */
0663         .id = USB_ID(0x17aa, 0x1046),
0664         .map = lenovo_p620_rear_map,
0665     },
0666     {
0667         /* Sennheiser Communications Headset [PC 8] */
0668         .id = USB_ID(0x1395, 0x0025),
0669         .map = sennheiser_pc8_map,
0670     },
0671     { 0 } /* terminator */
0672 };
0673 
0674 /*
0675  * Control map entries for UAC3 BADD profiles
0676  */
0677 
0678 static const struct usbmix_name_map uac3_badd_generic_io_map[] = {
0679     { UAC3_BADD_FU_ID2, "Generic Out Playback" },
0680     { UAC3_BADD_FU_ID5, "Generic In Capture" },
0681     { 0 }                   /* terminator */
0682 };
0683 static const struct usbmix_name_map uac3_badd_headphone_map[] = {
0684     { UAC3_BADD_FU_ID2, "Headphone Playback" },
0685     { 0 }                   /* terminator */
0686 };
0687 static const struct usbmix_name_map uac3_badd_speaker_map[] = {
0688     { UAC3_BADD_FU_ID2, "Speaker Playback" },
0689     { 0 }                   /* terminator */
0690 };
0691 static const struct usbmix_name_map uac3_badd_microphone_map[] = {
0692     { UAC3_BADD_FU_ID5, "Mic Capture" },
0693     { 0 }                   /* terminator */
0694 };
0695 /* Covers also 'headset adapter' profile */
0696 static const struct usbmix_name_map uac3_badd_headset_map[] = {
0697     { UAC3_BADD_FU_ID2, "Headset Playback" },
0698     { UAC3_BADD_FU_ID5, "Headset Capture" },
0699     { UAC3_BADD_FU_ID7, "Sidetone Mixing" },
0700     { 0 }                   /* terminator */
0701 };
0702 static const struct usbmix_name_map uac3_badd_speakerphone_map[] = {
0703     { UAC3_BADD_FU_ID2, "Speaker Playback" },
0704     { UAC3_BADD_FU_ID5, "Mic Capture" },
0705     { 0 }                   /* terminator */
0706 };
0707 
0708 static const struct usbmix_ctl_map uac3_badd_usbmix_ctl_maps[] = {
0709     {
0710         .id = UAC3_FUNCTION_SUBCLASS_GENERIC_IO,
0711         .map = uac3_badd_generic_io_map,
0712     },
0713     {
0714         .id = UAC3_FUNCTION_SUBCLASS_HEADPHONE,
0715         .map = uac3_badd_headphone_map,
0716     },
0717     {
0718         .id = UAC3_FUNCTION_SUBCLASS_SPEAKER,
0719         .map = uac3_badd_speaker_map,
0720     },
0721     {
0722         .id = UAC3_FUNCTION_SUBCLASS_MICROPHONE,
0723         .map = uac3_badd_microphone_map,
0724     },
0725     {
0726         .id = UAC3_FUNCTION_SUBCLASS_HEADSET,
0727         .map = uac3_badd_headset_map,
0728     },
0729     {
0730         .id = UAC3_FUNCTION_SUBCLASS_HEADSET_ADAPTER,
0731         .map = uac3_badd_headset_map,
0732     },
0733     {
0734         .id = UAC3_FUNCTION_SUBCLASS_SPEAKERPHONE,
0735         .map = uac3_badd_speakerphone_map,
0736     },
0737     { 0 } /* terminator */
0738 };