diff options
| -rw-r--r-- | sound/core/seq/seq_fifo.c | 3 | ||||
| -rw-r--r-- | sound/core/timer.c | 18 | ||||
| -rw-r--r-- | sound/pci/ctxfi/cthw20k1.c | 19 | ||||
| -rw-r--r-- | sound/pci/ctxfi/cthw20k2.c | 19 | ||||
| -rw-r--r-- | sound/pci/hda/hda_intel.c | 3 | ||||
| -rw-r--r-- | sound/pci/hda/patch_hdmi.c | 1 | ||||
| -rw-r--r-- | sound/pci/hda/patch_realtek.c | 2 |
7 files changed, 36 insertions, 29 deletions
diff --git a/sound/core/seq/seq_fifo.c b/sound/core/seq/seq_fifo.c index 1d5acbe0c08b..86240d02b530 100644 --- a/sound/core/seq/seq_fifo.c +++ b/sound/core/seq/seq_fifo.c | |||
| @@ -135,6 +135,7 @@ int snd_seq_fifo_event_in(struct snd_seq_fifo *f, | |||
| 135 | f->tail = cell; | 135 | f->tail = cell; |
| 136 | if (f->head == NULL) | 136 | if (f->head == NULL) |
| 137 | f->head = cell; | 137 | f->head = cell; |
| 138 | cell->next = NULL; | ||
| 138 | f->cells++; | 139 | f->cells++; |
| 139 | spin_unlock_irqrestore(&f->lock, flags); | 140 | spin_unlock_irqrestore(&f->lock, flags); |
| 140 | 141 | ||
| @@ -214,6 +215,8 @@ void snd_seq_fifo_cell_putback(struct snd_seq_fifo *f, | |||
| 214 | spin_lock_irqsave(&f->lock, flags); | 215 | spin_lock_irqsave(&f->lock, flags); |
| 215 | cell->next = f->head; | 216 | cell->next = f->head; |
| 216 | f->head = cell; | 217 | f->head = cell; |
| 218 | if (!f->tail) | ||
| 219 | f->tail = cell; | ||
| 217 | f->cells++; | 220 | f->cells++; |
| 218 | spin_unlock_irqrestore(&f->lock, flags); | 221 | spin_unlock_irqrestore(&f->lock, flags); |
| 219 | } | 222 | } |
diff --git a/sound/core/timer.c b/sound/core/timer.c index fc144f43faa6..ad153149b231 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c | |||
| @@ -1702,9 +1702,21 @@ static int snd_timer_user_params(struct file *file, | |||
| 1702 | return -EBADFD; | 1702 | return -EBADFD; |
| 1703 | if (copy_from_user(¶ms, _params, sizeof(params))) | 1703 | if (copy_from_user(¶ms, _params, sizeof(params))) |
| 1704 | return -EFAULT; | 1704 | return -EFAULT; |
| 1705 | if (!(t->hw.flags & SNDRV_TIMER_HW_SLAVE) && params.ticks < 1) { | 1705 | if (!(t->hw.flags & SNDRV_TIMER_HW_SLAVE)) { |
| 1706 | err = -EINVAL; | 1706 | u64 resolution; |
| 1707 | goto _end; | 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 | if (params.queue_size > 0 && | 1721 | if (params.queue_size > 0 && |
| 1710 | (params.queue_size < 32 || params.queue_size > 1024)) { | 1722 | (params.queue_size < 32 || params.queue_size > 1024)) { |
diff --git a/sound/pci/ctxfi/cthw20k1.c b/sound/pci/ctxfi/cthw20k1.c index 9667cbfb0ca2..ab4cdab5cfa5 100644 --- a/sound/pci/ctxfi/cthw20k1.c +++ b/sound/pci/ctxfi/cthw20k1.c | |||
| @@ -27,12 +27,6 @@ | |||
| 27 | #include "cthw20k1.h" | 27 | #include "cthw20k1.h" |
| 28 | #include "ct20k1reg.h" | 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 | struct hw20k1 { | 30 | struct hw20k1 { |
| 37 | struct hw hw; | 31 | struct hw hw; |
| 38 | spinlock_t reg_20k1_lock; | 32 | spinlock_t reg_20k1_lock; |
| @@ -1904,19 +1898,18 @@ static int hw_card_start(struct hw *hw) | |||
| 1904 | { | 1898 | { |
| 1905 | int err; | 1899 | int err; |
| 1906 | struct pci_dev *pci = hw->pci; | 1900 | struct pci_dev *pci = hw->pci; |
| 1901 | const unsigned int dma_bits = BITS_PER_LONG; | ||
| 1907 | 1902 | ||
| 1908 | err = pci_enable_device(pci); | 1903 | err = pci_enable_device(pci); |
| 1909 | if (err < 0) | 1904 | if (err < 0) |
| 1910 | return err; | 1905 | return err; |
| 1911 | 1906 | ||
| 1912 | /* Set DMA transfer mask */ | 1907 | /* Set DMA transfer mask */ |
| 1913 | if (dma_set_mask(&pci->dev, CT_XFI_DMA_MASK) < 0 || | 1908 | if (dma_set_mask(&pci->dev, DMA_BIT_MASK(dma_bits))) { |
| 1914 | dma_set_coherent_mask(&pci->dev, CT_XFI_DMA_MASK) < 0) { | 1909 | dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(dma_bits)); |
| 1915 | dev_err(hw->card->dev, | 1910 | } else { |
| 1916 | "architecture does not support PCI busmaster DMA with mask 0x%llx\n", | 1911 | dma_set_mask(&pci->dev, DMA_BIT_MASK(32)); |
| 1917 | CT_XFI_DMA_MASK); | 1912 | dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(32)); |
| 1918 | err = -ENXIO; | ||
| 1919 | goto error1; | ||
| 1920 | } | 1913 | } |
| 1921 | 1914 | ||
| 1922 | if (!hw->io_base) { | 1915 | if (!hw->io_base) { |
diff --git a/sound/pci/ctxfi/cthw20k2.c b/sound/pci/ctxfi/cthw20k2.c index 6414ecf93efa..18ee7768b7c4 100644 --- a/sound/pci/ctxfi/cthw20k2.c +++ b/sound/pci/ctxfi/cthw20k2.c | |||
| @@ -26,12 +26,6 @@ | |||
| 26 | #include "cthw20k2.h" | 26 | #include "cthw20k2.h" |
| 27 | #include "ct20k2reg.h" | 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 | struct hw20k2 { | 29 | struct hw20k2 { |
| 36 | struct hw hw; | 30 | struct hw hw; |
| 37 | /* for i2c */ | 31 | /* for i2c */ |
| @@ -2029,19 +2023,18 @@ static int hw_card_start(struct hw *hw) | |||
| 2029 | int err = 0; | 2023 | int err = 0; |
| 2030 | struct pci_dev *pci = hw->pci; | 2024 | struct pci_dev *pci = hw->pci; |
| 2031 | unsigned int gctl; | 2025 | unsigned int gctl; |
| 2026 | const unsigned int dma_bits = BITS_PER_LONG; | ||
| 2032 | 2027 | ||
| 2033 | err = pci_enable_device(pci); | 2028 | err = pci_enable_device(pci); |
| 2034 | if (err < 0) | 2029 | if (err < 0) |
| 2035 | return err; | 2030 | return err; |
| 2036 | 2031 | ||
| 2037 | /* Set DMA transfer mask */ | 2032 | /* Set DMA transfer mask */ |
| 2038 | if (dma_set_mask(&pci->dev, CT_XFI_DMA_MASK) < 0 || | 2033 | if (!dma_set_mask(&pci->dev, DMA_BIT_MASK(dma_bits))) { |
| 2039 | dma_set_coherent_mask(&pci->dev, CT_XFI_DMA_MASK) < 0) { | 2034 | dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(dma_bits)); |
| 2040 | dev_err(hw->card->dev, | 2035 | } else { |
| 2041 | "architecture does not support PCI busmaster DMA with mask 0x%llx\n", | 2036 | dma_set_mask(&pci->dev, DMA_BIT_MASK(32)); |
| 2042 | CT_XFI_DMA_MASK); | 2037 | dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(32)); |
| 2043 | err = -ENXIO; | ||
| 2044 | goto error1; | ||
| 2045 | } | 2038 | } |
| 2046 | 2039 | ||
| 2047 | if (!hw->io_base) { | 2040 | if (!hw->io_base) { |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 16108f0eb688..c8256a89375a 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
| @@ -2255,6 +2255,9 @@ static const struct pci_device_id azx_ids[] = { | |||
| 2255 | /* Broxton-T */ | 2255 | /* Broxton-T */ |
| 2256 | { PCI_DEVICE(0x8086, 0x1a98), | 2256 | { PCI_DEVICE(0x8086, 0x1a98), |
| 2257 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_BROXTON }, | 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 | /* Haswell */ | 2261 | /* Haswell */ |
| 2259 | { PCI_DEVICE(0x8086, 0x0a0c), | 2262 | { PCI_DEVICE(0x8086, 0x0a0c), |
| 2260 | .driver_data = AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL }, | 2263 | .driver_data = AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL }, |
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index fd5efa72a68b..1461ef8eb749 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
| @@ -3800,6 +3800,7 @@ HDA_CODEC_ENTRY(0x80862808, "Broadwell HDMI", patch_i915_hsw_hdmi), | |||
| 3800 | HDA_CODEC_ENTRY(0x80862809, "Skylake HDMI", patch_i915_hsw_hdmi), | 3800 | HDA_CODEC_ENTRY(0x80862809, "Skylake HDMI", patch_i915_hsw_hdmi), |
| 3801 | HDA_CODEC_ENTRY(0x8086280a, "Broxton HDMI", patch_i915_hsw_hdmi), | 3801 | HDA_CODEC_ENTRY(0x8086280a, "Broxton HDMI", patch_i915_hsw_hdmi), |
| 3802 | HDA_CODEC_ENTRY(0x8086280b, "Kabylake HDMI", patch_i915_hsw_hdmi), | 3802 | HDA_CODEC_ENTRY(0x8086280b, "Kabylake HDMI", patch_i915_hsw_hdmi), |
| 3803 | HDA_CODEC_ENTRY(0x8086280d, "Geminilake HDMI", patch_i915_hsw_hdmi), | ||
| 3803 | HDA_CODEC_ENTRY(0x80862880, "CedarTrail HDMI", patch_generic_hdmi), | 3804 | HDA_CODEC_ENTRY(0x80862880, "CedarTrail HDMI", patch_generic_hdmi), |
| 3804 | HDA_CODEC_ENTRY(0x80862882, "Valleyview2 HDMI", patch_i915_byt_hdmi), | 3805 | HDA_CODEC_ENTRY(0x80862882, "Valleyview2 HDMI", patch_i915_byt_hdmi), |
| 3805 | HDA_CODEC_ENTRY(0x80862883, "Braswell HDMI", patch_i915_byt_hdmi), | 3806 | HDA_CODEC_ENTRY(0x80862883, "Braswell HDMI", patch_i915_byt_hdmi), |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 73a00460b5c1..4e112221d825 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
| @@ -5606,6 +5606,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
| 5606 | SND_PCI_QUIRK(0x1028, 0x0725, "Dell Inspiron 3162", ALC255_FIXUP_DELL_SPK_NOISE), | 5606 | SND_PCI_QUIRK(0x1028, 0x0725, "Dell Inspiron 3162", ALC255_FIXUP_DELL_SPK_NOISE), |
| 5607 | SND_PCI_QUIRK(0x1028, 0x075b, "Dell XPS 13 9360", ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE), | 5607 | SND_PCI_QUIRK(0x1028, 0x075b, "Dell XPS 13 9360", ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE), |
| 5608 | SND_PCI_QUIRK(0x1028, 0x075d, "Dell AIO", ALC298_FIXUP_SPK_VOLUME), | 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 | SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), | 5610 | SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), |
| 5610 | SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), | 5611 | SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), |
| 5611 | SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), | 5612 | SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), |
| @@ -5724,6 +5725,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
| 5724 | SND_PCI_QUIRK(0x17aa, 0x2233, "Thinkpad", ALC292_FIXUP_TPT460), | 5725 | SND_PCI_QUIRK(0x17aa, 0x2233, "Thinkpad", ALC292_FIXUP_TPT460), |
| 5725 | SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), | 5726 | SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), |
| 5726 | SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), | 5727 | SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), |
| 5728 | SND_PCI_QUIRK(0x17aa, 0x3112, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), | ||
| 5727 | SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI), | 5729 | SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI), |
| 5728 | SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC), | 5730 | SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC), |
| 5729 | SND_PCI_QUIRK(0x17aa, 0x3978, "IdeaPad Y410P", ALC269_FIXUP_NO_SHUTUP), | 5731 | SND_PCI_QUIRK(0x17aa, 0x3978, "IdeaPad Y410P", ALC269_FIXUP_NO_SHUTUP), |
