Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: ymfpci - Fix legacy registers on S3/S4 resume

We need to resume two legacy registers to recover MIDI/FM functionality
on S3/S4 resume, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>

+11
+2
include/sound/ymfpci.h
··· 366 366 #ifdef CONFIG_PM 367 367 u32 *saved_regs; 368 368 u32 saved_ydsxgr_mode; 369 + u16 saved_dsxg_legacy; 370 + u16 saved_dsxg_elegacy; 369 371 #endif 370 372 }; 371 373
+9
sound/pci/ymfpci/ymfpci_main.c
··· 2310 2310 for (i = 0; i < YDSXGR_NUM_SAVED_REGS; i++) 2311 2311 chip->saved_regs[i] = snd_ymfpci_readl(chip, saved_regs_index[i]); 2312 2312 chip->saved_ydsxgr_mode = snd_ymfpci_readl(chip, YDSXGR_MODE); 2313 + pci_read_config_word(chip->pci, PCIR_DSXG_LEGACY, 2314 + &chip->saved_dsxg_legacy); 2315 + pci_read_config_word(chip->pci, PCIR_DSXG_ELEGACY, 2316 + &chip->saved_dsxg_elegacy); 2313 2317 snd_ymfpci_writel(chip, YDSXGR_NATIVEDACOUTVOL, 0); 2314 2318 snd_ymfpci_writel(chip, YDSXGR_BUF441OUTVOL, 0); 2315 2319 snd_ymfpci_disable_dsp(chip); ··· 2347 2343 snd_ymfpci_writel(chip, saved_regs_index[i], chip->saved_regs[i]); 2348 2344 2349 2345 snd_ac97_resume(chip->ac97); 2346 + 2347 + pci_write_config_word(chip->pci, PCIR_DSXG_LEGACY, 2348 + chip->saved_dsxg_legacy); 2349 + pci_write_config_word(chip->pci, PCIR_DSXG_ELEGACY, 2350 + chip->saved_dsxg_elegacy); 2350 2351 2351 2352 /* start hw again */ 2352 2353 if (chip->start_count > 0) {