2024–02–24:
Some upstreaming and Pinephone Pro modem audio
I've been working on upstreaming a bunch of patches for Pinephone (Pro):
- Pinephone
Pro camera lens control driver was sometimes returning errors during
probe – a simple timing issue, accepted upstream
- I've
pushed magnetometer driver used on Pinephone (and Pro) through
4 revisions – it looks like all issues were addressed, and will be
accepted soon (Andrey Skvortsov is also working on U-Boot change that will
detect which magnetometer is used on the particular Pinephone batch, and will
enable the appropriate one)
- Fix
for Pinephone A64 SoC's display engine blender bugs – this is a long
standing issue with A64 display engine, where you can confuse the driver into
disabling DRM planes that should be enabled if you use userspace app that uses
planes extensively. All patches passed review at first try, so it'll probably
get accepted soon, too.
- Support
for jack detection/headset buttons on Pinephone, originally by Arnaud
Ferraris – this didn't pass the initial review and needed pretty much a
complete rewrite of original patches. It will probably not pass the second round
either, because of required DT bindings changes. If I'll be forced to drop the
bindings changes, the Pinephone will need a special sound card driver, instead
of using gerneic simple-sound-card one. I'll not write one anytime soon, so this
may still need a small set of very simple patches in my kernel branch for it to
work with simple-sound-card. Anyway, I expect most of the codec changes to get
accepted.
- LED
controller for Pinephone Pro flash LED fixes – this is a simple resource
management issue, the patch got accepted
- Stuck
power key on Pinetab 2 when doing resume from suspend – similar issue to
the one on original Pinephone, the patch got accepted
- Fix
for USB host mode not working on Pinephone/Pinebook Pro and possibly elsewhere
since v6.6 – got accepted
- Add
support for higher resolution in rkisp1 driver for RK3399 (Pinephone Pro IMX258
sensor max resolution) – I got rejection on earlier version, this will
probably get accepted
- Some
audio speed playback bug related to clock unit of RK3399 (Pinephone Pro) when
switching between 44.1/48kHz sample rate – no reaction, yet
- MIPI-DSI
clock speed calculation improvements for non-burst video transmission modes
(required for Pinephone Pro panel 60Hz fix) – no reaction, yet
There are also large changes in my kernel tree branches organization starting
with orange-pi-6.8. The branches are split up differently and more finely. So
there are a lot more individual branches that make up orange-pi-6.8 integration
branch.
I support/develop for about 14 different boards in my kernel, so if you're
interested in just Pinephone you'll have much easier time just merging a subset
of branches into your own integration branch, if you don't like having other
changes I carry in my kernel tree, in your kernel build.
The orange-pi-6.8 branch now looks pretty good, and I'm already using it
regularly on some of my SBCs and on Pinebook Pro.
Pinephone Pro modem audio work
I've managed to create a setup for passing audio between modem's codec and
the main codec in the best possible quality. S/N ratio is very good (> 80dB
at the very least), and I managed to understand and get rid of sources of the
apparent distortion in the signals that I was getting before.
I've made it so both directions use differential signalling at maximum
possible signal amplitude to improve the S/N ratio. There's also no apparent
interference from the other noise going on on the PCB, according to my tests of
this setup.
I'm still working on the main codec audio routing setup to be able to connect
the modem signals to mic and earphone properly.
I'll be publishing all my findings on this, including my audio routing setup
tools for both codecs, soon. A small patch to the modem SDK will be needed. The
„patch“ is applicable over adb access to the modem.
I'll also do some testing on audio issues that may arrise after
suspend/resume cycle, because I got reports that there are problems
with that.