Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'sound-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"Only a few last-minute small fixes: the change in ALSA core hwdep is
about the undefined behavior of bit shift, which is almost harmless
but still worth to pick up quickly.

The rest are all device-specific fixes for HD-audio and USB-audio, and
safe to apply at the late stage"

* tag 'sound-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda/realtek - Add new codec supported for ALC287
ALSA: usb-audio: Quirks for Gigabyte TRX40 Aorus Master onboard audio
ALSA: usb-audio: mixer: volume quirk for ESS Technology Asus USB DAC
ALSA: hda/realtek - Add a model for Thinkpad T570 without DAC workaround
ALSA: hwdep: fix a left shifting 1 by 31 UB bug

+83 -12
+2 -2
sound/core/hwdep.c
··· 216 216 if (info.index >= 32) 217 217 return -EINVAL; 218 218 /* check whether the dsp was already loaded */ 219 - if (hw->dsp_loaded & (1 << info.index)) 219 + if (hw->dsp_loaded & (1u << info.index)) 220 220 return -EBUSY; 221 221 err = hw->ops.dsp_load(hw, &info); 222 222 if (err < 0) 223 223 return err; 224 - hw->dsp_loaded |= (1 << info.index); 224 + hw->dsp_loaded |= (1u << info.index); 225 225 return 0; 226 226 } 227 227
+29 -10
sound/pci/hda/patch_realtek.c
··· 384 384 case 0x10ec0282: 385 385 case 0x10ec0283: 386 386 case 0x10ec0286: 387 + case 0x10ec0287: 387 388 case 0x10ec0288: 388 389 case 0x10ec0285: 389 390 case 0x10ec0298: ··· 5485 5484 { 0x19, 0x21a11010 }, /* dock mic */ 5486 5485 { } 5487 5486 }; 5488 - /* Assure the speaker pin to be coupled with DAC NID 0x03; otherwise 5489 - * the speaker output becomes too low by some reason on Thinkpads with 5490 - * ALC298 codec 5491 - */ 5492 - static const hda_nid_t preferred_pairs[] = { 5493 - 0x14, 0x03, 0x17, 0x02, 0x21, 0x02, 5494 - 0 5495 - }; 5496 5487 struct alc_spec *spec = codec->spec; 5497 5488 5498 5489 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 5499 - spec->gen.preferred_dacs = preferred_pairs; 5500 5490 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; 5501 5491 snd_hda_apply_pincfgs(codec, pincfgs); 5502 5492 } else if (action == HDA_FIXUP_ACT_INIT) { ··· 5498 5506 snd_hda_codec_write(codec, 0x19, 0, 5499 5507 AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, 0); 5500 5508 } 5509 + } 5510 + 5511 + static void alc_fixup_tpt470_dacs(struct hda_codec *codec, 5512 + const struct hda_fixup *fix, int action) 5513 + { 5514 + /* Assure the speaker pin to be coupled with DAC NID 0x03; otherwise 5515 + * the speaker output becomes too low by some reason on Thinkpads with 5516 + * ALC298 codec 5517 + */ 5518 + static const hda_nid_t preferred_pairs[] = { 5519 + 0x14, 0x03, 0x17, 0x02, 0x21, 0x02, 5520 + 0 5521 + }; 5522 + struct alc_spec *spec = codec->spec; 5523 + 5524 + if (action == HDA_FIXUP_ACT_PRE_PROBE) 5525 + spec->gen.preferred_dacs = preferred_pairs; 5501 5526 } 5502 5527 5503 5528 static void alc_shutup_dell_xps13(struct hda_codec *codec) ··· 6072 6063 ALC700_FIXUP_INTEL_REFERENCE, 6073 6064 ALC274_FIXUP_DELL_BIND_DACS, 6074 6065 ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, 6066 + ALC298_FIXUP_TPT470_DOCK_FIX, 6075 6067 ALC298_FIXUP_TPT470_DOCK, 6076 6068 ALC255_FIXUP_DUMMY_LINEOUT_VERB, 6077 6069 ALC255_FIXUP_DELL_HEADSET_MIC, ··· 7004 6994 .chained = true, 7005 6995 .chain_id = ALC274_FIXUP_DELL_BIND_DACS 7006 6996 }, 7007 - [ALC298_FIXUP_TPT470_DOCK] = { 6997 + [ALC298_FIXUP_TPT470_DOCK_FIX] = { 7008 6998 .type = HDA_FIXUP_FUNC, 7009 6999 .v.func = alc_fixup_tpt470_dock, 7010 7000 .chained = true, 7011 7001 .chain_id = ALC293_FIXUP_LENOVO_SPK_NOISE 7002 + }, 7003 + [ALC298_FIXUP_TPT470_DOCK] = { 7004 + .type = HDA_FIXUP_FUNC, 7005 + .v.func = alc_fixup_tpt470_dacs, 7006 + .chained = true, 7007 + .chain_id = ALC298_FIXUP_TPT470_DOCK_FIX 7012 7008 }, 7013 7009 [ALC255_FIXUP_DUMMY_LINEOUT_VERB] = { 7014 7010 .type = HDA_FIXUP_PINS, ··· 7654 7638 {.id = ALC292_FIXUP_TPT440_DOCK, .name = "tpt440-dock"}, 7655 7639 {.id = ALC292_FIXUP_TPT440, .name = "tpt440"}, 7656 7640 {.id = ALC292_FIXUP_TPT460, .name = "tpt460"}, 7641 + {.id = ALC298_FIXUP_TPT470_DOCK_FIX, .name = "tpt470-dock-fix"}, 7657 7642 {.id = ALC298_FIXUP_TPT470_DOCK, .name = "tpt470-dock"}, 7658 7643 {.id = ALC233_FIXUP_LENOVO_MULTI_CODECS, .name = "dual-codecs"}, 7659 7644 {.id = ALC700_FIXUP_INTEL_REFERENCE, .name = "alc700-ref"}, ··· 8293 8276 case 0x10ec0215: 8294 8277 case 0x10ec0245: 8295 8278 case 0x10ec0285: 8279 + case 0x10ec0287: 8296 8280 case 0x10ec0289: 8297 8281 spec->codec_variant = ALC269_TYPE_ALC215; 8298 8282 spec->shutup = alc225_shutup; ··· 9572 9554 HDA_CODEC_ENTRY(0x10ec0284, "ALC284", patch_alc269), 9573 9555 HDA_CODEC_ENTRY(0x10ec0285, "ALC285", patch_alc269), 9574 9556 HDA_CODEC_ENTRY(0x10ec0286, "ALC286", patch_alc269), 9557 + HDA_CODEC_ENTRY(0x10ec0287, "ALC287", patch_alc269), 9575 9558 HDA_CODEC_ENTRY(0x10ec0288, "ALC288", patch_alc269), 9576 9559 HDA_CODEC_ENTRY(0x10ec0289, "ALC289", patch_alc269), 9577 9560 HDA_CODEC_ENTRY(0x10ec0290, "ALC290", patch_alc269),
+8
sound/usb/mixer.c
··· 1182 1182 cval->res = 384; 1183 1183 } 1184 1184 break; 1185 + case USB_ID(0x0495, 0x3042): /* ESS Technology Asus USB DAC */ 1186 + if ((strstr(kctl->id.name, "Playback Volume") != NULL) || 1187 + strstr(kctl->id.name, "Capture Volume") != NULL) { 1188 + cval->min >>= 8; 1189 + cval->max = 0; 1190 + cval->res = 1; 1191 + } 1192 + break; 1185 1193 } 1186 1194 } 1187 1195
+19
sound/usb/mixer_maps.c
··· 397 397 {} 398 398 }; 399 399 400 + /* Rear panel + front mic on Gigabyte TRX40 Aorus Master with ALC1220-VB */ 401 + static const struct usbmix_name_map aorus_master_alc1220vb_map[] = { 402 + { 17, NULL }, /* OT, IEC958?, disabled */ 403 + { 19, NULL, 12 }, /* FU, Input Gain Pad - broken response, disabled */ 404 + { 16, "Line Out" }, /* OT */ 405 + { 22, "Line Out Playback" }, /* FU */ 406 + { 7, "Line" }, /* IT */ 407 + { 19, "Line Capture" }, /* FU */ 408 + { 8, "Mic" }, /* IT */ 409 + { 20, "Mic Capture" }, /* FU */ 410 + { 9, "Front Mic" }, /* IT */ 411 + { 21, "Front Mic Capture" }, /* FU */ 412 + {} 413 + }; 414 + 400 415 /* 401 416 * Control map entries 402 417 */ ··· 540 525 /* Corsair Virtuoso (wireless mode) */ 541 526 .id = USB_ID(0x1b1c, 0x0a42), 542 527 .map = corsair_virtuoso_map, 528 + }, 529 + { /* Gigabyte TRX40 Aorus Master (rear panel + front mic) */ 530 + .id = USB_ID(0x0414, 0xa001), 531 + .map = aorus_master_alc1220vb_map, 543 532 }, 544 533 { /* Gigabyte TRX40 Aorus Pro WiFi */ 545 534 .id = USB_ID(0x0414, 0xa002),
+25
sound/usb/quirks-table.h
··· 3566 3566 ALC1220_VB_DESKTOP(0x26ce, 0x0a01), /* Asrock TRX40 Creator */ 3567 3567 #undef ALC1220_VB_DESKTOP 3568 3568 3569 + /* Two entries for Gigabyte TRX40 Aorus Master: 3570 + * TRX40 Aorus Master has two USB-audio devices, one for the front headphone 3571 + * with ESS SABRE9218 DAC chip, while another for the rest I/O (the rear 3572 + * panel and the front mic) with Realtek ALC1220-VB. 3573 + * Here we provide two distinct names for making UCM profiles easier. 3574 + */ 3575 + { 3576 + USB_DEVICE(0x0414, 0xa000), 3577 + .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 3578 + .vendor_name = "Gigabyte", 3579 + .product_name = "Aorus Master Front Headphone", 3580 + .profile_name = "Gigabyte-Aorus-Master-Front-Headphone", 3581 + .ifnum = QUIRK_NO_INTERFACE 3582 + } 3583 + }, 3584 + { 3585 + USB_DEVICE(0x0414, 0xa001), 3586 + .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 3587 + .vendor_name = "Gigabyte", 3588 + .product_name = "Aorus Master Main Audio", 3589 + .profile_name = "Gigabyte-Aorus-Master-Main-Audio", 3590 + .ifnum = QUIRK_NO_INTERFACE 3591 + } 3592 + }, 3593 + 3569 3594 #undef USB_DEVICE_VENDOR_SPEC