[ROM][AOSP][4.4/6.0/7.1] Unlegacy Android Project

Search This thread
D

Deleted member 11418521

Guest
I did use that app to make the logcat easier to obtain so I can post it in here, so I can flip a switch and copy the log instead of digging thru the Zoom log looking for the time the program switched Bluetooth codecs (or tried to switch). I thought it should force the same codecs Duo or Zoom use when in a videocall. I don't know why it is such a big deal. I can redo the log with Zoom anytime...

I don't know what isn't clear really. I can't use bluetooth headsets and do videocalls with Skype/Duo/Zoom. It goes silent. That is the problem!!

And no, it isn't the 3G model and doesn't have a SIM slot. But it does have bluetooth, so VoIP/Videocall apps should work with headsets...
Hey your problem solved ???
 

hamberthm

Member
Mar 19, 2018
19
7
Moving on and getting more technical, I did a new logcat using the actual Zoom app as a test. This is the output:

Code:
05-18 12:01:10.825   537  3053 D BluetoothHeadset: startScoUsingVirtualVoiceCall()
05-18 12:01:10.828   647   919 I bt_hci_audio: set_audio_state handle:1 codec:0x1 state:3
05-18 12:01:10.828   647   919 D bt_hwcfg: hw_set_SCO_codec 0x1
05-18 12:01:10.833   647   896 I bt_hwcfg: SCO I2S interface change the sample rate to 8K
05-18 12:01:10.833   647   896 I bt_hwcfg: I2SPCM config {0x1, 0x1, 0x0, 0x1}
05-18 12:01:10.841   647   896 I bt_hwcfg: sco I2S/PCM config result 0 [0-Success, 1-Fail]
05-18 12:01:10.841   647   896 I bt_vendor: sco_audiostate_cb(status: 0)
05-18 12:01:10.894   647   919 W bt_btm  : BTM Remote does not support 3-EDR eSCO
05-18 12:01:10.916   647   930 D HeadsetStateMachine: Set NREC: 1 for device:00:11:67:BD:2B:8E
05-18 12:01:10.917   238   634 I bt_a2dp_hw: adev_set_parameters: state 5
05-18 12:01:10.917   238   634 I bt_a2dp_hw: out_set_parameters: state 5
05-18 12:01:10.917   238   634 I hash_map_utils: key: 'bt_headset_nrec' value: 'on'
05-18 12:01:10.921   238   238 I bt_a2dp_hw: adev_set_parameters: state 5
05-18 12:01:10.921   238   238 I bt_a2dp_hw: out_set_parameters: state 5
05-18 12:01:10.921   238   238 I hash_map_utils: key: 'bt_headset_name' value: 'JBL E25BT'
05-18 12:01:10.925   537   537 I Telecom : : mReceiver: HEADSET_AUDIO_STATE_CHANGED_ACTION: BM.oR@ACo
05-18 12:01:10.925   537   537 I Telecom : : ==> new state: 12: BM.oR@ACo
05-18 12:01:10.930   537   877 I Telecom : CallAudioRouteStateMachine: Message received: SWITCH_BLUETOOTH=1002, arg1=0: BM.oR->CARSM.pM_SWITCH_BLUETOOTH@ACo_0
05-18 12:01:11.892   238   317 D audio_hw_primary: select_output_device: AUDIO_DEVICE_OUT_ALL
05-18 12:01:12.065   238  4760 I audio_hw_primary: in_reconfigure_channels: config_changed 0 effect 0x0
05-18 12:01:12.069   238  4760 D audio_hw_primary: select_input_device: AUDIO_DEVICE_IN_DEFAULT
05-18 12:01:12.245   238  4760 D audio_hw_primary: select_input_device: AUDIO_DEVICE_IN_DEFAULT
05-18 12:01:12.424   238   317 D AudioFlinger: mixer(0xacc83f40) throttle end: throttle time(11)
05-18 12:01:12.506   238   317 D AudioFlinger: mixer(0xacc83f40) throttle end: throttle time(54)
05-18 12:01:12.614   238   317 D AudioFlinger: mixer(0xacc83f40) throttle end: throttle time(52)
05-18 12:01:17.955   647   919 E bt_btif : bta_dm_pm_btm_status hci_status=36

It seems like the Bluetooth driver is correctly negotiating the codecs and SCO (voice) modes. The things that caught my attention are the device selections, after the device has been set up:

05-18 12:01:11.892 238 317 D audio_hw_primary: select_output_device: AUDIO_DEVICE_OUT_ALL
05-18 12:01:12.065 238 4760 I audio_hw_primary: in_reconfigure_channels: config_changed 0 effect 0x0
05-18 12:01:12.069 238 4760 D audio_hw_primary: select_input_device: AUDIO_DEVICE_IN_DEFAULT

Reading the code from audio_hw.c, it seems to me that the functions select_output_device and select_input_device are selecting AUDIO_DEVICE_OUT_ALL and AUDIO_DEVICE_IN_DEFAULT respectively when they should be selecting AUDIO_DEVICE_OUT_ALL_SCO and AUDIO_DEVICE_IN_ALL_SCO.

I'll be posting updates as I move along. But please, if any dev can give me a hand it would be awesome, I'm a total noob on Android or anything besides knowing a little C++.
 

hamberthm

Member
Mar 19, 2018
19
7
Moving on and getting more technical, I did a new logcat using the actual Zoom app as a test. This is the output:

Code:
05-18 12:01:10.825   537  3053 D BluetoothHeadset: startScoUsingVirtualVoiceCall()
05-18 12:01:10.828   647   919 I bt_hci_audio: set_audio_state handle:1 codec:0x1 state:3
05-18 12:01:10.828   647   919 D bt_hwcfg: hw_set_SCO_codec 0x1
05-18 12:01:10.833   647   896 I bt_hwcfg: SCO I2S interface change the sample rate to 8K
05-18 12:01:10.833   647   896 I bt_hwcfg: I2SPCM config {0x1, 0x1, 0x0, 0x1}
05-18 12:01:10.841   647   896 I bt_hwcfg: sco I2S/PCM config result 0 [0-Success, 1-Fail]
05-18 12:01:10.841   647   896 I bt_vendor: sco_audiostate_cb(status: 0)
05-18 12:01:10.894   647   919 W bt_btm  : BTM Remote does not support 3-EDR eSCO
05-18 12:01:10.916   647   930 D HeadsetStateMachine: Set NREC: 1 for device:00:11:67:BD:2B:8E
05-18 12:01:10.917   238   634 I bt_a2dp_hw: adev_set_parameters: state 5
05-18 12:01:10.917   238   634 I bt_a2dp_hw: out_set_parameters: state 5
05-18 12:01:10.917   238   634 I hash_map_utils: key: 'bt_headset_nrec' value: 'on'
05-18 12:01:10.921   238   238 I bt_a2dp_hw: adev_set_parameters: state 5
05-18 12:01:10.921   238   238 I bt_a2dp_hw: out_set_parameters: state 5
05-18 12:01:10.921   238   238 I hash_map_utils: key: 'bt_headset_name' value: 'JBL E25BT'
05-18 12:01:10.925   537   537 I Telecom : : mReceiver: HEADSET_AUDIO_STATE_CHANGED_ACTION: BM.oR@ACo
05-18 12:01:10.925   537   537 I Telecom : : ==> new state: 12: BM.oR@ACo
05-18 12:01:10.930   537   877 I Telecom : CallAudioRouteStateMachine: Message received: SWITCH_BLUETOOTH=1002, arg1=0: BM.oR->CARSM.pM_SWITCH_BLUETOOTH@ACo_0
05-18 12:01:11.892   238   317 D audio_hw_primary: select_output_device: AUDIO_DEVICE_OUT_ALL
05-18 12:01:12.065   238  4760 I audio_hw_primary: in_reconfigure_channels: config_changed 0 effect 0x0
05-18 12:01:12.069   238  4760 D audio_hw_primary: select_input_device: AUDIO_DEVICE_IN_DEFAULT
05-18 12:01:12.245   238  4760 D audio_hw_primary: select_input_device: AUDIO_DEVICE_IN_DEFAULT
05-18 12:01:12.424   238   317 D AudioFlinger: mixer(0xacc83f40) throttle end: throttle time(11)
05-18 12:01:12.506   238   317 D AudioFlinger: mixer(0xacc83f40) throttle end: throttle time(54)
05-18 12:01:12.614   238   317 D AudioFlinger: mixer(0xacc83f40) throttle end: throttle time(52)
05-18 12:01:17.955   647   919 E bt_btif : bta_dm_pm_btm_status hci_status=36

It seems like the Bluetooth driver is correctly negotiating the codecs and SCO (voice) modes. The things that caught my attention are the device selections, after the device has been set up:

05-18 12:01:11.892 238 317 D audio_hw_primary: select_output_device: AUDIO_DEVICE_OUT_ALL
05-18 12:01:12.065 238 4760 I audio_hw_primary: in_reconfigure_channels: config_changed 0 effect 0x0
05-18 12:01:12.069 238 4760 D audio_hw_primary: select_input_device: AUDIO_DEVICE_IN_DEFAULT

Reading the code from audio_hw.c, it seems to me that the functions select_output_device and select_input_device are selecting AUDIO_DEVICE_OUT_ALL and AUDIO_DEVICE_IN_DEFAULT respectively when they should be selecting AUDIO_DEVICE_OUT_ALL_SCO and AUDIO_DEVICE_IN_ALL_SCO.

I'll be posting updates as I move along. But please, if any dev can give me a hand it would be awesome, I'm a total noob on Android or anything besides knowing a little C++.

Just a little update, I spent the last week and a half setting up a build enviroment and debugging the damn thing. Android is totally a first for me. The bug is not solved yet, but I did fix another one and identified even one more:

- Debug messages from select_output_device and select_input_device turned out to be misleading but OK. Problem was the device being selected is defines as 0x20 (AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET) and it was not falling into the switch category for AUDIO_DEVICE_IN_ALL_SCO. This was no problem as it was simply giving out log messages, the device still is being correcly passed to select_devices.

- The select_devices function is where most of the problems were:

- In some point, function do_input_standby was modified to select device 0x0 (AUDIO_DEVICE_NONE). This causes problems in select_devices because some logic operations it performs where affected by the 0 value, causing it to select one or more wrong devices from the devices structs, making wrong and multiple audio routes.

- Another bug is that, for some reason, OUT and IN devices having the same integer indentifiers where being selected at the same time. For example AUDIO_DEVICE_OUT_WIRED_HEADSET with identifier 0x4 was being selected in conjunction with it´s input cousin AUDIO_DEVICE_IN_BUILTIN_MIC, also 0x4 (but with the input bit turned on).

--------------------------------------------

After solving these issues (sorta, not finished yet), I managed to get the code to finally select the SCO-OUT and SCO-IN routes defined in the XML files for TinyHAL. Unfortunately, this didn't solve the issue as I can´t still hear or transmit anything in SCO mode.

I'm currently checking the routes being used, wich requires me to read and understand how the WM1811 chip works and how it routes digital audio through it´s interfaces, that will take me a while. Any help will as always be appreciated.

No errors from the CODEC driver are being recorded in the kernel log buffer.

Will keep you updated.
 
  • Like
Reactions: barbe31
D

Deleted member 11418521

Guest
I purchased used P5110.
I am waiting for it to arrive.

So I downloaded everything for flashing, just missing the drivers.
Well here's a method I used to install Twrp ithout pc (as I don't have one)
Steps :
1. Install kingroot app https://www.google.com/url?sa=t&sou...8QFnoECAoQAg&usg=AOvVaw08IdWmZolO3SZWL3pJFTD5
2. Launch it and root your device.
3. Once done, go to Play Store and install twrp app https://www.google.com/url?sa=t&sou...5YQBegQIBBAC&usg=AOvVaw2WG5uYHXdE5Q1o_w-oNw7h
4. Lanch it, select your device, download twrp.
5. Done.
 

bojan.1995

Senior Member
Aug 31, 2013
146
10
Well here's a method I used to install Twrp ithout pc (as I don't have one)
Steps :
1. Install kingroot app https://www.google.com/url?sa=t&sou...8QFnoECAoQAg&usg=AOvVaw08IdWmZolO3SZWL3pJFTD5
2. Launch it and root your device.
3. Once done, go to Play Store and install twrp app https://www.google.com/url?sa=t&sou...5YQBegQIBBAC&usg=AOvVaw2WG5uYHXdE5Q1o_w-oNw7h
4. Lanch it, select your device, download twrp.
5. Done.
Thank you!
Can you tell me Original charger voltage?
 
Last edited:
D

Deleted member 11418521

Guest
Thank you!
Can you tell me Original charger voltage?

MODEL : ETA P11XBI
INPUT : 150-300VAC 50-60Hz 0.35A
OUTPUT : 5V 2A
MADE IN CHINA
IMG_20210706_175950_468.JPG
 
  • Like
Reactions: bojan.1995

juansan10

Senior Member
Dec 28, 2016
106
40
Hello, I installed the AOSP 7.1 version and it did not work on my Samsung Tab 2 of 10.1" P5110, I left it for a while and it would not start the rom, it stayed in the Android logo and from there it did not happen.
Do you know if the AOSP 6.1 version would work well for that tablet or is this rom not compatible with my 10.1 "tablet?
Greetings
 
D

Deleted member 11418521

Guest
Hello, I installed the AOSP 7.1 version and it did not work on my Samsung Tab 2 of 10.1" P5110, I left it for a while and it would not start the rom, it stayed in the Android logo and from there it did not happen.
Do you know if the AOSP 6.1 version would work well for that tablet or is this rom not compatible with my 10.1 "tablet?
Greetings
This rom is compatible with your tablet. And so is AOSP 6.1. It should work well as it's android 6 (and most android 6 roms are stable). Maybe you didn't follow the correct instructions while installing the rom ??????
 

juansan10

Senior Member
Dec 28, 2016
106
40
This rom is compatible with your tablet. And so is AOSP 6.1. It should work well as it's android 6 (and most android 6 roms are stable). Maybe you didn't follow the correct instructions while installing the rom ??????
Hello, maybe I did something wrong or I did not install it with the proper recovery, I did it with the TWRP 3.4.0 and I did not install the Gapps, perhaps it is for some reason of these. I have finished installing the Rom Slim Dhollmen and everything seems to be going very well, thanks for responding.
Regards
 
Last edited:
D

Deleted member 11418521

Guest
Hello, maybe I did something wrong or I did not install it with the proper recovery, I did it with the TWRP 3.4.0 and I did not install the Gapps, perhaps it is for some reason of these. I have finished installing the Slim Dhollmen and everything seems to be going very well, thanks for responding. All the best
TWRP 3.4 was developed in 2020 and the rom was made earlier so 3.4 version won't install older roms. Use TWRP 3.1 OR 3.2.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 81
    The Unlegacy-Android Project​
    Introduction
    Unlegacy-Android started out as the OMAP4-AOSP Project. It was created in late 2015 in order to maintain a clean and organized place for pure AOSP support for various OMAP4 devices, such as the Galaxy Nexus and the Samsung Galaxy Tab 2 series. Over time this evolved to support more than just these devices, but still maintains its roots of supporting "legacy" devices that no longer receive "official" updates: hence Unlegacy-Android was born.

    Installation
    It's important that /system needs to be unmounted before installing the ROM - some recoveries tend to leave it mounted after performing operations on it.

    If you're planning to install GApps, be sure to read the second post!

    Aside from these, installation and upgrading is no different than on other ROMs. As usual, 'espresso' goes for all non-3g versions, 'espresso3g' goes for all 3g versions.

    Problems
    - Occasional sound stuttering in some games
    - No hwrotation (meaning the boot animation is landscape on p31xx). I don't consider this as a problem, as autorotation will take effect after bootup anyways... and most 7" tablets, like the Nexus 7 work this way as well.
    - The 7.1 builds are experimental! Means: modem not working perfectly yet.

    If you notice anything else, be sure to report it in this thread. While I'm kind of busy, I usually read the thread and acknowledge the bug reports, even if I don't reply directly to them.

    Downloads
    See: http://builds.unlegacy-android.org
    Always use the latest TWRP, to flash Android 7.x, you must use TWRP 3.0.3-0 or newer.

    Features?
    There isn't much to say here - this is AOSP, if you install GApps, you pretty much get the same thing that's running on the Nexus devices. The aim of this project is to create a fast and stable ROM - although, one could use Xposed to add extra features.

    As usual, feedback is appreciated :)

    Want to support development? You can consider donating, I spent countless of hours with this :)

    XDA:DevDB Information
    Unlegacy Android Project, ROM for the Samsung Galaxy Tab 2

    Contributors
    Ziyan, Android-Andi
    Source Code: https://github.com/Unlegacy-Android

    ROM OS Version: 7.x Nougat
    ROM Firmware Required: The latest bootloader for your device.

    Version Information
    Status: Beta
    Current Stable Version: 4.4, 6.0

    Created 2016-07-03
    Last Updated 2017-10-22
    30
    GApps
    If you want to install GApps, we recommend Open GApps Nano or BaNkS GApps.

    An important note: as this is a pure AOSP ROM, installing GApps tends to be problematic: in order to try to avoid installation issues, be sure to install GApps immediately after installing the ROM, before booting the system for the first time. After the initial bootup finished, be sure to go into Settings -> Apps, and grant every permission to every Google application - most importantly, Google Play services.
    In the case of an upgrade, be sure to re-install the GApps package, as upgrading wipes /system. You shouldn't need to re-set the permissions afterwards.

    One more note. DO NOT set up your Google account until you grant all permissions, otherwise you will be stuck on the initial setup.

    Rooting
    You can flash either the latest SuperSU or OpenSource SuperUser to get rooted.
    25
    Good news: Bluetooth is now fixed as well, the 0119 nightly will include both the Bluetooth and audio fixes :)
    22
    The audio on only one speaker/headphone issue is now fixed, the fix is included in tomorrow's nightly :) next is bluetooth.
    21
    I completely forgot to show this off!
    View attachment 3862027