summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_intel.c
diff options
context:
space:
mode:
authorTakashi Iwai2014-07-15 15:27:19 +0200
committerTakashi Iwai2014-07-15 15:28:43 +0200
commit1618e84aa87af94b46921b265b68bb7994571c20 (patch)
tree0ee428edbcd6e1a49abe72767850997e6adfec1c /sound/pci/hda/hda_intel.c
parentMerge branch 'topic/monotonic' into for-next (diff)
parentALSA: hda - Fix broken PM due to incomplete i915 initialization (diff)
downloadkernel-qcow2-linux-1618e84aa87af94b46921b265b68bb7994571c20.tar.gz
kernel-qcow2-linux-1618e84aa87af94b46921b265b68bb7994571c20.tar.xz
kernel-qcow2-linux-1618e84aa87af94b46921b265b68bb7994571c20.zip
Merge branch 'for-linus' into for-next
Since init_failed flag was moved to struct hda_intel, its access in the commit [4da63c6f: ALSA: hda - Fix broken PM due to incomplete i915 initialization] is also replaced with hda->init_failed appropriately.
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r--sound/pci/hda/hda_intel.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 75b52c4cd70d..8edcee5f034d 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -272,7 +272,7 @@ enum {
/* quirks for Intel PCH */
#define AZX_DCAPS_INTEL_PCH_NOPM \
(AZX_DCAPS_SCH_SNOOP | AZX_DCAPS_BUFSIZE | \
- AZX_DCAPS_COUNT_LPIB_DELAY)
+ AZX_DCAPS_COUNT_LPIB_DELAY | AZX_DCAPS_REVERSE_ASSIGN)
#define AZX_DCAPS_INTEL_PCH \
(AZX_DCAPS_INTEL_PCH_NOPM | AZX_DCAPS_PM_RUNTIME)
@@ -773,9 +773,10 @@ static int azx_suspend(struct device *dev)
struct pci_dev *pci = to_pci_dev(dev);
struct snd_card *card = dev_get_drvdata(dev);
struct azx *chip = card->private_data;
+ struct hda_intel *hda = container_of(chip, struct hda_intel, chip);
struct azx_pcm *p;
- if (chip->disabled)
+ if (chip->disabled || hda->init_failed)
return 0;
snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
@@ -806,8 +807,9 @@ static int azx_resume(struct device *dev)
struct pci_dev *pci = to_pci_dev(dev);
struct snd_card *card = dev_get_drvdata(dev);
struct azx *chip = card->private_data;
+ struct hda_intel *hda = container_of(chip, struct hda_intel, chip);
- if (chip->disabled)
+ if (chip->disabled || hda->init_failed)
return 0;
if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) {
@@ -843,8 +845,9 @@ static int azx_runtime_suspend(struct device *dev)
{
struct snd_card *card = dev_get_drvdata(dev);
struct azx *chip = card->private_data;
+ struct hda_intel *hda = container_of(chip, struct hda_intel, chip);
- if (chip->disabled)
+ if (chip->disabled || hda->init_failed)
return 0;
if (!(chip->driver_caps & AZX_DCAPS_PM_RUNTIME))
@@ -867,11 +870,12 @@ static int azx_runtime_resume(struct device *dev)
{
struct snd_card *card = dev_get_drvdata(dev);
struct azx *chip = card->private_data;
+ struct hda_intel *hda = container_of(chip, struct hda_intel, chip);
struct hda_bus *bus;
struct hda_codec *codec;
int status;
- if (chip->disabled)
+ if (chip->disabled || hda->init_failed)
return 0;
if (!(chip->driver_caps & AZX_DCAPS_PM_RUNTIME))
@@ -907,8 +911,9 @@ static int azx_runtime_idle(struct device *dev)
{
struct snd_card *card = dev_get_drvdata(dev);
struct azx *chip = card->private_data;
+ struct hda_intel *hda = container_of(chip, struct hda_intel, chip);
- if (chip->disabled)
+ if (chip->disabled || hda->init_failed)
return 0;
if (!power_save_controller ||