Open d3rpd3rpd3rp opened 1 month ago
Yep, besides the builds I make via automated jenkins available here: https://yzu.moe/android/amogus/
As for bugs, speakerphone on sofia is indeed broken. I heard something about camera but haven't had the time to check it out yet. Besides those, there are no other bugs known to my knowledge.
Yes, the bug tracker is down, I don't have much time these days to work on moto-common, so I have reclaimed some resources from my home server by removing it.
@electimon Thank you for the reply. The hardware on amogus/sofia is still very capable for light-medium usage and I'm surprised there hasn't been much interest from the community to keep it alive. Although I'm not a developer myself, I do own two sofia devices, so I could at least test bleeding-edge fixes/changes.
Do you have a guess why the speakerphone is a problem in particular? If my memory is correct, at least one custom rom got the speakerphone to work correctly, but I can't remember which one... maybe HentaiRom? I found a couple of other A13+ custom roms on the internet, but have not tested them myself.
I understand the lack of time, you've done a great job creating a foundation for future improvements, hopefully folks like @Bcrichster and @ph4n70m-404 are able to keep the progress going.
The issue lies with the Amplifier for the speaker, it is using a Cirrus Logic chip, sofiap and sofia both do. When it switches to speakerphone something within the logic in their firmware goes wrong and produces static. No custom roms based on my sources have ever had it working, I myself only got it only working once but then it broke afterwards. If I have some time later this month I'll take another look at it, but for now that is where it lies.
Do you have a Telegram? It'd probably be easier to communicate through that. If so feel free to message me, my username is @electimon.
@electimon Very interesting, your description of the speakerphone problem is the most detailed that I've seen. I suppose if the solution was simply to re-integrate the original drivers from stock, it would have been solved already? Does that suggest something more fundamental changed after A11, perhaps at the OS level? I will help in any way I can, you have to begin learning somehow :)
I understand most of the dev community uses telegram, but I haven't tried it because of the personal phone number requirement for signup. Maybe I can find a work around.
Honestly, I was thinking about trying a stock vendor +A14 GSI combo to observe behavior, the beauty of GSIs is that as long as you have a treble compatible vendor, major functionality SHOULD work. So swapping between mine and stock's should prove fruitful in terming the required difference in order to make it work.
I personally use a Google Voice number for my account. Maybe you can have some luck using VOIP numbers.
Cool. You probably already know this, but I can confirm that sofia uses the cs35I41 chip, with technical information posted by the manufacturer here. Perhaps there are other devices using this chip with working A14 drivers, I will search around to see.
Several years ago I was not able to use GVoice for Telegram registration but perhaps it works now, I'll try again.
@electimon Unsure if this is helpful, but according to the HW Device Info database, the Moto Edge 20 (berlin) uses the cs35l41 in mono configuration, and has a stock A13 image available.
Perhaps the driver in this rom can be compared to the one included in the stock sofia A11 rom for a clue as to any changes made specifically for A13.
Update: I discovered that berlin has Lineage 21 support, with an A14 repo here.
Also, I found that the Sony Xperia 10 II (pdx201) device uses both the trinket platform (SM6125) and cs35l41 audio, very much like sofia. There is an unofficial Lineage 20 repo being maintained here that has recently been updated to A14 in a fork here. I see no reports of audio issues in the xda thread, so maybe the pdx201 devs could help solve the speakerphone problem in the amogus build.
@electimon Unfortunately telegram banned my Gvoice number only a day after letting me signup with it. Quick question, forgive me if this might be obvious to you, but do the proprietary audio drivers included in amogus already come pre-compiled from the manufacturer? I see online that the source code for the CS35L41 amplifier was made available for the official linux kernel, but I wonder if the driver binaries used in amogus are identical for all motorola phones? If so, that seems to imply the problem is not due to the driver itself, but rather due to its device-specific implementation within the amogus kernel. Perhaps therefore the unique driver parameters used for the stock amogus kernel were not properly translated/implemented into the A13 & A14 kernel versions? For instance, I see that there are files called "rcv_fast_switch" and "crus_sp_rx0" that seem to be used only in motorola's source code, but not by other manufacturers.
The drivers in kernel are open source and compiled from source, motorola includes them in GPL releases. The firmware, is proprietary though. I don't think it has todo with the drivers but /vendor, which is why I suggested trying a GSI.
@electimon OK, so if I understand correctly, you want to try a GSI build of A14 to test if it will work correctly with the proprietary CS35L41 firmware on /vendor. If the GSI build is successful, then we can assume the speakerphone problem originates within the custom A14 amogus code? However, if the problem persists in GSI, then it strongly suggests the CS35L41 firmware on /vendor has a bug? If the problem is isolated to the CS35L41 firmware, can we modify it or replace it with a different version, perhaps the one used in the berlin device? I tried to extract the rom images to compare the CS35L41 differences between amogus and berlin, but every method I could find for doing this in windows failed.
[update] I found a repo of Cirrus Logic linux firmwares, and inside /cirrus there are a bunch for CS35L41. Maybe this will prove useful. These two linked below appear to be oldest/original versions before they made modifications for laptop use.
cs35l41-dsp1-spk-prot.bin cs35l41-dsp1-spk-prot.wmfw
[update 2] One last thing, I noticed that the Moto G8 Plus (doha) also uses both the trinket platform (SM6125) and CS35L41 amplifier. However, I see that you made a separate repository for it. Do you know if the speakerphone corruption also occurs on this device? I couldn't find any reference to the CS35L41 firmware in its proprietary-files.txt
@electimon I may have stumbled upon something potentially significant. My attention was first drawn to these files in the vendor folder, which only appear to be used in a select few moto roms alongside the CS35L41 firmware:
proprietary/vendor/firmware/rcv_fast_switch1.txt proprietary/vendor/firmware/rcv_fast_switch2.txt proprietary/vendor/firmware/spk_fast_switch1.txt proprietary/vendor/firmware/spk_fast_switch2.txt
These text files contain strings of numbers which look like special parameters to be used. I noticed that they came from the Moto G Pro (sofiap_ao) stock rom, according to proprietary-files-sofia.txt
However, when I compared them to those from the Moto G Power (sofia) stock A11 rom, I can see that the numbers/parameters are different!
Furthermore, I see that these files are referenced in another document related to the mixer, located in vendor/etc/mixer_paths.xml. I can't seem to find any reference to "mixer_paths.xml" in either of the amogus device or vendor repos, so perhaps it was missed and therefore the proper parameters aren't getting to the device's mixer/speakerphone?
Hopefully this helps!
@electimon I may have stumbled upon something potentially significant. My attention was first drawn to these files in the vendor folder, which only appear to be used in a select few moto roms alongside the CS35L41 firmware:
proprietary/vendor/firmware/rcv_fast_switch1.txt proprietary/vendor/firmware/rcv_fast_switch2.txt proprietary/vendor/firmware/spk_fast_switch1.txt proprietary/vendor/firmware/spk_fast_switch2.txt
These text files contain strings of numbers which look like special parameters to be used. I noticed that they came from the Moto G Pro (sofiap_ao) stock rom, according to proprietary-files-sofia.txt
However, when I compared them to those from the Moto G Power (sofia) stock A11 rom, I can see that the numbers/parameters are different!
Furthermore, I see that these files are referenced in another document related to the mixer, located in vendor/etc/mixer_paths.xml. I can't seem to find any reference to "mixer_paths.xml" in either of the amogus device or vendor repos, so perhaps it was missed and therefore the proper parameters aren't getting to the device's mixer/speakerphone?
Hopefully this helps!
Why don't you try it :P
Does that mean I'm on to something here? I would try it myself but I don't currently have my backup with me to test on. I still use the stock A11 as my daily driver phone and I can't risk bricking it.
Looks like you are one of the last ppl onto any kind of lead about the speakerphone issue. Without you trying the gsi idea, we're still at a loss..if you want a final perfect amogus build, electimon has given directions to find out..
On Mon, Aug 12, 2024, 02:14 d3rpd3rpd3rp @.***> wrote:
Does that mean I'm on to something here? I would try it myself but I don't currently have my backup with me to test on. I still use the stock A11 as my daily driver phone and I can't risk bricking it.
— Reply to this email directly, view it on GitHub https://github.com/moto-common/android_device_motorola_amogus/issues/19#issuecomment-2283179580, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACVGCY2LDQ4S47U3JSN22ITZRBHFTAVCNFSM6AAAAABMHLLPSSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBTGE3TSNJYGA . You are receiving this because you were mentioned.Message ID: @.*** com>
@electimon @Bcrichster
Alright, I was just trying to learn how everything has been modified from the original roms to better understand the present situation. Again, I'm not a programmer or a developer... just someone with a curiosity and a willingness to learn.
A final thing I noticed (but probably already known to you) is that the cirrus firmwares used in the stock sofiap_ao rom are different than the ones used in stock sofia. If only the sofiap_ao firmwares were being used for all amogus devices, perhaps a conflict arises.
As far as A14 GSI, any tips on how to install it over the stock amogus rom? I've installed a custom rom on an android device only twice ever, many years ago, so if you know of any references/explanations to help me get started I'd appreciate it.
@electimon So I installed DSU Sideloader and used the latest GSI build of LineageOS. Tested calling and speakerphone seemed to work fine. Is there something I need to look for specifically?
@electimon @Bcrichster I tried the old Feb 2023 build of AOSP 13 to see what the speakerphone bug was and can confirm that the LineageOS GSI fixed it. I also briefly tried the camera app and didn't notice any issues with it. I believe the only other bug reported on XDA was the fingerprint scanner? (not a deal breaker for me personally).
It would be so great to fix speakerphone, as I suspect that's the main issue preventing wider custom rom adoption of G8/G Power 2020. I'd like to test AOSP 14, but have never built a rom from scratch before (big learning curve ahead). Here goes nothing :)
Hello @electimon & @Bcrichster
I was wondering if there is a current list of bugs and issues for the amogus family of phones? I recall reading on xda forum that some A13+ amogus roms had various problems that were not completely solved, with camera and speakerphone for instance.
Am I correct that the only A14 rom presently being maintained is BlissRom by @Bcrichster? The Readme file for that rom doesn't currently track the changes or fixes that it incorporates.
As a owner of a G Power 2020 (sofia) phone, I greatly appreciate your work on keeping this device alive! I'm still using the stock A11 but am looking forward to trying BlissRom soon.