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

Pull sound fixes from Takashi Iwai:
"Again less intensive changes in this rc: you can find only a few
HD-audio fixes (noise fixes for Intel Broxton chip and a few Thinkpad
models, quirks for Alienware 17 and Packard Bell DOTS) in addition to
a long-standing rme96 bug fix"

* tag 'sound-4.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda/ca0132 - quirk for Alienware 17 2015
ALSA: hda - Fix noise problems on Thinkpad T440s
ALSA: hda - Fixing speaker noise on the two latest thinkpad models
ALSA: hda - Add inverted dmic for Packard Bell DOTS
ALSA: hda - Fix playback noise with 24/32 bit sample size on BXT
ALSA: rme96: Fix unexpected volume reset after rate changes

+85 -17
+3
include/sound/hda_register.h
··· 93 93 #define AZX_REG_HSW_EM4 0x100c 94 94 #define AZX_REG_HSW_EM5 0x1010 95 95 96 + /* Skylake/Broxton display HD-A controller Extended Mode registers */ 97 + #define AZX_REG_SKL_EM4L 0x1040 98 + 96 99 /* PCI space */ 97 100 #define AZX_PCIREG_TCSEL 0x44 98 101
+23
sound/pci/hda/hda_intel.c
··· 355 355 ((pci)->device == 0x0d0c) || \ 356 356 ((pci)->device == 0x160c)) 357 357 358 + #define IS_BROXTON(pci) ((pci)->device == 0x5a98) 359 + 358 360 static char *driver_short_names[] = { 359 361 [AZX_DRIVER_ICH] = "HDA Intel", 360 362 [AZX_DRIVER_PCH] = "HDA Intel PCH", ··· 508 506 } 509 507 } 510 508 509 + /* 510 + * In BXT-P A0, HD-Audio DMA requests is later than expected, 511 + * and makes an audio stream sensitive to system latencies when 512 + * 24/32 bits are playing. 513 + * Adjusting threshold of DMA fifo to force the DMA request 514 + * sooner to improve latency tolerance at the expense of power. 515 + */ 516 + static void bxt_reduce_dma_latency(struct azx *chip) 517 + { 518 + u32 val; 519 + 520 + val = azx_readl(chip, SKL_EM4L); 521 + val &= (0x3 << 20); 522 + azx_writel(chip, SKL_EM4L, val); 523 + } 524 + 511 525 static void hda_intel_init_chip(struct azx *chip, bool full_reset) 512 526 { 513 527 struct hdac_bus *bus = azx_bus(chip); 528 + struct pci_dev *pci = chip->pci; 514 529 515 530 if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) 516 531 snd_hdac_set_codec_wakeup(bus, true); 517 532 azx_init_chip(chip, full_reset); 518 533 if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) 519 534 snd_hdac_set_codec_wakeup(bus, false); 535 + 536 + /* reduce dma latency to avoid noise */ 537 + if (IS_BROXTON(pci)) 538 + bxt_reduce_dma_latency(chip); 520 539 } 521 540 522 541 /* calculate runtime delay from LPIB */
+2 -1
sound/pci/hda/patch_ca0132.c
··· 778 778 }; 779 779 780 780 static const struct snd_pci_quirk ca0132_quirks[] = { 781 - SND_PCI_QUIRK(0x1028, 0x0685, "Alienware 15", QUIRK_ALIENWARE), 781 + SND_PCI_QUIRK(0x1028, 0x0685, "Alienware 15 2015", QUIRK_ALIENWARE), 782 + SND_PCI_QUIRK(0x1028, 0x0688, "Alienware 17 2015", QUIRK_ALIENWARE), 782 783 {} 783 784 }; 784 785
+31 -1
sound/pci/hda/patch_realtek.c
··· 4204 4204 } 4205 4205 } 4206 4206 4207 + /* additional fixup for Thinkpad T440s noise problem */ 4208 + static void alc_fixup_tpt440(struct hda_codec *codec, 4209 + const struct hda_fixup *fix, int action) 4210 + { 4211 + struct alc_spec *spec = codec->spec; 4212 + 4213 + if (action == HDA_FIXUP_ACT_PRE_PROBE) { 4214 + spec->shutup = alc_no_shutup; /* reduce click noise */ 4215 + spec->gen.mixer_nid = 0; /* reduce background noise */ 4216 + } 4217 + } 4218 + 4207 4219 static void alc_shutup_dell_xps13(struct hda_codec *codec) 4208 4220 { 4209 4221 struct alc_spec *spec = codec->spec; ··· 4590 4578 ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC, 4591 4579 ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, 4592 4580 ALC292_FIXUP_TPT440_DOCK, 4581 + ALC292_FIXUP_TPT440, 4593 4582 ALC283_FIXUP_BXBT2807_MIC, 4594 4583 ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED, 4595 4584 ALC282_FIXUP_ASPIRE_V5_PINS, ··· 4609 4596 ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, 4610 4597 ALC275_FIXUP_DELL_XPS, 4611 4598 ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE, 4599 + ALC293_FIXUP_LENOVO_SPK_NOISE, 4612 4600 }; 4613 4601 4614 4602 static const struct hda_fixup alc269_fixups[] = { ··· 5064 5050 .chained = true, 5065 5051 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST 5066 5052 }, 5053 + [ALC292_FIXUP_TPT440] = { 5054 + .type = HDA_FIXUP_FUNC, 5055 + .v.func = alc_fixup_tpt440, 5056 + .chained = true, 5057 + .chain_id = ALC292_FIXUP_TPT440_DOCK, 5058 + }, 5067 5059 [ALC283_FIXUP_BXBT2807_MIC] = { 5068 5060 .type = HDA_FIXUP_PINS, 5069 5061 .v.pins = (const struct hda_pintbl[]) { ··· 5206 5186 }, 5207 5187 .chained = true, 5208 5188 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE 5189 + }, 5190 + [ALC293_FIXUP_LENOVO_SPK_NOISE] = { 5191 + .type = HDA_FIXUP_FUNC, 5192 + .v.func = alc_fixup_disable_aamix, 5193 + .chained = true, 5194 + .chain_id = ALC269_FIXUP_THINKPAD_ACPI 5209 5195 }, 5210 5196 }; 5211 5197 ··· 5351 5325 SND_PCI_QUIRK(0x17aa, 0x21fb, "Thinkpad T430s", ALC269_FIXUP_LENOVO_DOCK), 5352 5326 SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK), 5353 5327 SND_PCI_QUIRK(0x17aa, 0x2208, "Thinkpad T431s", ALC269_FIXUP_LENOVO_DOCK), 5354 - SND_PCI_QUIRK(0x17aa, 0x220c, "Thinkpad T440s", ALC292_FIXUP_TPT440_DOCK), 5328 + SND_PCI_QUIRK(0x17aa, 0x220c, "Thinkpad T440s", ALC292_FIXUP_TPT440), 5355 5329 SND_PCI_QUIRK(0x17aa, 0x220e, "Thinkpad T440p", ALC292_FIXUP_TPT440_DOCK), 5356 5330 SND_PCI_QUIRK(0x17aa, 0x2210, "Thinkpad T540p", ALC292_FIXUP_TPT440_DOCK), 5357 5331 SND_PCI_QUIRK(0x17aa, 0x2211, "Thinkpad W541", ALC292_FIXUP_TPT440_DOCK), ··· 5360 5334 SND_PCI_QUIRK(0x17aa, 0x2215, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 5361 5335 SND_PCI_QUIRK(0x17aa, 0x2223, "ThinkPad T550", ALC292_FIXUP_TPT440_DOCK), 5362 5336 SND_PCI_QUIRK(0x17aa, 0x2226, "ThinkPad X250", ALC292_FIXUP_TPT440_DOCK), 5337 + SND_PCI_QUIRK(0x17aa, 0x2233, "Thinkpad", ALC293_FIXUP_LENOVO_SPK_NOISE), 5363 5338 SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC), 5364 5339 SND_PCI_QUIRK(0x17aa, 0x3978, "IdeaPad Y410P", ALC269_FIXUP_NO_SHUTUP), 5365 5340 SND_PCI_QUIRK(0x17aa, 0x5013, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), ··· 5370 5343 SND_PCI_QUIRK(0x17aa, 0x5034, "Thinkpad T450", ALC292_FIXUP_TPT440_DOCK), 5371 5344 SND_PCI_QUIRK(0x17aa, 0x5036, "Thinkpad T450s", ALC292_FIXUP_TPT440_DOCK), 5372 5345 SND_PCI_QUIRK(0x17aa, 0x503c, "Thinkpad L450", ALC292_FIXUP_TPT440_DOCK), 5346 + SND_PCI_QUIRK(0x17aa, 0x504b, "Thinkpad", ALC293_FIXUP_LENOVO_SPK_NOISE), 5373 5347 SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 5374 5348 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K), 5375 5349 SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), ··· 5451 5423 {.id = ALC283_FIXUP_CHROME_BOOK, .name = "alc283-dac-wcaps"}, 5452 5424 {.id = ALC283_FIXUP_SENSE_COMBO_JACK, .name = "alc283-sense-combo"}, 5453 5425 {.id = ALC292_FIXUP_TPT440_DOCK, .name = "tpt440-dock"}, 5426 + {.id = ALC292_FIXUP_TPT440, .name = "tpt440"}, 5454 5427 {} 5455 5428 }; 5456 5429 ··· 6438 6409 static const struct snd_pci_quirk alc662_fixup_tbl[] = { 6439 6410 SND_PCI_QUIRK(0x1019, 0x9087, "ECS", ALC662_FIXUP_ASUS_MODE2), 6440 6411 SND_PCI_QUIRK(0x1025, 0x022f, "Acer Aspire One", ALC662_FIXUP_INV_DMIC), 6412 + SND_PCI_QUIRK(0x1025, 0x0241, "Packard Bell DOTS", ALC662_FIXUP_INV_DMIC), 6441 6413 SND_PCI_QUIRK(0x1025, 0x0308, "Acer Aspire 8942G", ALC662_FIXUP_ASPIRE), 6442 6414 SND_PCI_QUIRK(0x1025, 0x031c, "Gateway NV79", ALC662_FIXUP_SKU_IGNORE), 6443 6415 SND_PCI_QUIRK(0x1025, 0x0349, "eMachines eM250", ALC662_FIXUP_INV_DMIC),
+26 -15
sound/pci/rme96.c
··· 741 741 { 742 742 /* change to/from double-speed: reset the DAC (if available) */ 743 743 snd_rme96_reset_dac(rme96); 744 + return 1; /* need to restore volume */ 744 745 } else { 745 746 writel(rme96->wcreg, rme96->iobase + RME96_IO_CONTROL_REGISTER); 747 + return 0; 746 748 } 747 - return 0; 748 749 } 749 750 750 751 static int ··· 981 980 struct rme96 *rme96 = snd_pcm_substream_chip(substream); 982 981 struct snd_pcm_runtime *runtime = substream->runtime; 983 982 int err, rate, dummy; 983 + bool apply_dac_volume = false; 984 984 985 985 runtime->dma_area = (void __force *)(rme96->iobase + 986 986 RME96_IO_PLAY_BUFFER); ··· 995 993 { 996 994 /* slave clock */ 997 995 if ((int)params_rate(params) != rate) { 998 - spin_unlock_irq(&rme96->lock); 999 - return -EIO; 1000 - } 1001 - } else if ((err = snd_rme96_playback_setrate(rme96, params_rate(params))) < 0) { 1002 - spin_unlock_irq(&rme96->lock); 1003 - return err; 996 + err = -EIO; 997 + goto error; 998 + } 999 + } else { 1000 + err = snd_rme96_playback_setrate(rme96, params_rate(params)); 1001 + if (err < 0) 1002 + goto error; 1003 + apply_dac_volume = err > 0; /* need to restore volume later? */ 1004 1004 } 1005 - if ((err = snd_rme96_playback_setformat(rme96, params_format(params))) < 0) { 1006 - spin_unlock_irq(&rme96->lock); 1007 - return err; 1008 - } 1005 + 1006 + err = snd_rme96_playback_setformat(rme96, params_format(params)); 1007 + if (err < 0) 1008 + goto error; 1009 1009 snd_rme96_setframelog(rme96, params_channels(params), 1); 1010 1010 if (rme96->capture_periodsize != 0) { 1011 1011 if (params_period_size(params) << rme96->playback_frlog != 1012 1012 rme96->capture_periodsize) 1013 1013 { 1014 - spin_unlock_irq(&rme96->lock); 1015 - return -EBUSY; 1014 + err = -EBUSY; 1015 + goto error; 1016 1016 } 1017 1017 } 1018 1018 rme96->playback_periodsize = ··· 1025 1021 rme96->wcreg &= ~(RME96_WCR_PRO | RME96_WCR_DOLBY | RME96_WCR_EMP); 1026 1022 writel(rme96->wcreg |= rme96->wcreg_spdif_stream, rme96->iobase + RME96_IO_CONTROL_REGISTER); 1027 1023 } 1024 + 1025 + err = 0; 1026 + error: 1028 1027 spin_unlock_irq(&rme96->lock); 1029 - 1030 - return 0; 1028 + if (apply_dac_volume) { 1029 + usleep_range(3000, 10000); 1030 + snd_rme96_apply_dac_volume(rme96); 1031 + } 1032 + 1033 + return err; 1031 1034 } 1032 1035 1033 1036 static int