It just works… and looks good… and you have choice. ![]()
I have a new fp5, still running stock android, but I also want to install postmarketOS in the future.
There appears to be some debugging process with the audio driver now:
The issue with the mainline aw88261 is a kernel crash (null pointer) during playback.
Xiaomi Pad 6 uses the same driver and has working audio; hence, it is concluded that the problem is the qcom soc driver and not the aw88261 driver. “Qualcomm chips have a complex routing infrastructure that allows different parts of the SoC to communicate.”
The info also says that there is also the info that there is a downstream android driver that seems to work with mainline linux too, though with very low sound. The author (cosmo) admits that they had not tried it out though. But the code quality would be “hellish”. No link is given to support this.
I think I found both implementations of the AW88261 driver in the mainline kernel and the LineageOS kernel source (“downstream”):
mainline:
sound/soc/codecs/aw88261.c
downstream:
What you can notice is that the mainline driver is one *.c file with around 1000 lines, whereas the downstream driver is eight *.c files, each more than 1000 lines.
With all that info, I still don’t know what exactly the issue is, but I suspect that the mainline driver for the AW88261 is simply incomplete. The Xiaomi Pad 6 is a tablet without cellular network or phone call support, which might be the reason why the much simpler hardware configuration works with an only partly implemented driver.
Don’t get me wrong, I am not an expert in any way here, just blatantly guessing.
According to the schematics (I cannot thank Fairphone enough for publishing them!), Fairphone 4 uses AW88264A, and Fairphone 5 the AW88261FCR. Both covered by the same aw882xx driver in android. And yes, it would be great to get audio in postmarketOS for both fp4 and fp5.
Apart from Qualcom, has anyone tried to contact Awinic? Weidong Wang, who submitted the mainline driver (only for aw28861, not for aw88264) in August 2023, seems to be quite active: Making sure you're not a bot!
Edit: The android driver for the fp4 is also called aw882xx, though the code seems to be older:
This is looking promising, hopefully someone with a massive IQ (not me) can get their heads around this issue.
love to all. x
I am not sure if IQ is the biggest issue, know-how about audio drivers in the linux kernel, about audio drivers in android, and about the Qualcomm architecture. And then you need a lot of time to debug the issue and read through documentations, some parts of the Awinics documentation are in Chinese only. And you need even more time to find a solution.
Sorry, I am new to this community and my earlier comments might not been that great.
Anyway, the missing audio amplifier support might not be a showstopper, because any USB or Bluetooth headset should work.
The real showstopper is the call audio support. So we are back to Qualcomm… But there is hope and also some money, see this recent blogpost I found by searching the internet:
I’m writing this just to put things into perspective for folks looking up why things/sound don’t work in pmos/oss linux. As is should or as it might.
First thing first: a qualcom (and any other) mobile phone soc dsp is not the average rtl alcxxx sound chip.
IMHO, in recent socs, things got guite out of hand in respect to complexity and the dsp side of a phone soc is a nightmarish maze of pipes and hoses.
Also, the chip manufacturers do not publish much or any docs on the subject because they regard it as very sensitive information. Reasons I won’t detail here as it’s not the place for such discussions.
But, one big reason things don’t work much is that very few people are even remotely interested in a gnu/linux phone and even fewer work on it.
That in respect to the numbers of people being happy with stock/oem.
On the other hand, I am personally amazed how far things got and I got a fresh new kick into digging my hands deep under these chips’ hoods.