mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
snd-miro has no PM callbacks, so system resume leaves the OPTi master-control registers and the board-specific ACI mixer state unrestored. Like snd-opti9xx, the driver needs to reprogram the OPTi routing registers before bringing the codec back. snd-miro also keeps mixer state in the ACI block, so the codec resume callback alone is not enough here. Save the ACI mixer state on suspend, reinitialize the OPTi and ACI state on resume, replay the saved ACI values, and then resume the WSS codec. Hook the PM handlers into both the ISA and PnP paths. Also initialize miro->card on the ISA path for the existing dev_*() logging and keep the cached solo-mode value aligned with the value written to hardware. PCM20 radio tuner state remains outside this driver's PM scope. Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com> Link: https://patch.msgid.link/20260413-alsa-miro-pm-v1-1-07cc1ce3463c@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>