linux/sound/pci
Dave Airlie 246efa4a07 snd/hda: add runtime suspend/resume on optimus support (v4)
Add support for HDMI audio device on VGA cards that powerdown
to D3cold using non-standard ACPI/PCI infrastructure (optimus).

This does a couple of things to make it work:

a) add a set of power ops for the hdmi domain, and enables them
via vga_switcheroo when we are a switcheroo controlled card. This
just replaces the runtime resume operation so that when the card
is in D3cold the userspace pci config space access via sysfs,
the vga switcheroon runtime resume gets called first and it calls
the GPU resume callback before calling the sound card runtime
resume.

b) standard ACPI/PCI stacks won't put a device into D3cold without
an ACPI handle, but since the hdmi audio devices on gpus don't have
an ACPI handle, we need to manually force the device into D3cold
after suspend from the switcheroo path only.

c) don't try and do runtime s/r when the GPU is off.

d) call runtime suspend/resume during switcheroo suspend/resume
this is to make sure the runtime stack knows to try and resume
the hdmi audio device for pci config space access.

v2: fix incorrect runtime call suspend->resume.

v3: rework irq handler to avoid false irq when we are resuming
but haven't runtime resumed yet, don't bother trying D3cold,
it won't work, just set it manually ourselves, move runtime s/r
calls outside the main s/r hook. enable dnyamic pm properly by
dropping reference.

v4: put back irq handler check just wrap it with cap check

Acked-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-08-29 13:30:29 +10:00
..
ac97 ALSA: Replace the magic number 44 with const 2013-06-28 12:14:44 +02:00
ali5451 ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
asihpi ALSA: asihpi: Fix unlocked snd_pcm_stop() call 2013-07-15 18:12:49 +02:00
au88x0 ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
aw2 ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
ca0106 ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
cs46xx ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
cs5535audio ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
ctxfi ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
echoaudio ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
emu10k1 ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
hda snd/hda: add runtime suspend/resume on optimus support (v4) 2013-08-29 13:30:29 +10:00
ice1712 ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
korg1212 ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
lola ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
lx6464es ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
mixart ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
nm256 ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
oxygen ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
pcxhr ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
riptide ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
rme9652 ALSA: hdspm - Allow SingleSpeed WordClock when in DS/QS mode 2013-05-31 15:06:01 +02:00
trident ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
vx222 ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
ymfpci ALSA: pci: trivial: replace numeric with standard PM state macros 2013-06-27 15:04:32 +02:00
ad1889.c ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
ad1889.h
ak4531_codec.c ALSA: pci: remove __dev* attributes 2012-12-07 07:20:55 +01:00
als300.c ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
als4000.c ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
atiixp_modem.c ALSA: atiixp: Fix unlocked snd_pcm_stop() call 2013-07-15 18:12:49 +02:00
atiixp.c ALSA: atiixp: Fix unlocked snd_pcm_stop() call 2013-07-15 18:12:49 +02:00
azt3328.c ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
azt3328.h
bt87x.c ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
cmipci.c ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
cs4281.c ALSA: pci: trivial: replace numeric with standard PM state macros 2013-06-27 15:04:32 +02:00
cs5530.c ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
ens1370.c ALSA: pci: trivial: replace numeric with standard PM state macros 2013-06-27 15:04:32 +02:00
ens1371.c
es1938.c ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
es1968.c ALSA: es1968: Add radio support for MediaForte M56VAP 2013-05-31 08:39:48 +02:00
fm801.c ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
intel8x0.c ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
intel8x0m.c ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
Kconfig ALSA: add missing HAS_IOPORT and GENERIC_HARDIRQS dependencies 2013-02-07 14:46:13 +01:00
maestro3.c ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
Makefile
rme32.c ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
rme96.c ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
sis7019.c Merge branch 'for-linus' into for-next 2013-06-05 15:21:29 +02:00
sis7019.h
sonicvibes.c ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
via82xx_modem.c ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00
via82xx.c ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove 2013-05-29 12:37:32 +02:00