Last week an update arrived in PureOS with improvements for #Librem5 call audio. You should be more legible to your interlocutors during calls; also, the phone now automatically switches to external wired microphone once connected. The whole audio path went through a big overhaul, allowing for hardware volume control with zero-cross and reducing unnecessary amplification that could cause distortions.
Haven't seen people complaining about the changes so far - that's a good sign :)
@dylanvanassche Hmm, not much that would apply between various devices I'm afraid. I simply spent a lot of time with wm8962 datasheet creating mental image of every single path that's there and how can it be used. In the end it turned out that the patchwork of the UCM that we had there before did some rather questionable things, and that the codec has some handy features I wasn't aware of before :)
@dos Ah okay :) I thought you would have found some general ideas :P But still, any insights, even device specific, are great as the docs for UCM are lacking and not well understood by the community (yet). I spent already weeks on these configs for a device, but I had to generate a lot of the docs myself at pmOS: https://wiki.postmarketos.org/wiki/Alsa_UCM
@dylanvanassche Hah, that page sure would have been handy before! 🤣 L5 UCM is relatively simple though, and I think you have pretty much described everything I know about UCM there already:) Checking the source code was often helpful, like https://github.com/alsa-project/alsa-lib/blob/master/include/use-case.h#L288 - but a lot of cross-checking with PulseAudio was needed too since not everything is implemented there... (no idea how PipeWire fares in that regard)
@dos Hahahah :P Yeah PulseAudio != PipeWire, I am curious how hard things will break when @postmarketOS switches ...
@dos is it submitted upstream yet? I'd like to use it with mobian. Right now I'm using the patch that was merged upstream.
@dos I don't seem any recent changes at https://source.puri.sm/pureos/packages/alsa-ucm-conf
@praveen It's https://source.puri.sm/Librem5/librem5-base/-/tree/pureos/byzantium/default/audio/ucm2/simple-card
I'm going to send it upstream soon. If you use the one that's been merged recently you're may have issues when deploying the updated one (needing a manual reset of ALSA controls state)
@dos After updating from the recently accepted patch to your changes, I can't get microphone to work. I tried removing /var/lib/alsa/asound.state but still no mic (in control center -> sound, I can only see internal microphone and that is not showing any activity and sound recorder is not working either). Any other thing I can try?
@praveen Removing /var/lib/alsa/asound.state is not enough, it's going to be recreated on shutdown and applied back on next boot. You need to mask the entire service to get rid of it.
@dos anyway the actual problem seems to be a mistake when I was refreshing the patch. After fixing that and reinstalling, I can see the phosh drop down automatically switching when connecting and disconnecting the headphones. So thanks for your work!
@dos Has this been released to the public yet? Calls on my L5 has unfortunately regressed quite a bit since about a week or so. Incoming calls continue ringing and buzzing long after I answer a call, audio sometime routed through the speaker instead of handset and people complaining a lot about the call quality. #librem5
@dos Apart from getting this to work, I would be happy to test things to help pinpoint possible bugs. I am also planning to get a cash SIM card for my second L5, that is just now mostly resting on my desk. That way I can make L5-to-L5 calls too! :-)
@dos Do you have any insights in the #ALSA #UCM files on how to improve them? I think some technical notes would really help the #LinuxMobile community :)