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

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

Pull sound fixes from Takashi Iwai:
"A few last-minute fixes for rc1:

- ALSA core timer and sequencer fixes for bugs spotted by syzkaller

- a couple of trivial HD-audio fixups

- additional PCI / codec IDs for Intel Geminilake

- fixes for CT-XFi DMA mask bugs"

* tag 'sound-fix-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: seq: Fix link corruption by event error handling
ALSA: hda - Add subwoofer support for Dell Inspiron 17 7000 Gaming
ALSA: ctxfi: Fallback DMA mask to 32bit
ALSA: timer: Reject user params with too small ticks
ALSA: hda: Add Geminilake HDMI codec ID
ALSA: hda - Fix micmute hotkey problem for a lenovo AIO machine
ALSA: hda - Add Geminilake PCI ID

+36 -29
+3
sound/core/seq/seq_fifo.c
··· 135 135 f->tail = cell; 136 136 if (f->head == NULL) 137 137 f->head = cell; 138 + cell->next = NULL; 138 139 f->cells++; 139 140 spin_unlock_irqrestore(&f->lock, flags); 140 141 ··· 215 214 spin_lock_irqsave(&f->lock, flags); 216 215 cell->next = f->head; 217 216 f->head = cell; 217 + if (!f->tail) 218 + f->tail = cell; 218 219 f->cells++; 219 220 spin_unlock_irqrestore(&f->lock, flags); 220 221 }
+15 -3
sound/core/timer.c
··· 1702 1702 return -EBADFD; 1703 1703 if (copy_from_user(&params, _params, sizeof(params))) 1704 1704 return -EFAULT; 1705 - if (!(t->hw.flags & SNDRV_TIMER_HW_SLAVE) && params.ticks < 1) { 1706 - err = -EINVAL; 1707 - goto _end; 1705 + if (!(t->hw.flags & SNDRV_TIMER_HW_SLAVE)) { 1706 + u64 resolution; 1707 + 1708 + if (params.ticks < 1) { 1709 + err = -EINVAL; 1710 + goto _end; 1711 + } 1712 + 1713 + /* Don't allow resolution less than 1ms */ 1714 + resolution = snd_timer_resolution(tu->timeri); 1715 + resolution *= params.ticks; 1716 + if (resolution < 1000000) { 1717 + err = -EINVAL; 1718 + goto _end; 1719 + } 1708 1720 } 1709 1721 if (params.queue_size > 0 && 1710 1722 (params.queue_size < 32 || params.queue_size > 1024)) {
+6 -13
sound/pci/ctxfi/cthw20k1.c
··· 27 27 #include "cthw20k1.h" 28 28 #include "ct20k1reg.h" 29 29 30 - #if BITS_PER_LONG == 32 31 - #define CT_XFI_DMA_MASK DMA_BIT_MASK(32) /* 32 bit PTE */ 32 - #else 33 - #define CT_XFI_DMA_MASK DMA_BIT_MASK(64) /* 64 bit PTE */ 34 - #endif 35 - 36 30 struct hw20k1 { 37 31 struct hw hw; 38 32 spinlock_t reg_20k1_lock; ··· 1898 1904 { 1899 1905 int err; 1900 1906 struct pci_dev *pci = hw->pci; 1907 + const unsigned int dma_bits = BITS_PER_LONG; 1901 1908 1902 1909 err = pci_enable_device(pci); 1903 1910 if (err < 0) 1904 1911 return err; 1905 1912 1906 1913 /* Set DMA transfer mask */ 1907 - if (dma_set_mask(&pci->dev, CT_XFI_DMA_MASK) < 0 || 1908 - dma_set_coherent_mask(&pci->dev, CT_XFI_DMA_MASK) < 0) { 1909 - dev_err(hw->card->dev, 1910 - "architecture does not support PCI busmaster DMA with mask 0x%llx\n", 1911 - CT_XFI_DMA_MASK); 1912 - err = -ENXIO; 1913 - goto error1; 1914 + if (dma_set_mask(&pci->dev, DMA_BIT_MASK(dma_bits))) { 1915 + dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(dma_bits)); 1916 + } else { 1917 + dma_set_mask(&pci->dev, DMA_BIT_MASK(32)); 1918 + dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(32)); 1914 1919 } 1915 1920 1916 1921 if (!hw->io_base) {
+6 -13
sound/pci/ctxfi/cthw20k2.c
··· 26 26 #include "cthw20k2.h" 27 27 #include "ct20k2reg.h" 28 28 29 - #if BITS_PER_LONG == 32 30 - #define CT_XFI_DMA_MASK DMA_BIT_MASK(32) /* 32 bit PTE */ 31 - #else 32 - #define CT_XFI_DMA_MASK DMA_BIT_MASK(64) /* 64 bit PTE */ 33 - #endif 34 - 35 29 struct hw20k2 { 36 30 struct hw hw; 37 31 /* for i2c */ ··· 2023 2029 int err = 0; 2024 2030 struct pci_dev *pci = hw->pci; 2025 2031 unsigned int gctl; 2032 + const unsigned int dma_bits = BITS_PER_LONG; 2026 2033 2027 2034 err = pci_enable_device(pci); 2028 2035 if (err < 0) 2029 2036 return err; 2030 2037 2031 2038 /* Set DMA transfer mask */ 2032 - if (dma_set_mask(&pci->dev, CT_XFI_DMA_MASK) < 0 || 2033 - dma_set_coherent_mask(&pci->dev, CT_XFI_DMA_MASK) < 0) { 2034 - dev_err(hw->card->dev, 2035 - "architecture does not support PCI busmaster DMA with mask 0x%llx\n", 2036 - CT_XFI_DMA_MASK); 2037 - err = -ENXIO; 2038 - goto error1; 2039 + if (!dma_set_mask(&pci->dev, DMA_BIT_MASK(dma_bits))) { 2040 + dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(dma_bits)); 2041 + } else { 2042 + dma_set_mask(&pci->dev, DMA_BIT_MASK(32)); 2043 + dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(32)); 2039 2044 } 2040 2045 2041 2046 if (!hw->io_base) {
+3
sound/pci/hda/hda_intel.c
··· 2255 2255 /* Broxton-T */ 2256 2256 { PCI_DEVICE(0x8086, 0x1a98), 2257 2257 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_BROXTON }, 2258 + /* Gemini-Lake */ 2259 + { PCI_DEVICE(0x8086, 0x3198), 2260 + .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_BROXTON }, 2258 2261 /* Haswell */ 2259 2262 { PCI_DEVICE(0x8086, 0x0a0c), 2260 2263 .driver_data = AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL },
+1
sound/pci/hda/patch_hdmi.c
··· 3800 3800 HDA_CODEC_ENTRY(0x80862809, "Skylake HDMI", patch_i915_hsw_hdmi), 3801 3801 HDA_CODEC_ENTRY(0x8086280a, "Broxton HDMI", patch_i915_hsw_hdmi), 3802 3802 HDA_CODEC_ENTRY(0x8086280b, "Kabylake HDMI", patch_i915_hsw_hdmi), 3803 + HDA_CODEC_ENTRY(0x8086280d, "Geminilake HDMI", patch_i915_hsw_hdmi), 3803 3804 HDA_CODEC_ENTRY(0x80862880, "CedarTrail HDMI", patch_generic_hdmi), 3804 3805 HDA_CODEC_ENTRY(0x80862882, "Valleyview2 HDMI", patch_i915_byt_hdmi), 3805 3806 HDA_CODEC_ENTRY(0x80862883, "Braswell HDMI", patch_i915_byt_hdmi),
+2
sound/pci/hda/patch_realtek.c
··· 5606 5606 SND_PCI_QUIRK(0x1028, 0x0725, "Dell Inspiron 3162", ALC255_FIXUP_DELL_SPK_NOISE), 5607 5607 SND_PCI_QUIRK(0x1028, 0x075b, "Dell XPS 13 9360", ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE), 5608 5608 SND_PCI_QUIRK(0x1028, 0x075d, "Dell AIO", ALC298_FIXUP_SPK_VOLUME), 5609 + SND_PCI_QUIRK(0x1028, 0x0798, "Dell Inspiron 17 7000 Gaming", ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER), 5609 5610 SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 5610 5611 SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 5611 5612 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), ··· 5725 5724 SND_PCI_QUIRK(0x17aa, 0x2233, "Thinkpad", ALC292_FIXUP_TPT460), 5726 5725 SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), 5727 5726 SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), 5727 + SND_PCI_QUIRK(0x17aa, 0x3112, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), 5728 5728 SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI), 5729 5729 SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC), 5730 5730 SND_PCI_QUIRK(0x17aa, 0x3978, "IdeaPad Y410P", ALC269_FIXUP_NO_SHUTUP),