ALSA: fm801: restore TEA575x state on resume
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 21 Dec 2015 17:09:56 +0000 (19:09 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 21 Dec 2015 18:53:52 +0000 (19:53 +0100)
The suspend / resume cycle resets the settings of the FM tuner. Restore
frequency settings on resume.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/fm801.c

index 0b1ae6c684c18f49d6fd988b61fdaf75e5fe07cd..161925b6518eba41885385b2bd72123a48fca155 100644 (file)
@@ -1427,6 +1427,11 @@ static int snd_fm801_resume(struct device *dev)
        for (i = 0; i < ARRAY_SIZE(saved_regs); i++)
                fm801_iowrite16(chip, saved_regs[i], chip->saved_regs[i]);
 
+#ifdef CONFIG_SND_FM801_TEA575X_BOOL
+       if (!(chip->tea575x_tuner & TUNER_DISABLED))
+               snd_tea575x_set_freq(&chip->tea);
+#endif
+
        snd_power_change_state(card, SNDRV_CTL_POWER_D0);
        return 0;
 }