There are indeed only two channels of (audio) digital-to-analog conversion serving both line out and headphone out. But there is some flexibility in the "mixers" inside the chip.
I had a look at the audio codec chip, mixing L+R to a mono headphone out is indeed possible.
Datasheet, "Figure 43. Playback Signal Path" shows the overview. The headphone out connects to the LHP and RHP, while MONOOUT is the ground pin of the headphone output. This is the "Capless Headphone Configuration".
Normally headphone volume is adjusted through LHPVOL and RHPVOL.
But essentially, by need to mute the LHP and RHP (bits LHPM and RHPM), configuring Mixer7, and adjusting MONOVOL, you can get there. It's a bit weird that the actual signal will be on the ground terminal of the headphone socket, and the L and R terminals virtually grounded, but I see no reason that this would not work. This is not out-of-phase mono.
I invite the community to implement this, requires working knowledge of how to twiddle bits in C++, the audio/outconfig
shows how to manipulate the registers. And keep in mind, codec register setting persist until you reset the Axoloti Core board.