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>
This commit is contained in:
Andy Shevchenko 2015-12-21 19:09:55 +02:00 committed by Takashi Iwai
parent 14da04b5ff
commit 37ba8fca7e
1 changed files with 3 additions and 2 deletions

View File

@ -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;
}