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

[ROM][OFFICIAL] LineageOS 18.1 - Xiaomi Mi 8

Search This thread

najabi

Senior Member
Jan 14, 2018
249
86
45
Bilbao
I'd like to report that, as much as I love Lineage 18.1 on my dipper, it still lacks (as well as Pixel Experience as of now) some important audio features from MIUI that I haven't been able to debug here:

1) Mic audio recording in stereo: Los default Recorder does it in WAV mono, while Miui records in stereo with both front and back microphones. I've tried installing third party stereo recording apps like Sony Recorder but it doesn't work.

2) Direct PCM out and Compressed Offload, at native samplerate (i.e: 44.1). They don't work, only deep buffer and 48 Khz resampling by Android Mixer even in dedicated players like Neutron and PoweAmp using Hi-Res driver (direct_pcm). MXPlayer in MIUI with HW decoder worked in compressed_offload mode using internal dsp decoder with native 44.1 khz out, using less battery, but in Los it uses deep_buffer and 48 khz resampler.
I have tried using miui audio_policy_configuration.xml and other audio config files to no avail.
I have used dumpsys media.audio_flinger from adb to test actual output.

As I say, it's not just a Los thing but latest PixelExperience 11 aswell.

It's a pity, but I have to go back to Miui since these are important feautures to me.
I wish infrag could implement this in the future. Meanwhile, I offer to help debug them. Thanks to infrag for maintaining Los on our dipper so far.
 
Last edited:

ALGOPOP

Member
Feb 27, 2010
44
28
I have a strange Problem. I sometimes get the a Popup that asks me to choose my Sim Card i want to use for Data Connection. After i choose one i get a Notification that my SIM Cards have changed. I already replaced one SIM that was a little older but did not help.

Also, when i reboot my phone, on both SIMs Data is "off" an i have to turn it on manually

Has anyone experienced something like this?

Edit: Log is attached...
InkedScreenshot_20211021-092458_Einstellungen_LI.jpg
InkedScreenshot_20211021-092450_Einstellungen_LI.jpg

EDIT
 

Attachments

  • logcat.zip
    152.8 KB · Views: 0
Last edited:
  • Like
Reactions: laserkater

laserkater

Senior Member
Sep 3, 2015
68
32
I have a strange Problem. I sometimes get the a Popup that asks me to choose my Sim Card i want to use for Data Connection. After i choose one i get a Notification that my SIM Cards have changed. I already replaced one SIM that was a little older but did not help.

Also, when i reboot my phone, on both SIMs Data is "off" an i have to turn it on manually

Has anyone experienced something like this?

Edit: Log is attached...
I have the same, also in Germany! I always assumed it had to do with my dipper being in contact with water many months ago.

I don't have the problem you experience after rebooting, though.
 

G A S T

Senior Member
Apr 20, 2018
220
97
Xiaomi Mi 4
Samsung Galaxy S6
Which Operator are you using?
Telekom, Vodafone, Telefonica o2?
Occurred the SIM error too when you swichted SIMs vice versa (if you did)?

Im using my device only in single SIM mode, so I can't test it myself.
 

ALGOPOP

Member
Feb 27, 2010
44
28
Which Operator are you using?
Telekom, Vodafone, Telefonica o2?
Occurred the SIM error too when you swichted SIMs vice versa (if you did)?

Im using my device only in single SIM mode, so I can't test it myself.
I have 2 Telekom Simcards. I already swapped the 2 cards but didn't help. The Problem appears quite random. On some days i have it almost every hour and then its gone for days.
 

hein-bloed

New member
Oct 29, 2021
1
0
LineageOS from Oct 28 is not installed by TWRP for me. It just boots to recovery but does not autoupdate. I updated now to Oct 21, this one works flawless.
 

najabi

Senior Member
Jan 14, 2018
249
86
45
Bilbao
Hi @infrag

Regarding my previous post below about internal dsp audio decoding, some kernel developer from PixelExperience has given me a clue:

He inspected this logcat from my MIUI and has told me it is related to AudioPolicyManagerCustom function and libaudiopolicymanager, which is code from CAF that Qualcomm integrates into a/v framework in AOSP code. He says one should merge Qc caf code into the rom and change properties, code to support offload calls to dsp. He says one should build a custom rom and once it works and does not break compatibility with other devices upload to gerrit.

This is Qualcomm av framework caf:
https://source.codeaurora.org/quic/la/platform/frameworks/av/

Would you look into it?

Here is my logcat:
https://katb.in/ulusixafoke
Relevant data is from last 10 seconds where I start compress_offload playback on MIUI of a 44.1 mp3 for a few seconds and stop.

I'd like to report that, as much as I love Lineage 18.1 on my dipper, it still lacks (as well as Pixel Experience as of now) some important audio features from MIUI that I haven't been able to debug here:

1) Mic audio recording in stereo: Los default Recorder does it in WAV mono, while Miui records in stereo with both front and back microphones. I've tried installing third party stereo recording apps like Sony Recorder but it doesn't work.

2) Direct PCM out and Compressed Offload, at native samplerate (i.e: 44.1). They don't work, only deep buffer and 48 Khz resampling by Android Mixer even in dedicated players like Neutron and PoweAmp using Hi-Res driver (direct_pcm). MXPlayer in MIUI with HW decoder worked in compressed_offload mode using internal dsp decoder with native 44.1 khz out, using less battery, but in Los it uses deep_buffer and 48 khz resampler.
I have tried using miui audio_policy_configuration.xml and other audio config files to no avail.
I have used dumpsys media.audio_flinger from adb to test actual output.

As I say, it's not just a Los thing but latest PixelExperience 11 aswell.

It's a pity, but I have to go back to Miui since these are important feautures to me.
I wish infrag could implement this in the future. Meanwhile, I offer to help debug them. Thanks to infrag for maintaining Los on our dipper so far.
 
Last edited:

najabi

Senior Member
Jan 14, 2018
249
86
45
Bilbao
@najabi
Did you try another kernel.?
Yes, but it's not about the kernel, otherwise the guy who builds the kernel for polaris on PE would have fixed it.
It deals with android audio server configuration, which is in the av framework part of the AOSP rom, not the kernel. Qualcomm provides on Caf its value added code to use its digital sound processor within Snapdragon 845 to offload audio decoding to hardware (in dedicated apps) and avoid android's default mixer that resamples everything to 48 KHz losing quality. That is implemented in MIUI but I wish it was done on custom roms aswell.
I can't do it since I am not proficient building android but I hope infrag can do it.
 

Cooper A

Senior Member
Aug 26, 2015
85
20
I still have the problem with QS pulling down gesture bc of the cutout (not sensig pulling down if I start it above the sensitive area). Will it be ever fixed? Or it is not a common issue?
I have read on the github some similar problem but nobody complain about it here.
Do you have this issue?
I had to change back to miui bc with this bug LOS is useless.
 

najabi

Senior Member
Jan 14, 2018
249
86
45
Bilbao
Seriously. The point of using a custom rom is to have a lighter os, more secure and updated code, but adapting all hardware functionality. I paid 400€ three years ago to have a top performing phone with good sound chip, and this phone does sound good. I have 300€ headphones that sound great out of this phone. Almost as good as my desktop amp. And Android provides a sound server, Audioflinger which can offload mp3/flac/vorbis/aac/wav decoding bypassing Android software mixer and resampler, if you listen to 44.1 Khz music, which is 99% of all mp3, as well as spotify and streaming services (except youtube on opus codec). If you switch offload and android mixer on your phone, you will find out it sounds better.

As much as other hardware of this phone is configured to this rom and tree to make it work, like gps, sensors, speaker, touchscreen.. using binary blobs/drivers and updating caf and linux code in the kernel, Qualcomm provides some av-framework code into the rom that Xiaomi adapts to route offload and direct-pcm out, that I'd like to be ported to a custom rom like Los.

The difficulty with this Qualcomm Caf patch, according to a kernel developer, is that if you patch it directly it may break compatibility with other devices in the rom repository. But a rom maintainer may build a local rom and if it works it could be merged upstream serving other devices aswell. However neither Los or PE has made it yet, so it must be hard.

I am using MIUI actually and it does give me the same performance and battery level as custom roms, I run it tweaked with many xiaomi packages disabled so it runs fast and low memory usage, but I'd like to move to Los in the future, because I prefer a light customised rom.
 
Last edited:
  • Like
Reactions: fidows

urigg

Member
Sep 29, 2017
30
16
I still have the problem with QS pulling down gesture bc of the cutout (not sensig pulling down if I start it above the sensitive area). Will it be ever fixed? Or it is not a common issue?
I'm seeing this too, though I'm still on the 1014 build.

To add a detail: Pulling down the status bar works left and right of the notch in regular mode. However, I usually have the cut-out disabled on my phone completely in developer settings, so I have a full status bar below. In this mode, the pull down only works in the center, and not left and right of the notch.

In double-size status bar mode, pull down works everywhere.
 

fidows

Senior Member
Jun 29, 2013
160
13
Xiaomi Mi 8
Seriously. The point of using a custom rom is to have a lighter os, more secure and updated code, but adapting all hardware functionality. I paid 400€ three years ago to have a top performing phone with good sound chip, and this phone does sound good. I have 300€ headphones that sound great out of this phone. Almost as good as my desktop amp. And Android provides a sound server, Audioflinger which can offload mp3/flac/vorbis/aac/wav decoding bypassing Android software mixer and resampler, if you listen to 44.1 Khz music, which is 99% of all mp3, as well as spotify and streaming services (except youtube on opus codec). If you switch offload and android mixer on your phone, you will find out it sounds better.

As much as other hardware of this phone is configured to this rom and tree to make it work, like gps, sensors, speaker, touchscreen.. using binary blobs/drivers and updating caf and linux code in the kernel, Qualcomm provides some av-framework code into the rom that Xiaomi adapts to route offload and direct-pcm out, that I'd like to be ported to a custom rom like Los.

The difficulty with this Qualcomm Caf patch, according to a kernel developer, is that if you patch it directly it may break compatibility with other devices in the rom repository. But a rom maintainer may build a local rom and if it works it could be merged upstream serving other devices aswell. However neither Los or PE has made it yet, so it must be hard.

I am using MIUI actually and it does give me the same performance and battery level as custom roms, I run it tweaked with many xiaomi packages disabled so it runs fast and low memory usage, but I'd like to move to Los in the future, because I prefer a light customised rom.
What version of miui you using now?
 

120503

Member
May 3, 2012
6
1
Recently I installed Los 16.0 and 17.1 on my Mi8. When I charge the phone with the original charger, it always disconnects every few seconds and doesn't charge. But when the phone was connected to PC and slow charged, the issue doesn't show up. Today I installed lineage-18.1-20211104-nightly-dipper-signed.zip, charging is normal.
 

G A S T

Senior Member
Apr 20, 2018
220
97
Xiaomi Mi 4
Samsung Galaxy S6
Recently I installed Los 16.0 and 17.1 on my Mi8. When I charge the phone with the original charger, it always disconnects every few seconds and doesn't charge. But when the phone was connected to PC and slow charged, the issue doesn't show up. Today I installed lineage-18.1-20211104-nightly-dipper-signed.zip, charging is normal.
If it wasn't you'd have read about it somewhere here in the thread... 🙂
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Seriously. The point of using a custom rom is to have a lighter os, more secure and updated code, but adapting all hardware functionality. I paid 400€ three years ago to have a top performing phone with good sound chip, and this phone does sound good. I have 300€ headphones that sound great out of this phone. Almost as good as my desktop amp. And Android provides a sound server, Audioflinger which can offload mp3/flac/vorbis/aac/wav decoding bypassing Android software mixer and resampler, if you listen to 44.1 Khz music, which is 99% of all mp3, as well as spotify and streaming services (except youtube on opus codec). If you switch offload and android mixer on your phone, you will find out it sounds better.

    As much as other hardware of this phone is configured to this rom and tree to make it work, like gps, sensors, speaker, touchscreen.. using binary blobs/drivers and updating caf and linux code in the kernel, Qualcomm provides some av-framework code into the rom that Xiaomi adapts to route offload and direct-pcm out, that I'd like to be ported to a custom rom like Los.

    The difficulty with this Qualcomm Caf patch, according to a kernel developer, is that if you patch it directly it may break compatibility with other devices in the rom repository. But a rom maintainer may build a local rom and if it works it could be merged upstream serving other devices aswell. However neither Los or PE has made it yet, so it must be hard.

    I am using MIUI actually and it does give me the same performance and battery level as custom roms, I run it tweaked with many xiaomi packages disabled so it runs fast and low memory usage, but I'd like to move to Los in the future, because I prefer a light customised rom.
    1
    I have trouble installing LineageOS rom. I tried multiple builds. I even tried a different rom PixelExperience.

    I wiped Dalvik/Cache/System/Data. and installed latest Xiaomi firmware, latest TWRP 3.5.2_9

    When I reboot, it doesn't even show boot animation. It shows MI logo, blanked once and reboot to TWRP.

    The only rom that work is the xiaomi official rom.

    Any clue what step am I missing? Thanks.

    "Important notes:
    * Required * firmware version must be based on MIUI *-based builds.
    Formatting data (all user data is wiped, including internal storage) is a must if MIUI was previously installed and device was encrypted."

    Formatting data.
    Not only wipe.
    1
    Has anyone ever installed @infrag 's kernel over LOS 18.1 official successfully? I've just moved from unofficial to official (to get security patches). I don't want root but do want Gpay and banking so need to hide the open bootloader, hence want to use the unofficial kernel (boot.img) linked in #1. If, however, I flash it to the /boot partition using official TWRP, the device doesn't boot but stalls at the mi logo. Boots ok with official kernel. What am I missing?
    Sorry havent updated kernel in a while.
    Can do a new build soon.
  • 70
    https%3A%2F%2Fimg.xda-cdn.com%2Fy-LtXHGCDBH0KxFw9MxWAPF3guk%3D%2Fhttp%253A%252F%252Fi.imgur.com%252F2okPze5.png

    LineageOS is a free, community built, aftermarket firmware distribution of Android 10, which is designed to increase performance and reliability over stock Android for your device.

    LineageOS is based on the Android Open Source Project with extra contributions from many people within the Android community. It can be used without any need to have any Google application installed. You will need to provide your own Google Applications package (gapps). LineageOS does still include various hardware-specific code, which is also slowly being open-sourced anyway.

    Base source code is available in the LineageOS Github repo. And if you would like to contribute to the project, please visit our Gerrit Code Review.

    GPL compliance:


    Device tree source code: LineageOS/android_device_xiaomi_dipper
    Kernel source code: https://github.com/LineageOS/android_kernel_xiaomi_sdm845




    Compatibility:
    Compatible with Xiaomi Mi 8
    Builds are based off the Xiaomi's Android 10 firmware.
    Downloads:
    Official download links: https://download.lineageos.org/dipper

    Lineage 18.1 Kernels:
    15/06/2021

    Lineage 18.1 Unofficial builds:

    Build 15/06/2021



    Recommended firmware is latest MIUI stable firmware.



    Notice:
    No custom kernels are supported in this thread. Only stock kernel and official builds will be supported. No bug reports if that's not the case.

    Installation:
    Reboot to recovery (TWRP recovery for Mi 8)
    Format /system, /data and /cache
    Install MIUI firmware
    Install LineageOS zip package
    Install [optional] a Google Apps package of your choice

    Important notes:
    * Required * firmware version must be based on MIUI *-based builds.
    Formatting data (all user data is wiped, including internal storage) is a must if MIUI was previously installed and device was encrypted.

    All LineageOS team would like to thank everyone involved in helping with testing, coding, debugging & documenting! Enjoy!
    19
    so the newest build 04/11/2019 uses Xiaomi Q blobs.
    Therefore it has some bugs:
    I havent got bluetooth audio working yet. Bluetooth calls seem to work fine though.
    Sound: Speaker works if you make a phone call first and switch to speaker during the call. After that everything else starts working.
    Edit: fixed. - GPS all satellites should show up now.
    Android Auto fixes probably havent been added yet to lineage but when anything shows up I'll add it.

    The reason this build took so long to be released is that Q radio blobs kept causing a reboot when data was used and switched to low power mode. I believe I have fixed this.


    https://drive.google.com/open?id=1bhurP2zIyZf93jJzSN1IBbiMBhmbSd_h

    Edit: Uploaded the correct build now. Also added in gps fix
    17
    Also fyi I'd hoped to have anther build up by now but since lineage has changed to 17.1 branches instead of 17.0 my build system is a bit of a mess. Waiting for all the repos to be updated to 17.1 before releasing anything. Hopefully it wont be too long...
    15
    18/12/2019 finally a working q build with q blobs and working audio.
    havent tested it a lot so any bugs let me know. There will be a v2 of the audio fix/change. This fix was just to make it work. :)
    14
    new build in OP.
    For android auto users unless I say otherwise I have not fixed your problem yet. :|