Ok here are a few things I've tried:
Android image works beautifully. Audio output from HDMI and analog simultaneously.
CoreELEC-Amlogic-ng.arm-19.5-Matrix_rc1-LePotato.img.gz: run
amixer cset name='Ext Spk Switch' on
when not playing a video, then play a video to see if it outputs analog. Repeat a few times to get it to work.
On Armbian's 5.17.5-meson64 kernel: I accidentally left speaker-test running and after an hour or so it suddenly started playing analog audio (scaring the living daylights out of me in the process). Restarting speaker-test resulted in silence again. Unable to reproduce this scenario since.
Trying a brute force way, I dumped the MMIO registers for t9105 and AIU when it was working in CoreELEC and "restored" them on Armbian. Audio was still playing, but still no analog. Leading me to think this is probably a timing issue with the way things are initialized.
@TonyMac32: when you say it was working, do you remember if its mainline's implementation or Amlogic's BSP code?