• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[ROM][11][OFFICIAL] LineageOS 18.1 for Mi A2

Search This thread

BealeStBluesBoy

Senior Member
Dec 15, 2012
232
223
Sorry for late reply!
I've installed just now:
  • lineage-18.1-20210911-nightly-jasmine_sprout-signed.zip
  • lineage-18.1-20210911-recovery-jasmine_sprout.img
  • Magisk 23.0
  • NikGapps-full-arm64-11-20210815-signed.zip
Without your Magisk module: deep sleep issue is present
With your Magisk module: deep sleep issue is solved

Everything else looks like to work without any issues.

I see that https://review.lineageos.org/c/LineageOS/android_device_xiaomi_lavender/+/306440 is related to another device, so we have to do a pull request for jasmine_sprout I guess.

Do you confirm that your Magisk module is using the sensors.ssc from this pull request? Or did you got it from somewhere else?

Does anyone know if there's any pull request open for this? I don't mind to try to open a PR for it using this commit as a cherry-pick for jasmine_sprout
Yes, from PL2 firmware. There's already a commit in gerrit, here:

 

devilsworkshop

Senior Member
Jun 27, 2015
132
77
Does anyone else here use GCam? What do you guys do about the weirdly low audio when recording video?
It seems that every 3rd party camera has this problem.

This has been an issue since the start, and I've been using a Magisk module from the user tokar77 at 4pda (attached).
It used to work great on LOS 17.1, but on 18.1, while it does fix the mic issue, it makes bluetooth audio completely stop working.

Hoping someone here has some suggestions, because this is the last major thing that's holding this ROM back.
 

Attachments

  • Mic_Fix_Module_R.zip
    248.8 KB · Views: 8

devilsworkshop

Senior Member
Jun 27, 2015
132
77
Is there a way to use/enable my auxiliary lens in lineage 18.1(latest)?
It's definitely possible, I remember trying some GCam mods that supported it (don't remember which ones).

But honestly, it's a waste of time, the secondary camera is completely useless - it is always much worse than the primary, in every scenario I tried.


I can confirm this too - great news!
 

Raj162002

Member
Mar 14, 2019
20
9
Colombo
It's definitely possible, I remember trying some GCam mods that supported it (don't remember which ones).

But honestly, it's a waste of time, the secondary camera is completely useless - it is always much worse than the primary, in every scenario I tried.



I can confirm this too - great news!
Some of the A2's got the blurry focus issue after some time, It is a hardware issue which didn't even get solved even after changing their lens for some.
For people like us secondary camera is the only thing that could take a decent picture.

I have tried pixel cam which was made by dise it used to work in almost all the roms that I have tried (A11). I did try using the dmgc 4.3 by the dise with his module, both of them did not work with the secondary cam. These are the only gcam mods that I know which supports to take picture using the secondary cam.
I tried editing the build prop the changes I made are changed after the reboot. It would be nice If someone can fix this problem or share me the solution if its already available.
 

MariferC

Member
Nov 2, 2017
36
44
Does anyone else here use GCam? What do you guys do about the weirdly low audio when recording video?
It seems that every 3rd party camera has this problem.

This has been an issue since the start, and I've been using a Magisk module from the user tokar77 at 4pda (attached).
It used to work great on LOS 17.1, but on 18.1, while it does fix the mic issue, it makes bluetooth audio completely stop working.

Hoping someone here has some suggestions, because this is the last major thing that's holding this ROM back.
Try the attached Magisk module, it fixes the low volume while recording and does not affect the bluetooth audio.
 

Attachments

  • MicFix_lineageos_R_MiA2.zip
    17.8 KB · Views: 26
Last edited:

devilsworkshop

Senior Member
Jun 27, 2015
132
77
Try the attached Magisk module, it fixes the low volume while recording and does not affect the bluetooth audio.
Ah, this is brilliant, thanks! Works perfectly. I really hope this fix makes it into LOS.

How did you figure out how to add those values into mixer_paths.xml? Is there any documentation that details this? I'm quite a noob when it comes to the inner workings of Android, but I'd love to learn.

Thanks again, with this fix this ROM seems to be completely functional without any bugs that I've noticed so far.
 

MariferC

Member
Nov 2, 2017
36
44
Ah, this is brilliant, thanks! Works perfectly. I really hope this fix makes it into LOS.

How did you figure out how to add those values into mixer_paths.xml? Is there any documentation that details this? I'm quite a noob when it comes to the inner workings of Android, but I'd love to learn.

Thanks again, with this fix this ROM seems to be completely functional without any bugs that I've noticed so far.
It was more trial and error than anything else, but this is what I understand.

The problem is that the camcorder mic has the noise cancellation enabled and GCam doesn't have any option to change the audio options (while other camera apps as Open Camera and Snap Camera HDR have it), so I have either disable fluence or find an acdb_id that didn´t have the noise cancellation enabled. Disabling fluence will cause echo when using the speaker during a call so is better to change the acdb_id. For that first it is necessary to grab a logcat to find what acdb_id is using while recording audio, this is the important part:

Code:
...
audio_route: Apply path: speaker-stereo-dmic-ef
...
ACDB-LOADER: ACDB -> send_audio_cal, acdb_id = 35, path = 1, app id = 0x11132, sample rate = 48000
...

The path is speaker-stereo-dmic-ef and the acdb_id is 35, so is necessary to find on /vendor/etc/audio_platform_info_intcodec.xml what is the path name that has the acdb_id 35 ... and isn't listed here, so this program is needed to find what is, and here is:
XML:
<device name="SND_DEVICE_IN_SPEAKER_DMIC_STEREO" acdb_id="35"/>

Then i have added it to the audio_platform_info_intcodec.xml file and changed it to 19 because that acdb_id is used by SND_DEVICE_IN_HANDSET_MIC and it worked! with this change everything is almost ready, the recorded audio sounds fine, the changes on the mixer_paths.xml are only for switching the channels and increase the recording volume.

sorry for my english.

These links can be very helpful: How to logcat Audio stuff from stock ROMs and How to use acdb_get & get_snd_names.
 
Last edited:

Top Liked Posts