aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/fm801.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2015-12-21 19:09:55 +0200
committerTakashi Iwai <tiwai@suse.de>2015-12-21 19:53:51 +0100
commit37ba8fca7e42b6e689689217b9739e3a9a3c35e6 (patch)
tree7b287bb067997aedb05ced652ad4cc9796b80fbf /sound/pci/fm801.c
parentALSA: fm801: no need to suspend absent codec (diff)
downloadlinux-dev-37ba8fca7e42b6e689689217b9739e3a9a3c35e6.tar.xz
linux-dev-37ba8fca7e42b6e689689217b9739e3a9a3c35e6.zip
ALSA: fm801: save context before suspend devices
In symmetry we save context first before suspend and restore it last after resume. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/fm801.c')
-rw-r--r--sound/pci/fm801.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c
index 9e870884c02c..0b1ae6c684c1 100644
--- a/sound/pci/fm801.c
+++ b/sound/pci/fm801.c
@@ -1394,6 +1394,9 @@ static int snd_fm801_suspend(struct device *dev)
snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
+ for (i = 0; i < ARRAY_SIZE(saved_regs); i++)
+ chip->saved_regs[i] = fm801_ioread16(chip, saved_regs[i]);
+
if (chip->tea575x_tuner & TUNER_ONLY) {
/* FIXME: tea575x suspend */
} else {
@@ -1402,8 +1405,6 @@ static int snd_fm801_suspend(struct device *dev)
snd_ac97_suspend(chip->ac97_sec);
}
- for (i = 0; i < ARRAY_SIZE(saved_regs); i++)
- chip->saved_regs[i] = fm801_ioread16(chip, saved_regs[i]);
return 0;
}