aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/pci/hda/hda_intel.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index ce6b97f31390..e5240cb3749f 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -363,7 +363,10 @@ enum {
363 ((pci)->device == 0x0d0c) || \ 363 ((pci)->device == 0x0d0c) || \
364 ((pci)->device == 0x160c)) 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
368static char *driver_short_names[] = { 371static char *driver_short_names[] = {
369 [AZX_DRIVER_ICH] = "HDA Intel", 372 [AZX_DRIVER_ICH] = "HDA Intel",
@@ -540,13 +543,13 @@ static void hda_intel_init_chip(struct azx *chip, bool full_reset)
540 543
541 if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) 544 if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL)
542 snd_hdac_set_codec_wakeup(bus, true); 545 snd_hdac_set_codec_wakeup(bus, true);
543 if (IS_BROXTON(pci)) { 546 if (IS_SKL_PLUS(pci)) {
544 pci_read_config_dword(pci, INTEL_HDA_CGCTL, &val); 547 pci_read_config_dword(pci, INTEL_HDA_CGCTL, &val);
545 val = val & ~INTEL_HDA_CGCTL_MISCBDCGE; 548 val = val & ~INTEL_HDA_CGCTL_MISCBDCGE;
546 pci_write_config_dword(pci, INTEL_HDA_CGCTL, val); 549 pci_write_config_dword(pci, INTEL_HDA_CGCTL, val);
547 } 550 }
548 azx_init_chip(chip, full_reset); 551 azx_init_chip(chip, full_reset);
549 if (IS_BROXTON(pci)) { 552 if (IS_SKL_PLUS(pci)) {
550 pci_read_config_dword(pci, INTEL_HDA_CGCTL, &val); 553 pci_read_config_dword(pci, INTEL_HDA_CGCTL, &val);
551 val = val | INTEL_HDA_CGCTL_MISCBDCGE; 554 val = val | INTEL_HDA_CGCTL_MISCBDCGE;
552 pci_write_config_dword(pci, INTEL_HDA_CGCTL, val); 555 pci_write_config_dword(pci, INTEL_HDA_CGCTL, val);
@@ -555,7 +558,7 @@ static void hda_intel_init_chip(struct azx *chip, bool full_reset)
555 snd_hdac_set_codec_wakeup(bus, false); 558 snd_hdac_set_codec_wakeup(bus, false);
556 559
557 /* reduce dma latency to avoid noise */ 560 /* reduce dma latency to avoid noise */
558 if (IS_BROXTON(pci)) 561 if (IS_BXT(pci))
559 bxt_reduce_dma_latency(chip); 562 bxt_reduce_dma_latency(chip);
560} 563}
561 564
@@ -977,11 +980,6 @@ static int azx_resume(struct device *dev)
977/* put codec down to D3 at hibernation for Intel SKL+; 980/* put codec down to D3 at hibernation for Intel SKL+;
978 * otherwise BIOS may still access the codec and screw up the driver 981 * otherwise BIOS may still access the codec and screw up the driver
979 */ 982 */
980#define IS_SKL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa170)
981#define IS_SKL_LP(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x9d70)
982#define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98)
983#define IS_SKL_PLUS(pci) (IS_SKL(pci) || IS_SKL_LP(pci) || IS_BXT(pci))
984
985static int azx_freeze_noirq(struct device *dev) 983static int azx_freeze_noirq(struct device *dev)
986{ 984{
987 struct pci_dev *pci = to_pci_dev(dev); 985 struct pci_dev *pci = to_pci_dev(dev);