aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/hda_intel.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index f089fa0aa03d..9f110c7ba092 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1120,6 +1120,20 @@ static void azx_load_dsp_cleanup(struct hda_bus *bus,
1120 struct snd_dma_buffer *dmab); 1120 struct snd_dma_buffer *dmab);
1121#endif 1121#endif
1122 1122
1123/* enter link reset */
1124static void azx_reset_link(struct azx *chip)
1125{
1126 unsigned long timeout;
1127
1128 /* reset controller */
1129 azx_writel(chip, GCTL, azx_readl(chip, GCTL) & ~ICH6_GCTL_RESET);
1130
1131 timeout = jiffies + msecs_to_jiffies(100);
1132 while ((azx_readb(chip, GCTL) & ICH6_GCTL_RESET) &&
1133 time_before(jiffies, timeout))
1134 usleep_range(500, 1000);
1135}
1136
1123/* reset codec link */ 1137/* reset codec link */
1124static int azx_reset(struct azx *chip, int full_reset) 1138static int azx_reset(struct azx *chip, int full_reset)
1125{ 1139{
@@ -2894,6 +2908,7 @@ static int azx_suspend(struct device *dev)
2894 if (chip->initialized) 2908 if (chip->initialized)
2895 snd_hda_suspend(chip->bus); 2909 snd_hda_suspend(chip->bus);
2896 azx_stop_chip(chip); 2910 azx_stop_chip(chip);
2911 azx_reset_link(chip);
2897 if (chip->irq >= 0) { 2912 if (chip->irq >= 0) {
2898 free_irq(chip->irq, chip); 2913 free_irq(chip->irq, chip);
2899 chip->irq = -1; 2914 chip->irq = -1;
@@ -2946,6 +2961,7 @@ static int azx_runtime_suspend(struct device *dev)
2946 struct azx *chip = card->private_data; 2961 struct azx *chip = card->private_data;
2947 2962
2948 azx_stop_chip(chip); 2963 azx_stop_chip(chip);
2964 azx_reset_link(chip);
2949 azx_clear_irq_pending(chip); 2965 azx_clear_irq_pending(chip);
2950 return 0; 2966 return 0;
2951} 2967}