]> git.ipfire.org Git - thirdparty/kernel/stable.git/blobdiff - sound/pci/hda/hda_intel.c
ALSA: hda - Force polling mode on CNL for fixing codec communication
[thirdparty/kernel/stable.git] / sound / pci / hda / hda_intel.c
index 2ec91085fa3e7708d27a605747213f2277b9bc2b..5c29d6490a18a447fd8f0b42ce3815673ce58f4e 100644 (file)
@@ -375,6 +375,7 @@ enum {
 
 #define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98)
 #define IS_CFL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa348)
+#define IS_CNL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x9dc8)
 
 static char *driver_short_names[] = {
        [AZX_DRIVER_ICH] = "HDA Intel",
@@ -1700,8 +1701,8 @@ static int azx_create(struct snd_card *card, struct pci_dev *pci,
        else
                chip->bdl_pos_adj = bdl_pos_adj[dev];
 
-       /* Workaround for a communication error on CFL (bko#199007) */
-       if (IS_CFL(pci))
+       /* Workaround for a communication error on CFL (bko#199007) and CNL */
+       if (IS_CFL(pci) || IS_CNL(pci))
                chip->polling_mode = 1;
 
        err = azx_bus_init(chip, model[dev], &pci_hda_io_ops);
@@ -1788,9 +1789,6 @@ static int azx_first_init(struct azx *chip)
                        chip->msi = 0;
        }
 
-       if (azx_acquire_irq(chip, 0) < 0)
-               return -EBUSY;
-
        pci_set_master(pci);
        synchronize_irq(bus->irq);
 
@@ -1904,6 +1902,9 @@ static int azx_first_init(struct azx *chip)
                return -ENODEV;
        }
 
+       if (azx_acquire_irq(chip, 0) < 0)
+               return -EBUSY;
+
        strcpy(card->driver, "HDA-Intel");
        strlcpy(card->shortname, driver_short_names[chip->driver_type],
                sizeof(card->shortname));