Thanks for your reply, Vladimir.
The uC is an ATMega8, but I was planning to feed it from a 4094 I could probably use uC port pins directly if there was a major advantage.
I have used a port pin in the past to mute audio in the past but it was important, IIRC, that the peak audio voltage never exceeded Vcc or below
0V to avoid clipping. This was using a AT1200, so more modern chips might behave differently.
Small clicks and THD of 0.1% won't be a problem.
Won't that only be capable of a minimum gain of 1? Maybe I'm not understanding what you are suggesting.
Ideally, I want a gain range of 0 to 1, but can work with a different maximum.