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-4.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"A collection of usual suspects:

- a handful USB-audio and HD-audio device-specific quirks

- some trivial fixes for the new AC97 bus stuff

- another race fix in ALSA sequencer core"

* tag 'sound-4.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda/realtek: PCI quirk for Fujitsu U7x7
ALSA: seq: Fix racy pool initializations
ALSA: usb: add more device quirks for USB DSD devices
ALSA: usb-audio: Fix UAC2 get_ctl request with a RANGE attribute
ALSA: ac97: Fix copy and paste typo in documentation
ALSA: usb-audio: add implicit fb quirk for Behringer UFX1204
ALSA: ac97: kconfig: Remove select of undefined symbol AC97
ALSA: hda/realtek - Enable Thinkpad Dock device for ALC298 platform
ALSA: hda/realtek - Add headset mode support for Dell laptop
ALSA: hda - Fix headset mic detection problem for two Dell machines

+104 -13
+1 -1
include/sound/ac97/regs.h
··· 31 31 #define AC97_HEADPHONE 0x04 /* Headphone Volume (optional) */ 32 32 #define AC97_MASTER_MONO 0x06 /* Master Volume Mono (optional) */ 33 33 #define AC97_MASTER_TONE 0x08 /* Master Tone (Bass & Treble) (optional) */ 34 - #define AC97_PC_BEEP 0x0a /* PC Beep Volume (optinal) */ 34 + #define AC97_PC_BEEP 0x0a /* PC Beep Volume (optional) */ 35 35 #define AC97_PHONE 0x0c /* Phone Volume (optional) */ 36 36 #define AC97_MIC 0x0e /* MIC Volume */ 37 37 #define AC97_LINE 0x10 /* Line In Volume */
-1
sound/ac97/Kconfig
··· 5 5 6 6 config AC97_BUS_NEW 7 7 tristate 8 - select AC97 9 8 help 10 9 This is the new AC97 bus type, successor of AC97_BUS. The ported 11 10 drivers which benefit from the AC97 automatic probing should "select"
+6 -2
sound/core/seq/seq_clientmgr.c
··· 1003 1003 { 1004 1004 struct snd_seq_client *client = file->private_data; 1005 1005 int written = 0, len; 1006 - int err = -EINVAL; 1006 + int err; 1007 1007 struct snd_seq_event event; 1008 1008 1009 1009 if (!(snd_seq_file_flags(file) & SNDRV_SEQ_LFLG_OUTPUT)) ··· 1018 1018 1019 1019 /* allocate the pool now if the pool is not allocated yet */ 1020 1020 if (client->pool->size > 0 && !snd_seq_write_pool_allocated(client)) { 1021 - if (snd_seq_pool_init(client->pool) < 0) 1021 + mutex_lock(&client->ioctl_mutex); 1022 + err = snd_seq_pool_init(client->pool); 1023 + mutex_unlock(&client->ioctl_mutex); 1024 + if (err < 0) 1022 1025 return -ENOMEM; 1023 1026 } 1024 1027 1025 1028 /* only process whole events */ 1029 + err = -EINVAL; 1026 1030 while (count >= sizeof(struct snd_seq_event)) { 1027 1031 /* Read in the event header from the user */ 1028 1032 len = sizeof(event);
+72
sound/pci/hda/patch_realtek.c
··· 3465 3465 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; 3466 3466 } 3467 3467 3468 + static void alc269_fixup_pincfg_U7x7_headset_mic(struct hda_codec *codec, 3469 + const struct hda_fixup *fix, 3470 + int action) 3471 + { 3472 + unsigned int cfg_headphone = snd_hda_codec_get_pincfg(codec, 0x21); 3473 + unsigned int cfg_headset_mic = snd_hda_codec_get_pincfg(codec, 0x19); 3474 + 3475 + if (cfg_headphone && cfg_headset_mic == 0x411111f0) 3476 + snd_hda_codec_set_pincfg(codec, 0x19, 3477 + (cfg_headphone & ~AC_DEFCFG_DEVICE) | 3478 + (AC_JACK_MIC_IN << AC_DEFCFG_DEVICE_SHIFT)); 3479 + } 3480 + 3468 3481 static void alc269_fixup_hweq(struct hda_codec *codec, 3469 3482 const struct hda_fixup *fix, int action) 3470 3483 { ··· 4985 4972 } 4986 4973 } 4987 4974 4975 + static void alc_fixup_tpt470_dock(struct hda_codec *codec, 4976 + const struct hda_fixup *fix, int action) 4977 + { 4978 + static const struct hda_pintbl pincfgs[] = { 4979 + { 0x17, 0x21211010 }, /* dock headphone */ 4980 + { 0x19, 0x21a11010 }, /* dock mic */ 4981 + { } 4982 + }; 4983 + struct alc_spec *spec = codec->spec; 4984 + 4985 + if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4986 + spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; 4987 + /* Enable DOCK device */ 4988 + snd_hda_codec_write(codec, 0x17, 0, 4989 + AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, 0); 4990 + /* Enable DOCK device */ 4991 + snd_hda_codec_write(codec, 0x19, 0, 4992 + AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, 0); 4993 + snd_hda_apply_pincfgs(codec, pincfgs); 4994 + } 4995 + } 4996 + 4988 4997 static void alc_shutup_dell_xps13(struct hda_codec *codec) 4989 4998 { 4990 4999 struct alc_spec *spec = codec->spec; ··· 5386 5351 ALC269_FIXUP_LIFEBOOK_EXTMIC, 5387 5352 ALC269_FIXUP_LIFEBOOK_HP_PIN, 5388 5353 ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT, 5354 + ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC, 5389 5355 ALC269_FIXUP_AMIC, 5390 5356 ALC269_FIXUP_DMIC, 5391 5357 ALC269VB_FIXUP_AMIC, ··· 5482 5446 ALC700_FIXUP_INTEL_REFERENCE, 5483 5447 ALC274_FIXUP_DELL_BIND_DACS, 5484 5448 ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, 5449 + ALC298_FIXUP_TPT470_DOCK, 5485 5450 }; 5486 5451 5487 5452 static const struct hda_fixup alc269_fixups[] = { ··· 5592 5555 [ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT] = { 5593 5556 .type = HDA_FIXUP_FUNC, 5594 5557 .v.func = alc269_fixup_pincfg_no_hp_to_lineout, 5558 + }, 5559 + [ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC] = { 5560 + .type = HDA_FIXUP_FUNC, 5561 + .v.func = alc269_fixup_pincfg_U7x7_headset_mic, 5595 5562 }, 5596 5563 [ALC269_FIXUP_AMIC] = { 5597 5564 .type = HDA_FIXUP_PINS, ··· 6312 6271 .chained = true, 6313 6272 .chain_id = ALC274_FIXUP_DELL_BIND_DACS 6314 6273 }, 6274 + [ALC298_FIXUP_TPT470_DOCK] = { 6275 + .type = HDA_FIXUP_FUNC, 6276 + .v.func = alc_fixup_tpt470_dock, 6277 + .chained = true, 6278 + .chain_id = ALC293_FIXUP_LENOVO_SPK_NOISE 6279 + }, 6315 6280 }; 6316 6281 6317 6282 static const struct snd_pci_quirk alc269_fixup_tbl[] = { ··· 6368 6321 SND_PCI_QUIRK(0x1028, 0x075d, "Dell AIO", ALC298_FIXUP_SPK_VOLUME), 6369 6322 SND_PCI_QUIRK(0x1028, 0x0798, "Dell Inspiron 17 7000 Gaming", ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER), 6370 6323 SND_PCI_QUIRK(0x1028, 0x082a, "Dell XPS 13 9360", ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE), 6324 + SND_PCI_QUIRK(0x1028, 0x084b, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB), 6325 + SND_PCI_QUIRK(0x1028, 0x084e, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB), 6371 6326 SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 6372 6327 SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 6373 6328 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), ··· 6471 6422 SND_PCI_QUIRK(0x10cf, 0x159f, "Lifebook E780", ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT), 6472 6423 SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN), 6473 6424 SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN), 6425 + SND_PCI_QUIRK(0x10cf, 0x1629, "Lifebook U7x7", ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC), 6474 6426 SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC), 6475 6427 SND_PCI_QUIRK(0x10ec, 0x10f2, "Intel Reference board", ALC700_FIXUP_INTEL_REFERENCE), 6476 6428 SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC), ··· 6500 6450 SND_PCI_QUIRK(0x17aa, 0x2218, "Thinkpad X1 Carbon 2nd", ALC292_FIXUP_TPT440_DOCK), 6501 6451 SND_PCI_QUIRK(0x17aa, 0x2223, "ThinkPad T550", ALC292_FIXUP_TPT440_DOCK), 6502 6452 SND_PCI_QUIRK(0x17aa, 0x2226, "ThinkPad X250", ALC292_FIXUP_TPT440_DOCK), 6453 + SND_PCI_QUIRK(0x17aa, 0x222d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 6454 + SND_PCI_QUIRK(0x17aa, 0x222e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 6503 6455 SND_PCI_QUIRK(0x17aa, 0x2231, "Thinkpad T560", ALC292_FIXUP_TPT460), 6504 6456 SND_PCI_QUIRK(0x17aa, 0x2233, "Thinkpad", ALC292_FIXUP_TPT460), 6457 + SND_PCI_QUIRK(0x17aa, 0x2245, "Thinkpad T470", ALC298_FIXUP_TPT470_DOCK), 6458 + SND_PCI_QUIRK(0x17aa, 0x2246, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 6459 + SND_PCI_QUIRK(0x17aa, 0x2247, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 6460 + SND_PCI_QUIRK(0x17aa, 0x224b, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 6461 + SND_PCI_QUIRK(0x17aa, 0x224c, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 6462 + SND_PCI_QUIRK(0x17aa, 0x224d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 6505 6463 SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), 6506 6464 SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), 6507 6465 SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), ··· 6530 6472 SND_PCI_QUIRK(0x17aa, 0x5050, "Thinkpad T560p", ALC292_FIXUP_TPT460), 6531 6473 SND_PCI_QUIRK(0x17aa, 0x5051, "Thinkpad L460", ALC292_FIXUP_TPT460), 6532 6474 SND_PCI_QUIRK(0x17aa, 0x5053, "Thinkpad T460", ALC292_FIXUP_TPT460), 6475 + SND_PCI_QUIRK(0x17aa, 0x505d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 6476 + SND_PCI_QUIRK(0x17aa, 0x505f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 6477 + SND_PCI_QUIRK(0x17aa, 0x5062, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 6533 6478 SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 6479 + SND_PCI_QUIRK(0x17aa, 0x511e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 6480 + SND_PCI_QUIRK(0x17aa, 0x511f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 6534 6481 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K), 6535 6482 SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), 6536 6483 SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */ ··· 6798 6735 {0x14, 0x90170110}, 6799 6736 {0x21, 0x02211020}), 6800 6737 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 6738 + {0x12, 0x90a60130}, 6739 + {0x14, 0x90170110}, 6740 + {0x14, 0x01011020}, 6741 + {0x21, 0x0221101f}), 6742 + SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 6801 6743 ALC256_STANDARD_PINS), 6802 6744 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC, 6803 6745 {0x14, 0x90170110}, ··· 6871 6803 {0x12, 0x90a60120}, 6872 6804 {0x14, 0x90170110}, 6873 6805 {0x21, 0x0321101f}), 6806 + SND_HDA_PIN_QUIRK(0x10ec0289, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, 6807 + {0x12, 0xb7a60130}, 6808 + {0x14, 0x90170110}, 6809 + {0x21, 0x04211020}), 6874 6810 SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1, 6875 6811 ALC290_STANDARD_PINS, 6876 6812 {0x15, 0x04211040},
+11 -7
sound/usb/mixer.c
··· 347 347 int validx, int *value_ret) 348 348 { 349 349 struct snd_usb_audio *chip = cval->head.mixer->chip; 350 - unsigned char buf[4 + 3 * sizeof(__u32)]; /* enough space for one range */ 350 + /* enough space for one range */ 351 + unsigned char buf[sizeof(__u16) + 3 * sizeof(__u32)]; 351 352 unsigned char *val; 352 - int idx = 0, ret, size; 353 + int idx = 0, ret, val_size, size; 353 354 __u8 bRequest; 355 + 356 + val_size = uac2_ctl_value_size(cval->val_type); 354 357 355 358 if (request == UAC_GET_CUR) { 356 359 bRequest = UAC2_CS_CUR; 357 - size = uac2_ctl_value_size(cval->val_type); 360 + size = val_size; 358 361 } else { 359 362 bRequest = UAC2_CS_RANGE; 360 - size = sizeof(buf); 363 + size = sizeof(__u16) + 3 * val_size; 361 364 } 362 365 363 366 memset(buf, 0, sizeof(buf)); ··· 393 390 val = buf + sizeof(__u16); 394 391 break; 395 392 case UAC_GET_MAX: 396 - val = buf + sizeof(__u16) * 2; 393 + val = buf + sizeof(__u16) + val_size; 397 394 break; 398 395 case UAC_GET_RES: 399 - val = buf + sizeof(__u16) * 3; 396 + val = buf + sizeof(__u16) + val_size * 2; 400 397 break; 401 398 default: 402 399 return -EINVAL; 403 400 } 404 401 405 - *value_ret = convert_signed_value(cval, snd_usb_combine_bytes(val, sizeof(__u16))); 402 + *value_ret = convert_signed_value(cval, 403 + snd_usb_combine_bytes(val, val_size)); 406 404 407 405 return 0; 408 406 }
+9
sound/usb/pcm.c
··· 357 357 358 358 alts = &iface->altsetting[1]; 359 359 goto add_sync_ep; 360 + case USB_ID(0x1397, 0x0002): 361 + ep = 0x81; 362 + iface = usb_ifnum_to_if(dev, 1); 363 + 364 + if (!iface || iface->num_altsetting == 0) 365 + return -EINVAL; 366 + 367 + alts = &iface->altsetting[1]; 368 + goto add_sync_ep; 360 369 361 370 } 362 371 if (attr == USB_ENDPOINT_SYNC_ASYNC &&
+5 -2
sound/usb/quirks.c
··· 1363 1363 return SNDRV_PCM_FMTBIT_DSD_U32_BE; 1364 1364 break; 1365 1365 1366 - /* Amanero Combo384 USB interface with native DSD support */ 1367 - case USB_ID(0x16d0, 0x071a): 1366 + /* Amanero Combo384 USB based DACs with native DSD support */ 1367 + case USB_ID(0x16d0, 0x071a): /* Amanero - Combo384 */ 1368 + case USB_ID(0x2ab6, 0x0004): /* T+A DAC8DSD-V2.0, MP1000E-V2.0, MP2000R-V2.0, MP2500R-V2.0, MP3100HV-V2.0 */ 1369 + case USB_ID(0x2ab6, 0x0005): /* T+A USB HD Audio 1 */ 1370 + case USB_ID(0x2ab6, 0x0006): /* T+A USB HD Audio 2 */ 1368 1371 if (fp->altsetting == 2) { 1369 1372 switch (le16_to_cpu(chip->dev->descriptor.bcdDevice)) { 1370 1373 case 0x199: