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

Pull sound fixes from Takashi Iwai:
"Things got calmed down for rc6, as it seems, and we have only a few
HD-audio fixes at this time: a fix for Skylake codec probe errors, a
fix for missing interrupt handling, and a few Dell and HP quirks"

* tag 'sound-4.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda - Loop interrupt handling until really cleared
ALSA: hda - Fix headset support and noise on HP EliteBook 755 G2
ALSA: hda - Fixup speaker pass-through control for nid 0x14 on ALC225
ALSA: hda - Fixing background noise on Dell Inspiron 3162
ALSA: hda - Apply clock gate workaround to Skylake, too

+76 -33
+1 -1
include/sound/hdaudio.h
··· 343 343 void snd_hdac_bus_exit_link_reset(struct hdac_bus *bus); 344 344 345 345 void snd_hdac_bus_update_rirb(struct hdac_bus *bus); 346 - void snd_hdac_bus_handle_stream_irq(struct hdac_bus *bus, unsigned int status, 346 + int snd_hdac_bus_handle_stream_irq(struct hdac_bus *bus, unsigned int status, 347 347 void (*ack)(struct hdac_bus *, 348 348 struct hdac_stream *)); 349 349
+6 -1
sound/hda/hdac_controller.c
··· 426 426 * @bus: HD-audio core bus 427 427 * @status: INTSTS register value 428 428 * @ask: callback to be called for woken streams 429 + * 430 + * Returns the bits of handled streams, or zero if no stream is handled. 429 431 */ 430 - void snd_hdac_bus_handle_stream_irq(struct hdac_bus *bus, unsigned int status, 432 + int snd_hdac_bus_handle_stream_irq(struct hdac_bus *bus, unsigned int status, 431 433 void (*ack)(struct hdac_bus *, 432 434 struct hdac_stream *)) 433 435 { 434 436 struct hdac_stream *azx_dev; 435 437 u8 sd_status; 438 + int handled = 0; 436 439 437 440 list_for_each_entry(azx_dev, &bus->stream_list, list) { 438 441 if (status & azx_dev->sd_int_sta_mask) { 439 442 sd_status = snd_hdac_stream_readb(azx_dev, SD_STS); 440 443 snd_hdac_stream_writeb(azx_dev, SD_STS, SD_INT_MASK); 444 + handled |= 1 << azx_dev->index; 441 445 if (!azx_dev->substream || !azx_dev->running || 442 446 !(sd_status & SD_INT_COMPLETE)) 443 447 continue; ··· 449 445 ack(bus, azx_dev); 450 446 } 451 447 } 448 + return handled; 452 449 } 453 450 EXPORT_SYMBOL_GPL(snd_hdac_bus_handle_stream_irq); 454 451
+25 -20
sound/pci/hda/hda_controller.c
··· 930 930 struct azx *chip = dev_id; 931 931 struct hdac_bus *bus = azx_bus(chip); 932 932 u32 status; 933 + bool active, handled = false; 934 + int repeat = 0; /* count for avoiding endless loop */ 933 935 934 936 #ifdef CONFIG_PM 935 937 if (azx_has_pm_runtime(chip)) ··· 941 939 942 940 spin_lock(&bus->reg_lock); 943 941 944 - if (chip->disabled) { 945 - spin_unlock(&bus->reg_lock); 946 - return IRQ_NONE; 947 - } 942 + if (chip->disabled) 943 + goto unlock; 948 944 949 - status = azx_readl(chip, INTSTS); 950 - if (status == 0 || status == 0xffffffff) { 951 - spin_unlock(&bus->reg_lock); 952 - return IRQ_NONE; 953 - } 945 + do { 946 + status = azx_readl(chip, INTSTS); 947 + if (status == 0 || status == 0xffffffff) 948 + break; 954 949 955 - snd_hdac_bus_handle_stream_irq(bus, status, stream_update); 950 + handled = true; 951 + active = false; 952 + if (snd_hdac_bus_handle_stream_irq(bus, status, stream_update)) 953 + active = true; 956 954 957 - /* clear rirb int */ 958 - status = azx_readb(chip, RIRBSTS); 959 - if (status & RIRB_INT_MASK) { 960 - if (status & RIRB_INT_RESPONSE) { 961 - if (chip->driver_caps & AZX_DCAPS_CTX_WORKAROUND) 962 - udelay(80); 963 - snd_hdac_bus_update_rirb(bus); 955 + /* clear rirb int */ 956 + status = azx_readb(chip, RIRBSTS); 957 + if (status & RIRB_INT_MASK) { 958 + active = true; 959 + if (status & RIRB_INT_RESPONSE) { 960 + if (chip->driver_caps & AZX_DCAPS_CTX_WORKAROUND) 961 + udelay(80); 962 + snd_hdac_bus_update_rirb(bus); 963 + } 964 + azx_writeb(chip, RIRBSTS, RIRB_INT_MASK); 964 965 } 965 - azx_writeb(chip, RIRBSTS, RIRB_INT_MASK); 966 - } 966 + } while (active && ++repeat < 10); 967 967 968 + unlock: 968 969 spin_unlock(&bus->reg_lock); 969 970 970 - return IRQ_HANDLED; 971 + return IRQ_RETVAL(handled); 971 972 } 972 973 EXPORT_SYMBOL_GPL(azx_interrupt); 973 974
+7 -9
sound/pci/hda/hda_intel.c
··· 363 363 ((pci)->device == 0x0d0c) || \ 364 364 ((pci)->device == 0x160c)) 365 365 366 - #define IS_BROXTON(pci) ((pci)->device == 0x5a98) 366 + #define IS_SKL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa170) 367 + #define IS_SKL_LP(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x9d70) 368 + #define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98) 369 + #define IS_SKL_PLUS(pci) (IS_SKL(pci) || IS_SKL_LP(pci) || IS_BXT(pci)) 367 370 368 371 static char *driver_short_names[] = { 369 372 [AZX_DRIVER_ICH] = "HDA Intel", ··· 543 540 544 541 if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) 545 542 snd_hdac_set_codec_wakeup(bus, true); 546 - if (IS_BROXTON(pci)) { 543 + if (IS_SKL_PLUS(pci)) { 547 544 pci_read_config_dword(pci, INTEL_HDA_CGCTL, &val); 548 545 val = val & ~INTEL_HDA_CGCTL_MISCBDCGE; 549 546 pci_write_config_dword(pci, INTEL_HDA_CGCTL, val); 550 547 } 551 548 azx_init_chip(chip, full_reset); 552 - if (IS_BROXTON(pci)) { 549 + if (IS_SKL_PLUS(pci)) { 553 550 pci_read_config_dword(pci, INTEL_HDA_CGCTL, &val); 554 551 val = val | INTEL_HDA_CGCTL_MISCBDCGE; 555 552 pci_write_config_dword(pci, INTEL_HDA_CGCTL, val); ··· 558 555 snd_hdac_set_codec_wakeup(bus, false); 559 556 560 557 /* reduce dma latency to avoid noise */ 561 - if (IS_BROXTON(pci)) 558 + if (IS_BXT(pci)) 562 559 bxt_reduce_dma_latency(chip); 563 560 } 564 561 ··· 980 977 /* put codec down to D3 at hibernation for Intel SKL+; 981 978 * otherwise BIOS may still access the codec and screw up the driver 982 979 */ 983 - #define IS_SKL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa170) 984 - #define IS_SKL_LP(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x9d70) 985 - #define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98) 986 - #define IS_SKL_PLUS(pci) (IS_SKL(pci) || IS_SKL_LP(pci) || IS_BXT(pci)) 987 - 988 980 static int azx_freeze_noirq(struct device *dev) 989 981 { 990 982 struct pci_dev *pci = to_pci_dev(dev);
+37 -2
sound/pci/hda/patch_realtek.c
··· 3801 3801 3802 3802 static void alc_headset_mode_default(struct hda_codec *codec) 3803 3803 { 3804 + static struct coef_fw coef0225[] = { 3805 + UPDATE_COEF(0x45, 0x3f<<10, 0x34<<10), 3806 + {} 3807 + }; 3804 3808 static struct coef_fw coef0255[] = { 3805 3809 WRITE_COEF(0x45, 0xc089), 3806 3810 WRITE_COEF(0x45, 0xc489), ··· 3846 3842 }; 3847 3843 3848 3844 switch (codec->core.vendor_id) { 3845 + case 0x10ec0225: 3846 + alc_process_coef_fw(codec, coef0225); 3847 + break; 3849 3848 case 0x10ec0255: 3850 3849 case 0x10ec0256: 3851 3850 alc_process_coef_fw(codec, coef0255); ··· 4756 4749 ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE, 4757 4750 ALC293_FIXUP_LENOVO_SPK_NOISE, 4758 4751 ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY, 4752 + ALC255_FIXUP_DELL_SPK_NOISE, 4753 + ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, 4754 + ALC280_FIXUP_HP_HEADSET_MIC, 4759 4755 }; 4760 4756 4761 4757 static const struct hda_fixup alc269_fixups[] = { ··· 5378 5368 .type = HDA_FIXUP_FUNC, 5379 5369 .v.func = alc233_fixup_lenovo_line2_mic_hotkey, 5380 5370 }, 5371 + [ALC255_FIXUP_DELL_SPK_NOISE] = { 5372 + .type = HDA_FIXUP_FUNC, 5373 + .v.func = alc_fixup_disable_aamix, 5374 + .chained = true, 5375 + .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE 5376 + }, 5377 + [ALC225_FIXUP_DELL1_MIC_NO_PRESENCE] = { 5378 + .type = HDA_FIXUP_VERBS, 5379 + .v.verbs = (const struct hda_verb[]) { 5380 + /* Disable pass-through path for FRONT 14h */ 5381 + { 0x20, AC_VERB_SET_COEF_INDEX, 0x36 }, 5382 + { 0x20, AC_VERB_SET_PROC_COEF, 0x57d7 }, 5383 + {} 5384 + }, 5385 + .chained = true, 5386 + .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE 5387 + }, 5388 + [ALC280_FIXUP_HP_HEADSET_MIC] = { 5389 + .type = HDA_FIXUP_FUNC, 5390 + .v.func = alc_fixup_disable_aamix, 5391 + .chained = true, 5392 + .chain_id = ALC269_FIXUP_HEADSET_MIC, 5393 + }, 5381 5394 }; 5382 5395 5383 5396 static const struct snd_pci_quirk alc269_fixup_tbl[] = { ··· 5443 5410 SND_PCI_QUIRK(0x1028, 0x06df, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK), 5444 5411 SND_PCI_QUIRK(0x1028, 0x06e0, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK), 5445 5412 SND_PCI_QUIRK(0x1028, 0x0704, "Dell XPS 13", ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE), 5413 + SND_PCI_QUIRK(0x1028, 0x0725, "Dell Inspiron 3162", ALC255_FIXUP_DELL_SPK_NOISE), 5446 5414 SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 5447 5415 SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 5448 5416 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), ··· 5504 5470 SND_PCI_QUIRK(0x103c, 0x2335, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 5505 5471 SND_PCI_QUIRK(0x103c, 0x2336, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 5506 5472 SND_PCI_QUIRK(0x103c, 0x2337, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 5473 + SND_PCI_QUIRK(0x103c, 0x221c, "HP EliteBook 755 G2", ALC280_FIXUP_HP_HEADSET_MIC), 5507 5474 SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300), 5508 5475 SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 5509 5476 SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), ··· 5673 5638 {0x21, 0x03211020} 5674 5639 5675 5640 static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = { 5676 - SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, 5641 + SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, 5677 5642 ALC225_STANDARD_PINS, 5678 5643 {0x14, 0x901701a0}), 5679 - SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, 5644 + SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, 5680 5645 ALC225_STANDARD_PINS, 5681 5646 {0x14, 0x901701b0}), 5682 5647 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE,