Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 37ba8fca authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Takashi Iwai
Browse files

ALSA: fm801: save context before suspend devices



In symmetry we save context first before suspend and restore it last after
resume.

Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 14da04b5
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -1394,6 +1394,9 @@ static int snd_fm801_suspend(struct device *dev)


	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
	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) {
	if (chip->tea575x_tuner & TUNER_ONLY) {
		/* FIXME: tea575x suspend */
		/* FIXME: tea575x suspend */
	} else {
	} else {
@@ -1402,8 +1405,6 @@ static int snd_fm801_suspend(struct device *dev)
		snd_ac97_suspend(chip->ac97_sec);
		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;
	return 0;
}
}