No audio from earspeaker during calls (since approx. e-1.8)

Way back when I installed an OTA upgrade (to 1.8-q, I think), on the Sony XZ1 Compact, sound stopped being conducted through the earspeaker during calls. Since that upgrade, to hear anything during a call, I now have to either enable the loudspeaker or use headphones. All other audio functions (music, etc.) do transmit sound through the earspeaker. The person called from or calling to my phone cannot hear me. [EDIT: Oops… my bad. They hear me, but I don’t hear them.]

I had this problem once before in an early unofficial q build, and I fixed it by removing the SIM and using my XMPP account to make a call, after which audio started working again during calls, for both XMPP and the mobile network.

Then that later update reintroduced the malfunction and I have been unable to fix it in the same way. I also tried uninstalling my XMPP app and removing it from Calling Accounts in the dialer.

I recently wiped /e/ and installed a different custom ROM (based on Android 13) only to find that the audio problem is still there.

Others seem to have experienced the same problem: Sony xz2 compact: No sound in call since 1.8.1
(I added my issue and logcat file to that one by @Pricedspacefan , though his report concerns a different phone brand.)

I think I’ve seen a couple of other forum posts reporting a similar issue.

So does anyone have any idea what might have changed, what “bad” code or setting might have been introduced to the builds after 1.7 that could explain what’s going on with my phone and a few other models? Could it have been something in the base LineageOS build (since I have the same issue in another custom ROM)? Have I, and several other forum members, maybe done something incorrect during installation?

I’d just like to hear any ideas and suggestions. Thanks.

And wouldn’t you know… I just did a test call from the Android to my home phone, and audio is working fine again over the mobile network! (May have some issues with the XMPP number, still.) :man_shrugging:

(Reminder: this is on the other custom ROM, not /e/.)