ALSA: usb-audio: Add static mapping table for ALC1220-VB-based mobos
TRX40 mobos from MSI and others with ALC1220-VB USB-audio device need yet more quirks for the proper control names. This patch provides the mapping table for those boards, correcting the FU names for volume and mute controls as well as the terminal names for jack controls. It also improves build_connector_control() not to add the directional suffix blindly if the string is given from the mapping table. With this patch applied, the new UCM profiles will be effective. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206873 Link: https://lore.kernel.org/r/20200420062036.28567-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
@@ -1776,8 +1776,10 @@ static void build_connector_control(struct usb_mixer_interface *mixer,
|
||||
{
|
||||
struct snd_kcontrol *kctl;
|
||||
struct usb_mixer_elem_info *cval;
|
||||
const struct usbmix_name_map *map;
|
||||
|
||||
if (check_ignored_ctl(find_map(imap, term->id, 0)))
|
||||
map = find_map(imap, term->id, 0);
|
||||
if (check_ignored_ctl(map))
|
||||
return;
|
||||
|
||||
cval = kzalloc(sizeof(*cval), GFP_KERNEL);
|
||||
@@ -1809,8 +1811,12 @@ static void build_connector_control(struct usb_mixer_interface *mixer,
|
||||
usb_mixer_elem_info_free(cval);
|
||||
return;
|
||||
}
|
||||
get_connector_control_name(mixer, term, is_input, kctl->id.name,
|
||||
sizeof(kctl->id.name));
|
||||
|
||||
if (check_mapped_name(map, kctl->id.name, sizeof(kctl->id.name)))
|
||||
strlcat(kctl->id.name, " Jack", sizeof(kctl->id.name));
|
||||
else
|
||||
get_connector_control_name(mixer, term, is_input, kctl->id.name,
|
||||
sizeof(kctl->id.name));
|
||||
kctl->private_free = snd_usb_mixer_elem_free;
|
||||
snd_usb_mixer_add_control(&cval->head, kctl);
|
||||
}
|
||||
|
Reference in New Issue
Block a user