aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_intel.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r--sound/pci/hda/hda_intel.c39
1 files changed, 20 insertions, 19 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index cd2dbaf1be78..f9d870e554d9 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -556,6 +556,12 @@ enum {
556#define AZX_DCAPS_ALIGN_BUFSIZE (1 << 22) /* buffer size alignment */ 556#define AZX_DCAPS_ALIGN_BUFSIZE (1 << 22) /* buffer size alignment */
557#define AZX_DCAPS_4K_BDLE_BOUNDARY (1 << 23) /* BDLE in 4k boundary */ 557#define AZX_DCAPS_4K_BDLE_BOUNDARY (1 << 23) /* BDLE in 4k boundary */
558#define AZX_DCAPS_COUNT_LPIB_DELAY (1 << 25) /* Take LPIB as delay */ 558#define AZX_DCAPS_COUNT_LPIB_DELAY (1 << 25) /* Take LPIB as delay */
559#define AZX_DCAPS_PM_RUNTIME (1 << 26) /* runtime PM support */
560
561/* quirks for Intel PCH */
562#define AZX_DCAPS_INTEL_PCH \
563 (AZX_DCAPS_SCH_SNOOP | AZX_DCAPS_BUFSIZE | \
564 AZX_DCAPS_COUNT_LPIB_DELAY | AZX_DCAPS_PM_RUNTIME)
559 565
560/* quirks for ATI SB / AMD Hudson */ 566/* quirks for ATI SB / AMD Hudson */
561#define AZX_DCAPS_PRESET_ATI_SB \ 567#define AZX_DCAPS_PRESET_ATI_SB \
@@ -2433,6 +2439,9 @@ static void azx_power_notify(struct hda_bus *bus, bool power_up)
2433{ 2439{
2434 struct azx *chip = bus->private_data; 2440 struct azx *chip = bus->private_data;
2435 2441
2442 if (!(chip->driver_caps & AZX_DCAPS_PM_RUNTIME))
2443 return;
2444
2436 if (power_up) 2445 if (power_up)
2437 pm_runtime_get_sync(&chip->pci->dev); 2446 pm_runtime_get_sync(&chip->pci->dev);
2438 else 2447 else
@@ -2548,7 +2557,8 @@ static int azx_runtime_suspend(struct device *dev)
2548 struct snd_card *card = dev_get_drvdata(dev); 2557 struct snd_card *card = dev_get_drvdata(dev);
2549 struct azx *chip = card->private_data; 2558 struct azx *chip = card->private_data;
2550 2559
2551 if (!power_save_controller) 2560 if (!power_save_controller ||
2561 !(chip->driver_caps & AZX_DCAPS_PM_RUNTIME))
2552 return -EAGAIN; 2562 return -EAGAIN;
2553 2563
2554 azx_stop_chip(chip); 2564 azx_stop_chip(chip);
@@ -3429,39 +3439,30 @@ static void __devexit azx_remove(struct pci_dev *pci)
3429static DEFINE_PCI_DEVICE_TABLE(azx_ids) = { 3439static DEFINE_PCI_DEVICE_TABLE(azx_ids) = {
3430 /* CPT */ 3440 /* CPT */
3431 { PCI_DEVICE(0x8086, 0x1c20), 3441 { PCI_DEVICE(0x8086, 0x1c20),
3432 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP | 3442 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
3433 AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY },
3434 /* PBG */ 3443 /* PBG */
3435 { PCI_DEVICE(0x8086, 0x1d20), 3444 { PCI_DEVICE(0x8086, 0x1d20),
3436 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP | 3445 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
3437 AZX_DCAPS_BUFSIZE},
3438 /* Panther Point */ 3446 /* Panther Point */
3439 { PCI_DEVICE(0x8086, 0x1e20), 3447 { PCI_DEVICE(0x8086, 0x1e20),
3440 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP | 3448 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
3441 AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY },
3442 /* Lynx Point */ 3449 /* Lynx Point */
3443 { PCI_DEVICE(0x8086, 0x8c20), 3450 { PCI_DEVICE(0x8086, 0x8c20),
3444 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP | 3451 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
3445 AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY },
3446 /* Lynx Point-LP */ 3452 /* Lynx Point-LP */
3447 { PCI_DEVICE(0x8086, 0x9c20), 3453 { PCI_DEVICE(0x8086, 0x9c20),
3448 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP | 3454 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
3449 AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY },
3450 /* Lynx Point-LP */ 3455 /* Lynx Point-LP */
3451 { PCI_DEVICE(0x8086, 0x9c21), 3456 { PCI_DEVICE(0x8086, 0x9c21),
3452 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP | 3457 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
3453 AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY },
3454 /* Haswell */ 3458 /* Haswell */
3455 { PCI_DEVICE(0x8086, 0x0c0c), 3459 { PCI_DEVICE(0x8086, 0x0c0c),
3456 .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_SCH_SNOOP | 3460 .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH },
3457 AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY },
3458 { PCI_DEVICE(0x8086, 0x0d0c), 3461 { PCI_DEVICE(0x8086, 0x0d0c),
3459 .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_SCH_SNOOP | 3462 .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH },
3460 AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY },
3461 /* 5 Series/3400 */ 3463 /* 5 Series/3400 */
3462 { PCI_DEVICE(0x8086, 0x3b56), 3464 { PCI_DEVICE(0x8086, 0x3b56),
3463 .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_SCH_SNOOP | 3465 .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH },
3464 AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY },
3465 /* SCH */ 3466 /* SCH */
3466 { PCI_DEVICE(0x8086, 0x811b), 3467 { PCI_DEVICE(0x8086, 0x811b),
3467 .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_SCH_SNOOP | 3468 .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_SCH_SNOOP |