diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-07-15 09:27:19 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-07-15 09:28:43 -0400 |
commit | 1618e84aa87af94b46921b265b68bb7994571c20 (patch) | |
tree | 0ee428edbcd6e1a49abe72767850997e6adfec1c /sound/pci | |
parent | 03fe805a098422d27cbbbad29a54ff1349da3622 (diff) | |
parent | 4da63c6fc426023d1a20e45508c47d7d68c6a53d (diff) |
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')
-rw-r--r-- | sound/pci/hda/hda_controller.c | 3 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 17 | ||||
-rw-r--r-- | sound/pci/hda/hda_priv.h | 1 | ||||
-rw-r--r-- | sound/pci/hda/hda_tegra.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 2 |
5 files changed, 17 insertions, 8 deletions
diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c index 06f39c126ba4..8337645aa7a5 100644 --- a/sound/pci/hda/hda_controller.c +++ b/sound/pci/hda/hda_controller.c | |||
@@ -194,7 +194,8 @@ azx_assign_device(struct azx *chip, struct snd_pcm_substream *substream) | |||
194 | dsp_unlock(azx_dev); | 194 | dsp_unlock(azx_dev); |
195 | return azx_dev; | 195 | return azx_dev; |
196 | } | 196 | } |
197 | if (!res) | 197 | if (!res || |
198 | (chip->driver_caps & AZX_DCAPS_REVERSE_ASSIGN)) | ||
198 | res = azx_dev; | 199 | res = azx_dev; |
199 | } | 200 | } |
200 | dsp_unlock(azx_dev); | 201 | dsp_unlock(azx_dev); |
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 { | |||
272 | /* quirks for Intel PCH */ | 272 | /* quirks for Intel PCH */ |
273 | #define AZX_DCAPS_INTEL_PCH_NOPM \ | 273 | #define AZX_DCAPS_INTEL_PCH_NOPM \ |
274 | (AZX_DCAPS_SCH_SNOOP | AZX_DCAPS_BUFSIZE | \ | 274 | (AZX_DCAPS_SCH_SNOOP | AZX_DCAPS_BUFSIZE | \ |
275 | AZX_DCAPS_COUNT_LPIB_DELAY) | 275 | AZX_DCAPS_COUNT_LPIB_DELAY | AZX_DCAPS_REVERSE_ASSIGN) |
276 | 276 | ||
277 | #define AZX_DCAPS_INTEL_PCH \ | 277 | #define AZX_DCAPS_INTEL_PCH \ |
278 | (AZX_DCAPS_INTEL_PCH_NOPM | AZX_DCAPS_PM_RUNTIME) | 278 | (AZX_DCAPS_INTEL_PCH_NOPM | AZX_DCAPS_PM_RUNTIME) |
@@ -773,9 +773,10 @@ static int azx_suspend(struct device *dev) | |||
773 | struct pci_dev *pci = to_pci_dev(dev); | 773 | struct pci_dev *pci = to_pci_dev(dev); |
774 | struct snd_card *card = dev_get_drvdata(dev); | 774 | struct snd_card *card = dev_get_drvdata(dev); |
775 | struct azx *chip = card->private_data; | 775 | struct azx *chip = card->private_data; |
776 | struct hda_intel *hda = container_of(chip, struct hda_intel, chip); | ||
776 | struct azx_pcm *p; | 777 | struct azx_pcm *p; |
777 | 778 | ||
778 | if (chip->disabled) | 779 | if (chip->disabled || hda->init_failed) |
779 | return 0; | 780 | return 0; |
780 | 781 | ||
781 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); | 782 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); |
@@ -806,8 +807,9 @@ static int azx_resume(struct device *dev) | |||
806 | struct pci_dev *pci = to_pci_dev(dev); | 807 | struct pci_dev *pci = to_pci_dev(dev); |
807 | struct snd_card *card = dev_get_drvdata(dev); | 808 | struct snd_card *card = dev_get_drvdata(dev); |
808 | struct azx *chip = card->private_data; | 809 | struct azx *chip = card->private_data; |
810 | struct hda_intel *hda = container_of(chip, struct hda_intel, chip); | ||
809 | 811 | ||
810 | if (chip->disabled) | 812 | if (chip->disabled || hda->init_failed) |
811 | return 0; | 813 | return 0; |
812 | 814 | ||
813 | if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) { | 815 | if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) { |
@@ -843,8 +845,9 @@ static int azx_runtime_suspend(struct device *dev) | |||
843 | { | 845 | { |
844 | struct snd_card *card = dev_get_drvdata(dev); | 846 | struct snd_card *card = dev_get_drvdata(dev); |
845 | struct azx *chip = card->private_data; | 847 | struct azx *chip = card->private_data; |
848 | struct hda_intel *hda = container_of(chip, struct hda_intel, chip); | ||
846 | 849 | ||
847 | if (chip->disabled) | 850 | if (chip->disabled || hda->init_failed) |
848 | return 0; | 851 | return 0; |
849 | 852 | ||
850 | if (!(chip->driver_caps & AZX_DCAPS_PM_RUNTIME)) | 853 | if (!(chip->driver_caps & AZX_DCAPS_PM_RUNTIME)) |
@@ -867,11 +870,12 @@ static int azx_runtime_resume(struct device *dev) | |||
867 | { | 870 | { |
868 | struct snd_card *card = dev_get_drvdata(dev); | 871 | struct snd_card *card = dev_get_drvdata(dev); |
869 | struct azx *chip = card->private_data; | 872 | struct azx *chip = card->private_data; |
873 | struct hda_intel *hda = container_of(chip, struct hda_intel, chip); | ||
870 | struct hda_bus *bus; | 874 | struct hda_bus *bus; |
871 | struct hda_codec *codec; | 875 | struct hda_codec *codec; |
872 | int status; | 876 | int status; |
873 | 877 | ||
874 | if (chip->disabled) | 878 | if (chip->disabled || hda->init_failed) |
875 | return 0; | 879 | return 0; |
876 | 880 | ||
877 | if (!(chip->driver_caps & AZX_DCAPS_PM_RUNTIME)) | 881 | if (!(chip->driver_caps & AZX_DCAPS_PM_RUNTIME)) |
@@ -907,8 +911,9 @@ static int azx_runtime_idle(struct device *dev) | |||
907 | { | 911 | { |
908 | struct snd_card *card = dev_get_drvdata(dev); | 912 | struct snd_card *card = dev_get_drvdata(dev); |
909 | struct azx *chip = card->private_data; | 913 | struct azx *chip = card->private_data; |
914 | struct hda_intel *hda = container_of(chip, struct hda_intel, chip); | ||
910 | 915 | ||
911 | if (chip->disabled) | 916 | if (chip->disabled || hda->init_failed) |
912 | return 0; | 917 | return 0; |
913 | 918 | ||
914 | if (!power_save_controller || | 919 | if (!power_save_controller || |
diff --git a/sound/pci/hda/hda_priv.h b/sound/pci/hda/hda_priv.h index 33eb5d027d38..949cd437eeb2 100644 --- a/sound/pci/hda/hda_priv.h +++ b/sound/pci/hda/hda_priv.h | |||
@@ -166,6 +166,7 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 }; | |||
166 | #define AZX_DCAPS_BUFSIZE (1 << 21) /* no buffer size alignment */ | 166 | #define AZX_DCAPS_BUFSIZE (1 << 21) /* no buffer size alignment */ |
167 | #define AZX_DCAPS_ALIGN_BUFSIZE (1 << 22) /* buffer size alignment */ | 167 | #define AZX_DCAPS_ALIGN_BUFSIZE (1 << 22) /* buffer size alignment */ |
168 | #define AZX_DCAPS_4K_BDLE_BOUNDARY (1 << 23) /* BDLE in 4k boundary */ | 168 | #define AZX_DCAPS_4K_BDLE_BOUNDARY (1 << 23) /* BDLE in 4k boundary */ |
169 | #define AZX_DCAPS_REVERSE_ASSIGN (1 << 24) /* Assign devices in reverse order */ | ||
169 | #define AZX_DCAPS_COUNT_LPIB_DELAY (1 << 25) /* Take LPIB as delay */ | 170 | #define AZX_DCAPS_COUNT_LPIB_DELAY (1 << 25) /* Take LPIB as delay */ |
170 | #define AZX_DCAPS_PM_RUNTIME (1 << 26) /* runtime PM support */ | 171 | #define AZX_DCAPS_PM_RUNTIME (1 << 26) /* runtime PM support */ |
171 | #define AZX_DCAPS_I915_POWERWELL (1 << 27) /* HSW i915 powerwell support */ | 172 | #define AZX_DCAPS_I915_POWERWELL (1 << 27) /* HSW i915 powerwell support */ |
diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c index dc4bb21ed17b..227990bc02e3 100644 --- a/sound/pci/hda/hda_tegra.c +++ b/sound/pci/hda/hda_tegra.c | |||
@@ -235,6 +235,7 @@ disable_hda: | |||
235 | return rc; | 235 | return rc; |
236 | } | 236 | } |
237 | 237 | ||
238 | #ifdef CONFIG_PM_SLEEP | ||
238 | static void hda_tegra_disable_clocks(struct hda_tegra *data) | 239 | static void hda_tegra_disable_clocks(struct hda_tegra *data) |
239 | { | 240 | { |
240 | clk_disable_unprepare(data->hda2hdmi_clk); | 241 | clk_disable_unprepare(data->hda2hdmi_clk); |
@@ -242,7 +243,6 @@ static void hda_tegra_disable_clocks(struct hda_tegra *data) | |||
242 | clk_disable_unprepare(data->hda_clk); | 243 | clk_disable_unprepare(data->hda_clk); |
243 | } | 244 | } |
244 | 245 | ||
245 | #ifdef CONFIG_PM_SLEEP | ||
246 | /* | 246 | /* |
247 | * power management | 247 | * power management |
248 | */ | 248 | */ |
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 10b69c8175d2..a21090bc1d45 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -3338,6 +3338,7 @@ static const struct hda_codec_preset snd_hda_preset_hdmi[] = { | |||
3338 | { .id = 0x10de0051, .name = "GPU 51 HDMI/DP", .patch = patch_nvhdmi }, | 3338 | { .id = 0x10de0051, .name = "GPU 51 HDMI/DP", .patch = patch_nvhdmi }, |
3339 | { .id = 0x10de0060, .name = "GPU 60 HDMI/DP", .patch = patch_nvhdmi }, | 3339 | { .id = 0x10de0060, .name = "GPU 60 HDMI/DP", .patch = patch_nvhdmi }, |
3340 | { .id = 0x10de0067, .name = "MCP67 HDMI", .patch = patch_nvhdmi_2ch }, | 3340 | { .id = 0x10de0067, .name = "MCP67 HDMI", .patch = patch_nvhdmi_2ch }, |
3341 | { .id = 0x10de0070, .name = "GPU 70 HDMI/DP", .patch = patch_nvhdmi }, | ||
3341 | { .id = 0x10de0071, .name = "GPU 71 HDMI/DP", .patch = patch_nvhdmi }, | 3342 | { .id = 0x10de0071, .name = "GPU 71 HDMI/DP", .patch = patch_nvhdmi }, |
3342 | { .id = 0x10de8001, .name = "MCP73 HDMI", .patch = patch_nvhdmi_2ch }, | 3343 | { .id = 0x10de8001, .name = "MCP73 HDMI", .patch = patch_nvhdmi_2ch }, |
3343 | { .id = 0x11069f80, .name = "VX900 HDMI/DP", .patch = patch_via_hdmi }, | 3344 | { .id = 0x11069f80, .name = "VX900 HDMI/DP", .patch = patch_via_hdmi }, |
@@ -3395,6 +3396,7 @@ MODULE_ALIAS("snd-hda-codec-id:10de0044"); | |||
3395 | MODULE_ALIAS("snd-hda-codec-id:10de0051"); | 3396 | MODULE_ALIAS("snd-hda-codec-id:10de0051"); |
3396 | MODULE_ALIAS("snd-hda-codec-id:10de0060"); | 3397 | MODULE_ALIAS("snd-hda-codec-id:10de0060"); |
3397 | MODULE_ALIAS("snd-hda-codec-id:10de0067"); | 3398 | MODULE_ALIAS("snd-hda-codec-id:10de0067"); |
3399 | MODULE_ALIAS("snd-hda-codec-id:10de0070"); | ||
3398 | MODULE_ALIAS("snd-hda-codec-id:10de0071"); | 3400 | MODULE_ALIAS("snd-hda-codec-id:10de0071"); |
3399 | MODULE_ALIAS("snd-hda-codec-id:10de8001"); | 3401 | MODULE_ALIAS("snd-hda-codec-id:10de8001"); |
3400 | MODULE_ALIAS("snd-hda-codec-id:11069f80"); | 3402 | MODULE_ALIAS("snd-hda-codec-id:11069f80"); |