Skip to content

Commit

Permalink
ASoC: Intel: Skylake: enable interrupt as wake source in active suspend
Browse files Browse the repository at this point in the history
In active suspend, any HDA interrupt should wake the system. When device
enters active suspend, we need to enable HDA controller interrupt as wake
source. Similarly disable HDA controller interrupt as wake source when
exiting active suspend.

Signed-off-by: Jeeja KP <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
kpjeeja authored and broonie committed Jan 10, 2016
1 parent c2e20cd commit 1f4956f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sound/soc/intel/skylake/skl.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,15 @@ static int skl_suspend(struct device *dev)
struct pci_dev *pci = to_pci_dev(dev);
struct hdac_ext_bus *ebus = pci_get_drvdata(pci);
struct skl *skl = ebus_to_skl(ebus);
struct hdac_bus *bus = ebus_to_hbus(ebus);

/*
* Do not suspend if streams which are marked ignore suspend are
* running, we need to save the state for these and continue
*/
if (skl->supend_active) {
snd_hdac_ext_bus_link_power_down_all(ebus);
enable_irq_wake(bus->irq);
pci_save_state(pci);
pci_disable_device(pci);
return 0;
Expand All @@ -238,6 +240,7 @@ static int skl_resume(struct device *dev)
struct pci_dev *pci = to_pci_dev(dev);
struct hdac_ext_bus *ebus = pci_get_drvdata(pci);
struct skl *skl = ebus_to_skl(ebus);
struct hdac_bus *bus = ebus_to_hbus(ebus);
int ret;

/*
Expand All @@ -248,6 +251,7 @@ static int skl_resume(struct device *dev)
pci_restore_state(pci);
ret = pci_enable_device(pci);
snd_hdac_ext_bus_link_power_up_all(ebus);
disable_irq_wake(bus->irq);
} else {
ret = _skl_resume(ebus);
}
Expand Down

0 comments on commit 1f4956f

Please sign in to comment.