Re: [PATCH] ALSA: opti9xx: restore snd-miro state after resume

From: Takashi Iwai

Date: Tue Apr 14 2026 - 03:14:54 EST


On Mon, 13 Apr 2026 21:45:34 +0200,
Cássio Gabriel wrote:
>
> 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@xxxxxxxxx>

As it's no trivial change and we are already in the merge window, I'd
postpone this for 7.2. Or, if this is the very last piece of your
whole changes, I can try to put. Let me know.


thanks,

Takashi