[HELP] Giving bluedroid support to rom for galaxy music - Samsung Galaxy Music

Hi! I don't know where to start but I need some help.
I develop for the Samsung Galaxy Music (GT-S6010/L/12) and it had stock 4.1, and I've built cm 10.1 and cm 11.0
Well, the problem is that I haven't been able to fix bluetooth for months so that's why I'm asking for help. I will try to give as much information as possible.
So I suppose the main problem is the change of the bluetooth stack from bluez to bluedroid that made the problems. Actually on cm 10.1 and cm 11.0, I can get bluetooth activated but will face issues trying to send or receive files, so it's practically not working :-/
The device uses the broadcom bcm21654 chip and for wireless I think it uses the bcm4334
So the only fixed I've tried is apply this commits into the kernel:
https://github.com/pawitp/android_k...mmit/db7edee95ba440e9c19439e43bb0464a0c1ea382
https://github.com/pawitp/android_k...mmit/23d47cdd2d415836b2d4d1eccbf6dc622bf8dbd6
And apply this to the source (for cm 10.1) or this (for cm 11.0)
Those fixes works for the Galaxy Pocket Neo and Galaxy Grand Duos, BUT, for my device, by just enabling CONFIG_BCM_BT_LPM in the kernel's defconfig, makes the phone to freeze when activating bluetooth:crying: I've already taken logcats and kmsg but they don't seem to be pretty usefull
Here is the kmsg at the moment of freezing (full avaible here):
Code:
<6>[ 160.767547] AUDCTRL_SetAudioMode_ForMusicPlayback mode 4, pathID 1
<6>[ 160.767547] AUDDRV_SetAudioMode_Speaker mode=4, app 2, pathID 1
<6>[ 160.767578] AUDDRV_SetAudioMode_Speaker: mixOutGain 0xfffffe0c, mixOutGainR 0xfffffe0c, mixBitSel 5, mixBitSelR 5
<6>[ 160.767608] AUDDRV_SetAudioMode_Speaker pathID 1 outChnl 0x8 inChnl 0xc0
<6>[ 160.767608] mixInGain 0x0, mixInGainR 0x0
<6>[ 160.767639] AUDDRV_SetAudioMode_Speaker pathID 1 outChnl 0x4 inChnl 0xc0
<6>[ 160.767639] mixInGain 0x0, mixInGainR 0x0
<6>[ 160.767669] setExternAudioGain mode 4, app 2
<6>[ 160.767669] extern_ihf_set_gain gain_mB=400, pmu_gain_enum=0x3f
<6>[ 160.768096] org_suspendedPowerOnAMP 0 suspendedAmpUse 4
<6>[ 161.077636] bcm_bt_rfkill_setpower: blocked Low [POWER_OFF]
<6>[ 161.090850] bcm_bt_rfkill_setpower: unblocked High [POWER ON]
I've already tried many things but with no success. Does porting bluez to cm 10.1 and cm 11 is an option?
Also I want to make clear that I'm not an experienced developer, I'm just a high school student with nearly 17 years old, so I don't know too much about coding or solving this kind of problems, any help is appreciated.
Also, the device tree and kernel source are avaible on my github

Related

[ROMS][SGH-T679]Mass CM Thread

Hello, i decided to make a thread for a ton of CM mostly stock builds. Im going to be updateing these builds every so often. Except maybe 10.1 as development as far as the Cyanogenmod team goes has come to a very slow pace.(As its close to its final stages)
Credits for the ability to have these roms goes to Arco, ADC Team. Camcory. And all the other devs for our device and others. And of course the Cyanogenmod Team and the entire community.
All standards apply...if you phone blows up not my fault. If your cat eats your phone because the cyanogenmod boot animation looks tasty not my fault. Flash these like any other rom... my cwm from other thread will work fine.
Also response to this thread will be limited as its just a pile of roms. Not gonna try and go through dev talk about a billion roms all in the same place. feel free to talk about the roms all you want and ill try my best. If i miss anything feel free to PM me and ill try to address whatever the situation may be.
Also these are not ment to be replacements to anyone elses rom but instead just updated builds. And/or builds i use or have used personally. Kernel source 1 Kernel source 2 Kernel source 3
androidfilehost
CM10.1 : ION/PMEM
GAPPS:
Mirror 1
ROM 12-21-13:
Changes:
Sync CM sources
Mirror 1
CM10.2 : ION/PMEM!
GAPPS:
Mirror 1
ROM 8-3-13:
Changes:
Sync CM sources
Mirror 1*Broken Link editing note*
ROM 1-7-14:
Mirror 1*Broken Link editing note*
ROM 1-11-14:
Changes:
Sync CM sources
Mirror 1*Broken Link editing note*
ROM 1-29-14:
Changes:
Sync CM sources
Mirror 1
ROM 6-27-14:
Changes:
Sync CM sources
Mirror 1
Donation
TY to the following XDA members for contributing:
unmesh59
CM11.0 : ION/PMEM
What's working:
Audio
Receiving and making calls
GPS
Compass
Proximity sensor
Wifi
Bluetooth
USB mass storage
HW accelerated gui
HW accelerated video
Camera/Video
Wifi and USB tethering
Known Issues
Fixed In newer builds: Lowest quality in camcorder, doesn't work. Therefore MMS Video Capture also. (Workaround available for older builds)
No other known issues.
GAPPS 1-5-14 (Recommended):
Mirror 1
GAPPS 6-6-14 Here for those with custom images or different rom(Too Big for This cm11 build):
Mirror 1
Older builds:
ROM 1-6-14:
Changes:
Initial release
Mirror 1
ROM 1-11-14:
Changes:
Fixed storage swapping - ty arco
Enable TARGET_USE_QCOM_BIONIC_OPTIMIZATION - ty arco
Possible workaround for the graphic glitch - ty arco
Updated media profiles - ty arco
Increased minimum CPU frequency to 368 MHz
Lowered zRAM size to half of what it was - ty arco
Kernel 3.4.76
Synced with CM
Mirror 1
ROM 1-15-14:
Changes:
Enabled Low Power Audio (LPA)
Fixed VOIP audio - ty arco
Fixed Netflix playback
USB OTG and zRAM fixes (credits Christopher83)
Kernel 3.4.77
Synced with CM
Mirror 1 *Broken Link editing note*
ROM 1-29-14:
Changes:
Disabled Low Power Audio (LPA)
Updated Adreno blobs - ty arco
Synced with CM
Mirror 1
ROM 2-7-14:
Changes:
Synced with CM
Mirror 1
ROM 2-14-14
Changes:
Synced with CM
Mirror 1
ROM 3-13-14 Leaving old build but breaking link for more testing.(harder to dl so you know what your getting)
Changes:
Synced with CM
Updated Adreno blobs - ty arco
Kernel 3.4.82
Mirror 1
ROM 3-19-14
Changes:
Synced with CM
Mirror 1
Kernel to Fix Audio *Broken Link editing note*
ROM 4-15-14
Changes:
Synced with CM
Mirror 1
ADC Linaro Kernel for this build
ROM 4-25-14
Changes:
Synced with CM
Mirror 1
ROM 5-8-14
Changes:
Synced with CM
Mirror 1
Mirror 2
ROM 5-25-14
Changes:
Fixed some audio routing bugs - ty arco
Enabled LPA (Low Power Audio) again
Lockscreen wallpaper
New theme engine
Synced with CM
Mirror 1
Mirror 2
ADC/Linaro Kernel[Mirror 1][Mirror 2] or Christopher K^Kernel[Mirror 1][Mirror 2]
More Kernel Options
ROM 6-8-14
Changes:
Sync with CM
Android 4.4.3
Enable KSM deferred timer - ty arco
Roll back UMS dirty ratio to 20 - ty arco
Add qcmediaplayer - ty arco
unblank screen during init - ty arco
Mirror 1
Mirror 2
ADC/Linaro Kernel[Mirror 1][Mirror 2] or Christopher K^Kernel[Mirror 1] [Mirror 2]
More Kernel Options
ROM 6-18-14
Changes:
Sync with CM
Adding setprop entries for tcp delayed ack for Wifi & LTE - ty arco
Add Back KK Adreno Drivers
Mirror 1
ADC/Linaro Kernel[Mirror 1] or Christopher K^Kernel[Mirror 1]
Round 2 Kernels
ADC/Linaro Kernel[Mirror 1] or
Christopher K^Kernel[Mirror 1]
More Kernel Options
ROM 7-7-14
Changes:
Sync with CM
Remove obsolete LPA prop - ty arco
Updates to PowerHAL - ty arco
Disable gapless mode - Fixes some audio issues - ty arco
Mirror 1
ADC/Linaro Kernel[Mirror 1] or Christopher K^Kernel[Mirror 1]
More Kernel Options
ROM 8-28-14
Sync with CM
Fixed Torch wake lock(arco)
Change some bluetooth permissions(arco)
Set default brightness to 80(arco)
Add OMX lib for hardware MP3 playback(arco)
Enabled "soft reboot" feature(sirmordred)
Enable proximity wake feature
Set ROW as default scheduler
Enable "Eject SD Card"(sirmordred)
Update vidc firmware and alsa lib (sirmordred)
Mirror 1
ADC/Linaro Kernel[Mirror 1] or
Christopher K^Kernel[Mirror 1]
More Kernel Options
ROM 9-9-14
Sync with CM
MMS Workaround(by me)
Mirror 1
ADC/Linaro Kernel[Mirror 1] or
Christopher K^Kernel[Mirror 1]
More Kernel Options
ROM 10-4-14
Sync with CM
Mirror 1
ROM 10-31-14
Sync with CM
Mirror 1
ADC/Linaro Kernel[Mirror 1] or
Christopher K^Kernel[Mirror 1]
More Kernel Options
ROM 12-09-14
Sync with CM
Mirror 1
ADC/Linaro Kernel[Mirror 1] or
Christopher K^Kernel[Mirror 1]
More Kernel Options
ROM 12-24-14
Sync with CM
OS2SD Instructions for flashing
OS2SD
OS2SD Mirror 1
CWM - OS2SD TWRP
ROM 12-25-14
Fix sensor issue.
OS2SD
OS2SD Mirror 1
ADC/Linaro Kernel or
Christopher K^Kernel
More Kernel Options
ROM 4-10-15(OS2SD):
Changes:
- KitKat 4.4.4 (KTU84Q)
- Synched with latest Cyanogenmod 11.0 sources
- BoardConfig: Avoid poisoning the host binaries with bad ABIs (rmcc)
- ramdisk: Change the class of rmt_storage service (arco)
- ramdisk: Change /dev/smd7 owner and group (arco)
- prop: Increase max background services to 8 (Christopher83)
- prop: Enabled HighEndGraphics by default (sirmordred)
- cm: Switch to full phone config (sirmordred)
- device: Disable HW MP3 decoder (sirmordred)
- BoardConfig: Reduced userdata partition size by 16 KB (sirmordred)
- rootdir: Blank/Unblank framebuffer to clear splash screen while on bootanimation (sirmordred)
- rootdir: Change permissions on external storage mount points (arco)
- rootdir: Remove sdcard1 from fuse_usbdisk service (arco)
- overlay: Set external storage devices as non-emulated (arco)
- camera: Modify base.common.version API define (arco)
- rootdir: Increase zram disk size to 256mb on 512mb devices (arco)
- rootdir: Increase Swappiness to 100 (arco)
- prop: Use /cache partition to store dex files of system apps (Christopher83)
Mirror 1
Christopher K^Kernel
More Kernel Options
ROM 7-15-15(OS2SD):
Changes:
- KitKat 4.4.4 (KTU84Q)
- Synced with latest Cyanogenmod 11.0 sources
Mirror 1
Christopher K^Kernel
Stock no swap
More Kernel Options
ROM 11-4-15(OS2SD):
Changes:
- KitKat 4.4.4 (KTU84Q)
- Synced with latest Cyanogenmod 11.0 sources
Mirror 1
Christopher K^Kernel
Stock no swap
More Kernel Options
ROM 1-4-16(OS2SD):
Changes:
- KitKat 4.4.4 (KTU84Q)
- Synced with latest Cyanogenmod 11.0 sources
Mirror 1
Christopher K^Kernel
Stock no swap
More Kernel Options
CM12.0 : ION/PMEM
What's working:
Audio
Receiving and making calls
GPS
Compass
Proximity sensor
Wifi
Bluetooth
HW accelerated gui
HW accelerated video
Camera/Video
Wifi and USB tethering
Known Issues
Must enable dev options root and install SuperSU for root!
Camera app is buggy
USB mass storage Doesnt work
You tell me!
GAPPS 11-09-14: http://www.mediafire.com/?1vrqasod29md6fm
ROM 1-11-15(OS2SD):
Mirror 1
ROM 1-11-15v2(OS2SD):
Changes:
- overlay: Update device hardware keys integer(Me)
- overlay: Add deviceHardwareWakeKeys config (Me)
- device: Use healtd charger during off-mode charging (credits to Christopher83)
Mirror 1
ROM 1-14-15(OS2SD):
Changes:
- Lollipop 5.0.2 (LRX22G)
- Synched with latest CyanogenMod 12.0 sources
device/samsung/ancora_tmo
- bluetooth: Updated config (credits to sirmordred)
- gps: Some improvements to HAL (credits to sirmordred)
- ril: Ignore getCellInfoList and setCellInfoListRate calls (credits to arco68)
- overlay: Updated overlay for recent fw/base changes (credits to sirmordred)
- prop: Increase max background services to 8 (credits to Christopher83)
- prop: Update the property name for AwesomePlayer usage (credits to Christopher83)
- prop: Removed deprecated properties (credits to sirmordred)
- prop: Add back debug.egl.hw=1 (credits to arco68)
- Revert "ramdisk: Remove permissions change for /proc/cmdline on early-init" (credits to arco68)
- ramdisk: Some updates and cleanups (credits to Christopher83)
- ramdisk: Add config for USB charging (credits to arco68)
- ramdisk: Use NOOP I/O scheduler during boot (credits to Christopher83)
- sepolicy: Allow read/write on device-specific sysfs files (credits to Christopher83)
- sepolicy: Allow system apps, like AriesParts, to perform su shell commands (credits to Christopher83)
- sepolicy: Add missing policies for bluetooth (credits to Christopher83)
- sepolicy: Add missing policies for netd (credits to Christopher83)
- sepolicy: Fix additional denials (credits to Christopher83)
Mirror 1
ROM 2-1-15(OS2SD):
Changes:
- Lollipop 5.0.2 (LRX22G)
- Synched with latest CyanogenMod 12.0 sources
device/samsung/ancora_tmo
-GPS HAL: NTP Server(Me)
-gps: Makefiles cleanup and some changes to correctly build GPS HAL (credits to Christopher83)
-gps: Zero-out dev structure after checking for NULL (credits to Christopher83)
-prop: Removed deprecated properties
-ramdisk: Some updates and cleanups (credits to Christopher83)
-sepolicy: Updates from ariesve device (credits to Christopher83)
-BoardConfig: Enabled extended font support (credits to sirmordred)
-BoardConfig: Make dexpreopt flag compatible for multiplatform compiling (credits to Harakhti)
-BoardConfig: Disable some audio features (credits to arco68)
-BoardConfig: Enable some charger options (credits to mikeNG)
-prop: Enable high-end graphic effects by default (credits to Christopher83)
-device: Support for F2FS formatted /data partition (credits to Christopher83)
-ril: Fix multi-part SMS sending (credits to Christopher83)
-sepolicy: Allow system server to R/W from radio devices (credits to Christopher83)
Mirror 1
ROM 2-12-15(OS2SD):
Changes:
- Lollipop 5.0.2 (LRX22G)
- Synched with latest Cyanogenmod 12.0 sources
-Opensourced libsensors (By Myself, sirmordred, Christopher83, CastagnaIT, and maybe more from ADC TEAM)
Mirror 1
ROM 3-15-15(OS2SD):
Changes:
- Lollipop 5.0.2 (LRX22G)
- Synched with latest Cyanogenmod 12.0 sources
- prop: Add property to indicate we support usb-otg (sirmordred)
- camera: Modify base.common.version API define (arco)
- Revert "device: Move AAPT config to cm.mk" (arco fix for missing assets)
- uevent: Set perm of dev/ledflash as R/W (sirmordred)
- BoardConfig: Enable some healthd charger options (sirmordred)
- device: Updated liblight (sirmordred)
- device: Removed deprecated egl.cfg (sirmordred)
- prop: Disable offload audio (arco)
- rootdir: Increase zram disk size to 256mb on 512mb devices (arco)
- rootdir: Increase Swappiness to 100 (arco)
Mirror 1
ROM 4-10-15(OS2SD):
Changes:
- Lollipop 5.0.2 (LRX22G)
- Synched with latest Cyanogenmod 12.0 sources
- rootdir: Remove sdcard1 from fuse_usbdisk service (arco)
- BoardConfig: Reduced userdata partition size by 16 KB (sirmordred)
- device: Use local copy of wpa_supplicant_overlay_conf (sirmordred)
- device: Add support for display color calibration (KCAL) (arco)
- cmhw: Add keydisabler class (sirmordred)
- rootdir: Set permissions for keydisabler (arco)
Mirror 1
Christopher K^Kernel
More Kernel Options
ROM 5-08-15(OS2SD):
Changes:
- Lollipop 5.0.2 (LRX22G)
- Synched with latest Cyanogenmod 12.0 sources
- rootdir: Various updates to init (sirmordred)
- Revert "rootdir: Increase Swappiness to 100" (arco)
- Revert "rootdir: Increase zram disk size to 256mb on 512mb devices" (arco)
- rootdir: Use lz4 compression for ZRAM (arco)
- rootdir: Reduce ZRAM size to 128MB (arco)
Mirror 1
Christopher K^Kernel
More Kernel Options
ROM 5-20-15(OS2SD):
Changes:
- Lollipop 5.0.2 (LRX22G)
- Synched with latest Cyanogenmod 12.0 sources
- overlay: Define default quick setting tiles (arco)
- device: Use ART small mode (mikeNG)
- device: Disable dex2oat watchdog (mikeNG)
Mirror 1
Christopher K^Kernel
More Kernel Options
ROM 7-21-15(OS2SD):
Changes:
- Lollipop 5.0.2 (LRX22G)
- Synched with latest Cyanogenmod 12.0 sources
Mirror 1
Christopher K^Kernel
More Kernel Options
CM12.1 : ION/PMEM
What's working:
Audio
Receiving and making calls
GPS
Compass
Proximity sensor
Wifi
Bluetooth
HW accelerated gui
HW accelerated video
Camera/Video
Wifi and USB tethering
Known Issues
Blank mobile network signal icon, even if calls and data network are working
You tell me!
GAPPS 6-02-15: https://github.com/cgapps/vendor_google/tree/builds/arm
ROM 4-13-15(OS2SD):
Changes:
- Lollipop 5.1 (LMY47I)
- Synched with latest CyanogenMod 12.1 sources
Mirror 1
ROM 5-31-15(OS2SD):
Changes:
- Lollipop 5.1.1 (LMY48B)
- Synched with latest Cyanogenmod 12.1 sources
- overlay: Define default quick setting tiles (arco)
- device: Use ART small mode (mikeNG)
- device: Disable dex2oat watchdog (mikeNG)
Mirror 1
Christopher K^Kernel
More Kernel Options
ROM 6-10-15(OS2SD):
Changes:
- Lollipop 5.1.1 (LMY48B)
- Synched with latest Cyanogenmod 12.1 sources
- ancora_tmo: gps: More NTP servers(Doadin/Cars1189/Me)
Mirror 1
Christopher K^Kernel
More Kernel Options
ROM 7-8-15(OS2SD):
Changes:
- Lollipop 5.1.1 (LMY48G)
- Synched with latest Cyanogenmod 12.1 sources
Mirror 1
Christopher K^Kernel
More Kernel Options
ROM 8-19-15(OS2SD):
Changes:
- Lollipop 5.1.1 (LMY48G)
- Synched with latest Cyanogenmod 12.1 sources
Mirror 1
Christopher K^Kernel
More Kernel Options
ROM 9-10-15(OS2SD):
Changes:
- Lollipop 5.1.1 (LVY48F)
- Synched with latest Cyanogenmod 12.1 sources
Mirror 1
Christopher K^Kernel
More Kernel Options
ROM 9-30-15(OS2SD):
Changes:
- Lollipop 5.1.1 (LVY48F)
- Synched with latest Cyanogenmod 12.1 sources
Mirror 1
Christopher K^Kernel
More Kernel Options
ROM 1-4-16(OS2SD):
Changes:
- Lollipop 5.1.1 (LMY48Y)
- Synched with latest Cyanogenmod 12.1 sources
Mirror 1
Christopher K^Kernel
More Kernel Options
ROM 2-7-16(OS2SD):
Changes:
- Lollipop 5.1.1 (LMY49G)
- Synched with latest Cyanogenmod 12.1 sources
- Fix Display Due To Change in Previous Build (Me)
Mirror 1
Christopher K^Kernel
More Kernel Options
ROM 3-26-16(OS2SD):
Changes:
- Lollipop 5.1.1 (LMY49H)
- Synched with latest Cyanogenmod 12.1 sources
Mirror 1
Christopher K^Kernel
More Kernel Options
ROM 8-15-16(OS2SD):
Changes:
- Lollipop 5.1.1 (LMY49J)
- Synched with latest Cyanogenmod 12.1 sources
Mirror 1
Christopher K^Kernel
More Kernel Options
Kernel Information:
All K^Kernels have overclocking the one labeled OC has just that no change to cpu voltage or memory. (Other misc tweaks still apply)
OC = Overclock
UV = Under Volt
EXUV = Extra Under Volt
Memory levels(aka settings>about phone>Memory):
high 380 MB of free RAM
very high 390 MB of free RAM
extra high 406 MB of free RAM
standard/default/small w.e. 370 MB of free RAM
New Builds:
high 406 MB of free RAM
very high 416 MB of free RAM
extra high gone
standard/default/small w.e. 396 MB of free RAM
Notes for OS2SD:
Before you start: I cannot stress enough cwm backups/restoring will not work with this OS2SD release! And data MUST be formated NOT Optional!
1. You MUST Backup All data or it WILL be lost!
2. You MUST Format /system, /data, /cache, and /sdcard0 in cwm/twrp.
At this point you can format sdcard0 as ext4.
3. Install the new CWM/TWRP the old one will not work from now on!
If you didnt before now would also be a good time to format the internal storage which in the new recovery is now /data to ext4.
4. Once formated first flash the OS2SD rom
5. Then flash GAPPS and/or other packages.
At this point you can restore data. Note the kernel is special so you cant use older ones so you can only restore things like /data backups and adb/titanium backups.
6. Then reboot and enjoy the extra space!
thanks cars1198 for this OP. 10.1 and 10.2 work like ya said. i like 10.1 better between the 2. really cant wait til i get cm11 working like others have.
testing cm11 again using cmw 6.0.4.4 right now.
13min Update. Still spinning animation on first boot. gonna wait 25mins before trying something else. if I get ill report back. if i don't either A) i passed out or B) still trying to get it
Will test what i can! thanks for always helping around man you were like the batmn to this forum. it was about time you shared it people you talent
det0xx said:
Will test what i can! thanks for always helping around man you were like the batmn to this forum. it was about time you shared it people you talent
Click to expand...
Click to collapse
Most of the credit goes to the others i mention in OP. I am mearly filling in the space in the dev scene on exhibit side of things. The other devs i mention have worked hard on other devices and ours and i just want to help the exhibit community benefit from their amazing work. And at the very least keep us updated with the latest CM source.
OP's updated with final words/links. If anyone has any questions or conserns or wants to share words of wisdom about anything or the format of any of my above posts feel free to PM me.
TripFX said:
thanks cars1198 for this OP. 10.1 and 10.2 work like ya said. i like 10.1 better between the 2. really cant wait til i get cm11 working like others have.
testing cm11 again using cmw 6.0.4.4 right now.
13min Update. Still spinning animation on first boot. gonna wait 25mins before trying something else. if I get ill report back. if i don't either A) i passed out or B) still trying to get it
Click to expand...
Click to collapse
I took out the battery after a while and got passed the boot animation, but them this message popped up "Unfortunately, the process android.process.acore has stopped" I rebooted again and the error messages stopped.
Jorge_007 said:
I took out the battery after a while and got passed the boot animation, but them this message popped up "Unfortunately, the process android.process.acore has stopped"
Click to expand...
Click to collapse
yup i can make it to that before numerous times. i want to make it past that. I want to be able to flash like i can with every other rom but cm11.
UPDATE:
got to your point. rebooted and let it go and it took fine. fully loaded in. no hangs or reboots. now to make sure gapps doesn't make it go crazy again.
TripFX said:
yup i can make it to that before numerous times. i want to make it past that. I want to be able to flash like i can with every other rom but cm11.
Click to expand...
Click to collapse
The first recovery i used that worked was jfbs 6.0.4.5. If you haven't tried that yet id recommend that.(Not that im guaranteeing it will work but just one i can confirm worked for me)
cars1189 said:
The first recovery i used that worked was jfbs 6.0.4.5. If you haven't tried that yet id recommend that.(Not that im guaranteeing it will work but just one i can confirm worked for me)
Click to expand...
Click to collapse
actually i swapped to your 6.0.4.6. took 2 reboots first made it to homescreen but kept giving me same errors most people like me have which is things such as phone and theme providers constantly stop responding. 2nd boot went in fine. I intentionally rebooted 10 time after that to see if it would give the homescreen errors again and it didn't. just flashed the gapps you posted now. first boot went to upgrading android and made all the way to finishing boot then it just rebooted it self right after and so far stuck on on animation again not frozen nor randomly rebooting again. will try what ya said next. no art enabled either.
TripFX said:
actually i swapped to your 6.0.4.6. took 2 reboots first made it to homescreen but kept giving me same errors most people like me have which is things such as phone and theme providers constantly stop responding. 2nd boot went in fine. I intentionally rebooted 10 time after that to see if it would give the homescreen errors again and it didn't. just flashed the gapps you posted now. first boot went to upgrading android and made all the way to finishing boot then it just rebooted it self right after and so far stuck on on animation again not frozen nor randomly rebooting again. will try what ya said next. no art enabled either.
Click to expand...
Click to collapse
You are doing full wipes in between each right? If you havent id try that with my cwm 6.0.4.6.(or the 6.0.4.5 i just posted)
cars1189 said:
You are doing full wipes in between each right? If you havent id try that with my cwm 6.0.4.6.(or the 6.0.4.5 i just posted)
Click to expand...
Click to collapse
do full wipe with gapps as well? also can i do bot adb and dsmaq at the same time?
no go with adb on first boot. just says waiting for device. wiped system cache data 3 times each in that order. first boot will go in to home with phone and themes provider stop responding. gonna try 6.0.4.5 instead of 6.0.4.6.
TripFX said:
do full wipe with gapps as well? also can i do bot adb and dsmaq at the same time?
no go with adb on first boot. just says waiting for device. wiped system cache data 3 times each in that order. first boot will go in to home with phone and themes provider stop responding. gonna try 6.0.4.5 instead of 6.0.4.6.
Click to expand...
Click to collapse
Untill you get a stable rom i wouldnt try any gapps yet.
cars1189 said:
Untill you get a stable rom i wouldnt try any gapps yet.
Click to expand...
Click to collapse
well after the million reboots after i was able to get in once completely with no errors is when i tried the gapps. and after doing gapps it went back to throwing a fit. wiped everything 6 times. installed 6.0.4.5 rebooted. wiped everything again 6 more times. now trying first boot with 6.0.4.5
edit: adb logcat and adb shell will not take on first boot. also i can get a cwm logcat for ya. just waiting on this first boot to see what happens before pulling log from cwm
edit2: failed again. here is cwm recovery log. cant pm you cause it says you have it disabled or can't receive any.
edit3: i can install your 10.1 perfectly everything time using 6.0.4.4 - 6.0.4.5 that i've tested so far. going to try every version of cm11 in order to see which build it starts at having issues at. still on 6.0.4.5
edit4.: intial release build -12/23 tested all perfectly aside noted bugs per each release.
hey bro downloaded your 10.1 a few hours ago, its like I have a new phone..:good: muy excellente!! i'm tempted to try out your 10.2 but I need a stable phone for a few days.., unless you or someone can vouch for it and say its stable. either way.. i'll ask about your cm11 rom but am very fearful to try it out..
Nitro Lopez said:
hey bro downloaded your 10.1 a few hours ago, its like I have a new phone..:good: muy excellente!! i'm tempted to try out your 10.2 but I need a stable phone for a few days.., unless you or someone can vouch for it and say its stable. either way.. i'll ask about your cm11 rom but am very fearful to try it out..
Click to expand...
Click to collapse
10.1 is rock solid so far. wife is loving more than aoip so far.
im try to see which cm11 build the problem some NOT ALL of us are having. make nandroid of cm10.1. try lastest cm11 build and if you have any issues revert back to nandroid until we get it sorted out.
TripFX said:
10.1 is rock solid so far. wife is loving more than aoip so far.
im try to see which cm11 build the problem some NOT ALL of us are having. make nandroid of cm10.1. try lastest cm11 build and if you have any issues revert back to nandroid until we get it sorted out.
Click to expand...
Click to collapse
I know right, having a Working ROM is awesome!..., no offense to jfbs, I love his ROM it just ain't working right on my phone. but I guess it works fine on others phone?? oh well, let the ROM wars begin!:highfive:
Nitro Lopez said:
I know right, having a Working ROM is awesome!..., no offense to jfbs, I love his ROM it just ain't working right on my phone. but I guess it works fine on others phone?? oh well, let the ROM wars begin!:highfive:
Click to expand...
Click to collapse
actually so far with jfbs version from intial release up to 12/23 build doesn't have the issue that i know of so far. pin pointing which build it breaks at.
Nitro Lopez said:
hey bro downloaded your 10.1 a few hours ago, its like I have a new phone..:good: muy excellente!! i'm tempted to try out your 10.2 but I need a stable phone for a few days.., unless you or someone can vouch for it and say its stable. either way.. i'll ask about your cm11 rom but am very fearful to try it out..
Click to expand...
Click to collapse
The 10.2 is old and still using full pmem it does work but i would not recommend it over the 10.1 ion/pmem or 11.0 ion/pmem. Hopefully ill be updateing it soon with an ion/pmem build so we will have all 3 up-to-date or very recent(lessthan 1 month old).

[DEV-only][WIP] ALSA BCM21553 Audio libs built from source - BroadcomCM

I've created this thread to join developers into the final audio fix for android 2.3.7. Although the prupose of this thread is to fix Audio on Android 4.0.4 we first need audio drivers source.
On all our based Android 2.3.7 ROMs we fixed audio using some AOSP Alcatel .so files (to remove Samsung lib dependency) and some Samsung .so libraries too, this is the whole list:
# Samsung audio libs
acoustics.default.so
alsa.default.so
libaudiopolicy.so
# Alcatel audio libs
libaudio.so
libaudioflinger.so
libaudioeffect_jni.so
libmediaplayerservice.so
Click to expand...
Click to collapse
Our device uses ALSA audio system, which is also used on stock ROM. This is related to software more than hardware, although we are not planning at the momnt to "change" this audio way. To activate ALSA audio some changes need to be done on kernel, that samsung provide to us on their kernel sources. Mostly we need to enable ALSA on device .config file:
Code:
CONFIG_BRCM_SOUND_ALSA=y
CONFIG_BRCM_SOUND_ATHENA_ALSA=y
That's not an issue as prebuilt alsa libs work, so new libs should work too. Ramdisk needs some edit too, as ALSA audio system is stored on dev/snd, and this is well defined too on our ramdisk, ueventd.rc
Code:
/dev/snd/* 0660 system audio
We realised after that that actually CyanogenMod 7.2 Sources include ALSA lib sources, what we didn't know if those sources could work with our devices. This sources build the following libs, as releated to its Android.mk files:
We can found inside hardware/sound_alsa the following sources to build
libaudio
libaudioflinguer
hw/alsa.default
hw/acoustics.default
On external/alsa-lib we can found the sources of anoher lib
libasound
And apart from that, some other audio libs such as libaudiopolicy are built inside framework/base repository, but they doesn't make any conflict. Other libs are included on Android source files.
To enable the build of those libs, using ALSA software instead af "Android default (not sure about that)". I've enabled on Boardconfig.mk the following configs:
Code:
# Audio
BOARD_USES_GENERIC_AUDIO := false
BOARD_USES_ALSA_AUDIO := true
BOARD_PREBUILT_LIBAUDIO := false # even not writted.
BUILD_WITH_ALSA_UTILS := true
This configs enable the building of those libs on their Android.mk files.
Also, I've added on device_cooperve.mk the following lines to build those hw modules releated to audio:
Code:
# Audio
PRODUCT_PACKAGES += \
alsa.default \
acoustics.default
After the build finished, and fixed some errors, AUDIO WAS WORKING, but not as expected. There were issues on Audio Routing:
Headphones are detected through system, but audio is not reproduced on headphones (speakers does)
When you make a call, sometimes you can't and phone freezes, or when you hangout the call, phone freezes.
Everything else apart from that seems to be working, even microphone, although this bugs are pretty weird, I took a look to logcat.
Code:
[COLOR="Gray"]D/AndroidRuntime( 1419): CheckJNI is OFF
I/ ( 1420): ServiceManager: 0xad50[/COLOR]
[COLOR="Red"]E/ALSALib ( 1420): external/alsa-lib/src/control/control.c:882:(snd_ctl_open_noupdate) Invalid CTL AndroidOut[/COLOR]
W/AudioHardwareALSA( 1420): Unable to attach mixer to device AndroidOut: No such file or directory
[COLOR="Red"]E/ALSALib ( 1420): external/alsa-lib/src/control/control.c:882:(snd_ctl_open_noupdate) Invalid CTL AndroidIn[/COLOR]
W/AudioHardwareALSA( 1420): Unable to attach mixer to device AndroidIn: No such file or directory
D/AudioHardwareALSA( 1420): openOutputStream called for devices: 0x00000002
D/ALSAModule( 1420): open called for devices 00000002 in mode 0...
I/ALSAModule( 1420): Initialized ALSA PLAYBACK device AndroidPlayback_Speaker_normal
I/AudioHardwareALSA( 1420): buffer size (bytes) to AF = 16384
D/AudioFlinger( 1420): setParameters(): io 1, keyvalue routing=2, tid 1593, calling tid 1420
I/AudioFlinger( 1420): AudioFlinger's thread 0x1d978 ready to run
D/ALSAModule( 1420): route called for devices 00000002 in mode 0...
I managed to fix those errors (E/) by moddifying asound.conf, found on system/etc, adding this lines on the top and deleting old ones:
Code:
ctl.AndroidOut {
type hw
card 0 # Can replace with drivers name from /proc/asound/cards
}
ctl.AndroidIn {
type hw
card 0
}
Now logcat shows this at the moment
Code:
[COLOR="Gray"]D/AndroidRuntime( 1425): CheckJNI is OFF
I/ ( 1426): ServiceManager: 0xad50[/COLOR]
D/AudioHardwareALSA( 1426): openOutputStream called for devices: 0x00000002
D/ALSAModule( 1426): open called for devices 00000002 in mode 0...
I/ALSAModule( 1426): Initialized ALSA PLAYBACK device AndroidPlayback_Speaker_normal
I/AudioHardwareALSA( 1426): buffer size (bytes) to AF = 16384
D/AudioFlinger( 1426): setParameters(): io 1, keyvalue routing=2, tid 1604, calling tid 1426
I/AudioFlinger( 1426): AudioFlinger's thread 0x1d960 ready to run
D/ALSAModule( 1426): route called for devices 00000002 in mode 0...
Actually that's the actual logcat, using headphones, and sound goes through speakers:
Code:
D/dalvikvm( 1926): GC_EXTERNAL_ALLOC freed 324K, 49% free 3317K/6471K, external 571K/579K, paused 58ms
V/HeadsetObserver( 1607): Headset UEVENT: {SUBSYSTEM=switch, SWITCH_STATE=2, DEVPATH=/devices/virtual/switch/h2w, SEQNUM=1335, ACTION=change, SWITCH_NAME=h2w}
W/Vold ( 1415): Ignoring unknown switch 'h2w'
V/HeadsetObserver( 1607): Intent.ACTION_HEADSET_PLUG: state: 1 name: h2w mic: 0
I/HeadsetService( 1907): Headset plugged: true
I/Effect-DRC( 2115): Compression factor set to: 1.000000
I/Effect-BassBoost( 2115): New strength: 0
D/SurfaceFlinger( 1607): Layer[1c62e0] [2] non-RGB565 reloads
I/Effect-Equalizer( 2115): Setting band 2 to 0
I/Effect-Equalizer( 2115): Setting band 2 to 1
I/Effect-Equalizer( 2115): Setting band 2 to 2
I/Effect-Equalizer( 2115): Setting band 2 to 3
I/Effect-Equalizer( 2115): Setting band 2 to 4
I/Effect-Equalizer( 2115): Setting loudness correction reference to 100.000000 dB
D/AudioFlinger( 2115): setParameters(): io 1, keyvalue routing=8, tid 2117, calling tid 2115
D/ALSAModule( 2115): route called for devices 00000008 in mode 0...
D/ALSAModule( 2115): open called for devices 00000008 in mode 0...
I/ALSAModule( 2115): Initialized ALSA PLAYBACK device AndroidPlayback
D/dalvikvm( 1926): GC_EXTERNAL_ALLOC freed 323K, 49% free 3327K/6471K, external 571K/579K, paused 44ms
We must take a look if that is kernel relevant or not, as we really need this libs to work, to then start working on CyanogenMod 9.1 / Android 4.0.4 audio. Any suggestions are welcomed, although if they are from newbie or developer, don't want this thread to be spammed as others
Why this is helpfull ?
Currently we based it upon cm7.2 GB
this is because our device uses to run GB as stock.
When we figure the sources out and figure out what is part 1 or such we can adapt and try to port to CM9 so in that we can have new libs aswell.
(W.I.P Post;P )
to me
Sorry for intrusion Biel and spacecaker But can i have the output of cat /proc/asound/cards ???
4dead said:
Sorry for intrusion Biel and spacecaker But can i have the output of cat /proc/asound/cards ???
Click to expand...
Click to collapse
Sure, here it is:
Code:
# cat /proc/asound/cards
0 [ALSA ]: Broadcom - Broadcom ALSA
Broadcom ALSA PCM 0
I can help
bieltv.3 said:
Sure, here it is:
Code:
# cat /proc/asound/cards
0 [ALSA ]: Broadcom - Broadcom ALSA
Broadcom ALSA PCM 0
Click to expand...
Click to collapse
give me any link - any guide i got linux want to help i will do my best
at myaser
for this
there are no guides.
Sent from my S500 using xda app-developers app
SpaceCaker said:
at myaser
for this
there are no guides.
Sent from my S500 using xda app-developers app
Click to expand...
Click to collapse
I will try using my mind
Sorry for non-useful comments
u need tiny alsa not alsa sources to work with bcm21553 modules , Android 4.0.4 introduced tiny alsa replacing alsa
percy_g2 said:
u need tiny alsa not alsa sources to work with bcm21553 modules , Android 4.0.4 introduced tiny alsa replacing alsa
Click to expand...
Click to collapse
We are fixing on 2.3.7 at the moment. Tinyalsa gives support for msm8960 chips as I can see on their sources, so we should start from 2.3.7.
Enviado desde mi C5303 mediante Tapatalk
The sound will work after 3 months?
The sound will work after 3 months?
bieltv.3 said:
We are fixing on 2.3.7 at the moment. Tinyalsa gives support for msm8960 chips as I can see on their sources, so we should start from 2.3.7.
Enviado desde mi C5303 mediante Tapatalk
Click to expand...
Click to collapse
What about CyanMobile eXperience Biel ??
Are you will starting the build ??
@bieltv.3
Look At ur inbox
jeko99 said:
The sound will work after 3 months?
Click to expand...
Click to collapse
Maybe... Be patient bro, it's so hard to fixing audio issue
jeko99 said:
The sound will work after 3 months?
Click to expand...
Click to collapse
No ETA's, please.
Can't you see that this thread is a Dev thread? No discussion here, please.
Enviado de meu XT1032 usando Tapatalk
I think you should really take a look on the stock asound.conf
4dead said:
I think you should really take a look on the stock asound.conf
Click to expand...
Click to collapse
We are using stock asound.conf
Enviado desde mi C5303 mediante Tapatalk
Are the drivers initialized in the kernel?
check here ---> http://seasonofcode.com/posts/using-alsa-audio-drivers-in-android.html
and here ----> http://code.paulk.fr/article3/tinyalsa-audio
faZevoLv said:
Are the drivers initialized in the kernel?
check here ---> http://seasonofcode.com/posts/using-alsa-audio-drivers-in-android.html
and here ----> http://code.paulk.fr/article3/tinyalsa-audio
Click to expand...
Click to collapse
Biel already said in the op that he added /dev/snd in the Ramdisk and i dont think our device use tinyalsa because With Alsa Drivers biel got sound working.
No Way To Use Audio files from other devices
Not booting at all
BroadcomCM Team \o/
Good luck It seems to be hard

[EXPERIMENTAL][androidarmv6/android_kernel_lge_msm7x27-3.0.x]WiFi Voltage Reduction

Experimental test of wifi voltage reduction, and activate commented out msm-7627 regulator for ldo12 (wlan)
Read: EXPERIMENTAL.
It has been flashed to one thunderg p500 which seems to still be completely functional (which I don't own one of unfortunately, but I've been testing this patch on the thunderc with basically the same kernel for a while with no ill effects.)
Use at your own risk, of course, but this is an experiment to try to reduce the wifi power drain with the 3.0 kernel. Needs testers to give opinions or evaluation.
If it actually can be verified to cut power consumption noticeably, I'd like to send it upstream, but first it needs tested to be more than a placebo.
For androidarmv6 kitkat (muklsoni's or jenkins nightly)
dunno how it'll get along with other kitkat ROMS. Doubt it'll work on anything under Jellybean.
source:
https://github.com/androidarmv6/android_kernel_lge_msm7x27-3.0.x branch cm-11.0
with this patch
Code:
Subject: [PATCH] wifi regulator and voltage reduction test
---
arch/arm/mach-msm/board-msm7627-regulator.c | 3 ++-
arch/arm/mach-msm/lge/board-thunderg-mmc.c | 27 ++++++++++++++-------------
2 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/arch/arm/mach-msm/board-msm7627-regulator.c b/arch/arm/mach-msm/board-msm7627-regulator.c
index 6ab2977..4540e6e 100644
--- a/arch/arm/mach-msm/board-msm7627-regulator.c
+++ b/arch/arm/mach-msm/board-msm7627-regulator.c
@@ -226,7 +226,8 @@ static struct proccomm_regulator_info msm7627_pcom_vreg_info[] = {
PCOM_VREG_LDO(ldo09, 8, NULL, 1800000, 1800000, 0, -1, 0, 0, 0, 0),
PCOM_VREG_LDO(ldo10, 7, NULL, 2600000, 2600000, 0, -1, 0, 0, 0, 0),
PCOM_VREG_LDO(ldo11, 21, NULL, 2800000, 2800000, 0, -1, 0, 0, 0, 0),
- PCOM_VREG_LDO(ldo12, 11, NULL, 1800000, 1800000, 0, -1, 0, 0, 0, 0),
+// PCOM_VREG_LDO(ldo12, 11, NULL, 1800000, 1800000, 0, -1, 0, 0, 0, 0),
+ PCOM_VREG_LDO(ldo12, 11, NULL, 1800000, 2400000, 0, -1, 0, 0, 0, 0),
PCOM_VREG_LDO(ldo13, 15, NULL, 2850000, 3000000, 0, -1, 0, 0, 0, 0),
PCOM_VREG_LDO(ldo14, 24, NULL, 2700000, 2700000, 0, -1, 0, 0, 0, 0),
PCOM_VREG_LDO(ldo15, 23, NULL, 2800000, 2800000, 0, -1, 0, 0, 0, 0),
diff --git a/arch/arm/mach-msm/lge/board-thunderg-mmc.c b/arch/arm/mach-msm/lge/board-thunderg-mmc.c
index 056bcfa..20f9575 100644
--- a/arch/arm/mach-msm/lge/board-thunderg-mmc.c
+++ b/arch/arm/mach-msm/lge/board-thunderg-mmc.c
@@ -181,8 +181,8 @@ static unsigned sdcc_cfg_data[][6] = {
static unsigned long vreg_sts, gpio_sts;
static unsigned mpp_mmc = 2;
-static struct vreg *vreg_mmc;
-//static struct regulator *vreg_mmc;
+//static struct vreg *vreg_mmc;
+static struct regulator *vreg_mmc;
static void msm_sdcc_setup_gpio(int dev_id, unsigned int enable)
{
@@ -226,8 +226,8 @@ static uint32_t msm_sdcc_setup_power(struct device *dv, unsigned int vdd)
MPP_CFG(MPP_DLOGIC_LVL_MSMP,
MPP_DLOGIC_OUT_CTRL_LOW));
} else
- rc = vreg_disable(vreg_mmc);
-// rc = regulator_disable(vreg_mmc);
+// rc = vreg_disable(vreg_mmc);
+ rc = regulator_disable(vreg_mmc);
if (rc)
printk(KERN_ERR "%s: return val: %d \n",
__func__, rc);
@@ -242,15 +242,16 @@ static uint32_t msm_sdcc_setup_power(struct device *dv, unsigned int vdd)
MPP_DLOGIC_OUT_CTRL_HIGH));
} else {
#ifdef CONFIG_MMC_MSM_CARD_HW_DETECTION
- rc = vreg_set_level(vreg_mmc, VREG_SD_LEVEL);
-// rc = regulator_set_voltage(vreg_mmc, VREG_SD_LEVEL*1000, VREG_SD_LEVEL*1000);
+// rc = vreg_set_level(vreg_mmc, VREG_SD_LEVEL);
+ rc = regulator_set_voltage(vreg_mmc, VREG_SD_LEVEL*1000, VREG_SD_LEVEL*1000);
#else
- rc = vreg_set_level(vreg_mmc, 2850);
+// rc = vreg_set_level(vreg_mmc, 2850);
// rc = regulator_set_voltage(vreg_mmc, 2850000, 2850000);
+ rc = regulator_set_voltage(vreg_mmc, 1800000, 2400000);
#endif
if (!rc)
- rc = vreg_enable(vreg_mmc);
-// rc = regulator_enable(vreg_mmc);
+// rc = vreg_enable(vreg_mmc);
+ rc = regulator_enable(vreg_mmc);
}
if (rc)
printk(KERN_ERR "%s: return val: %d \n",
@@ -313,11 +314,11 @@ static struct mmc_platform_data msm7x2x_sdc1_data = {
static void __init msm7x2x_init_mmc(void)
{
if (!machine_is_msm7x25_ffa() && !machine_is_msm7x27_ffa()) {
- vreg_mmc = vreg_get(NULL, "wlan");
-// vreg_mmc = regulator_get(NULL, "wlan");
+// vreg_mmc = vreg_get(NULL, "wlan");
+ vreg_mmc = regulator_get(NULL, "wlan");
if (IS_ERR(vreg_mmc)) {
-// printk(KERN_ERR "%s: regulator get failed (%ld)\n",
- printk(KERN_ERR "%s: vreg get failed (%ld)\n",
+ printk(KERN_ERR "%s: regulator get failed (%ld)\n",
+// printk(KERN_ERR "%s: vreg get failed (%ld)\n",
__func__, PTR_ERR(vreg_mmc));
return;
}
--
1.7.9.5
This enables the regulator instead of vreg for ldo12 (wlan) like the other board devices.
It also reduces wlan voltage from 2.85V to 2.4V max and allows a low setting of 1.8V instead of the original off/2.85V mode
built with custom ct-ng linaro 4.7 armv6k toolchain branch 4.7.4
(the few v6k instructions in the toolchain should be no issue for your msm7227, especially compared to the armv7 ones in the 4.8 and newer toolchains I've tried.)
Download link in 2nd post.
Download here
Feedback appreciated, and the test will go nowhere without your information.
iwconfig can be placed on xbin, used to set lower txpower. Tasker script to redo this whenever WIFI comes on.
Dovidhalevi said:
iwconfig can be placed on xbin, used to set lower txpower. Tasker script to redo this whenever WIFI comes on.
Click to expand...
Click to collapse
Nice to have another way to reduce drain. Thanks. Maybe that can be incorporated into ROM without too much hassle.
My thought was that many users need something transparent that you install once and it's done, or even built in, and that wifi drain on this kernel has been a common complaint across both thunderg and thunderc builds for a long time.
I like to play around with new things. Don't know about the Optimus One, but an activatable Optimus V is now down to under $25 shipped, so I am not worried about messing mine up anymore. Trying experiments with low level parameters, like tweaking voltages, is the best way I know of to find the usable lower limits of things so that function is maximized.
If this type of thing can fix it...
Also, Broadcom specs say the voltage can go even lower, down to 2.3V. I can't find good data on its low power mode. But I don't know why it's set way up to 2.85V on the thunder* board (Same with stock 2.6.35,) when it definitely still works at 2.4V.
bigsupersquid said:
Nice to have another way to reduce drain. Thanks. Maybe that can be incorporated into ROM without too much hassle.
My thought was that many users need something transparent that you install once and it's done, or even built in, and that wifi drain on this kernel has been a common complaint across both thunderg and thunderc builds for a long time.
I like to play around with new things. Don't know about the Optimus One, but an activatable Optimus V is now down to under $25 shipped, so I am not worried about messing mine up anymore. Trying experiments with low level parameters, like tweaking voltages, is the best way I know of to find the usable lower limits of things so that function is maximized.
If this type of thing can fix it...
Also, Broadcom specs say the voltage can go even lower, down to 2.3V. I can't find good data on its low power mode. But I don't know why it's set way up to 2.85V on the thunder* board (Same with stock 2.6.35,) when it definitely still works at 2.4V.
Click to expand...
Click to collapse
iwconfig is easily pushed, could/should come with the ROM.
The ROM's startup would set the default txpower to say, 11 instead of 32. That would be transparent, no need to think about it.
I need a startup script and a tasker script because every time WIFI comes on, the txpower gets back to 32.
How much battery I really save by all this, I really cannot document (but a little less EM radiation around cannot hurt).
With iwconfig, I can reset things should I so desire. I am not bound by the kernel to a given voltage or power. BTW, sweetnsour's kernels (dont use them now, out-of-date) had lower CPU voltage to save battery. Did notice.
Dovidhalevi said:
iwconfig is easily pushed, could/should come with the ROM.
The ROM's startup would set the default txpower to say, 11 instead of 32. That would be transparent, no need to think about it.
I need a startup script and a tasker script because every time WIFI comes on, the txpower gets back to 32.
How much battery I really save by all this, I really cannot document (but a little less EM radiation around cannot hurt).
With iwconfig, I can reset things should I so desire. I am not bound by the kernel to a given voltage or power. BTW, sweetnsour's kernels (dont use them now, out-of-date) had lower CPU voltage to save battery. Did notice.
Click to expand...
Click to collapse
I'll test the bigsupersquid patch, i've a 2nd p500 now i think it's simple apply a patch (also in jenkins repo) and then forget it.
no 3rd app needed (tasker) = space for other apps
1st test on os2sd:
flashed as is, boot loop (i think is the different mount point of the /system folder, i'll put files directly in the rom and then reflash the entire rom)
meanwhile
2nd test with rhar**** omega rom: with bigsupersquid patch 5h 30 @ 25%, probably 6h 30 @10%
i've to keep my 2nd p500 in aereo, because i haven't a 2nd sim. without a sim or aereo mode on the rom lag a lot
bigsupersquid said:
Download here
Feedback appreciated, and the test will go nowhere without your information.
Click to expand...
Click to collapse
Does Spirit radio free work on this kernel.
samade123 said:
Does Spirit radio free work on this kernel.
Click to expand...
Click to collapse
dunno, no p500 to test with.
if it works with the androidarmv6 chocolate+perf kernel, it should. This is that plus the patch.
fm doesn't work at all on the thunderc. never has.
bigsupersquid said:
dunno, no p500 to test with.
if it works with the androidarmv6 chocolate+perf kernel, it should. This is that plus the patch.
fm doesn't work at all on the thunderc. never has.
Click to expand...
Click to collapse
Spirit radio does work on Omni rom
samade123 said:
Spirit radio does work on Omni rom
Click to expand...
Click to collapse
and from what I've read it doesn't on cm11.
make a backup to try the kernel in omni.
bigsupersquid said:
and from what I've read it doesn't on cm11.
make a backup to try the kernel in omni.
Click to expand...
Click to collapse
I have already tried it on Omni and Spirit Free doesn't work.
samade123 said:
I have already tried it on Omni and Spirit Free doesn't work.
Click to expand...
Click to collapse
please can you confirm that in omni (7.1 or pre8) with wifi connected&aereo on, the battery endurance (100%->0%) is ~ 8,5h
I can try to build a kernel for omni too using the patch.
BTW, you have changed the voltage according to patch, right? Isn't there any other way to implement the older drivers in the newer kernel?
Sent from my Xperia M using XDA Premium 4 mobile app
rhar**** said:
I can try to build a kernel for omni too using the patch.
BTW, you have changed the voltage according to patch, right? Isn't there any other way to implement the older drivers in the newer kernel?
Sent from my Xperia M using XDA Premium 4 mobile app
Click to expand...
Click to collapse
the patch cuts voltage and switches wlan to regulator instead of vreg.
the 2.6 kernel uses the same voltage as before my patch.
i hadn't tried to cram the old drivers into the new kernel, and other than changing txpower like suggested earlier, this patch was all i could think of to cut wlan power usage.
xdema said:
please can you confirm that in omni (7.1 or pre8) with wifi connected&aereo on, the battery endurance (100%->0%) is ~ 8,5h
Click to expand...
Click to collapse
I think your getting confused between Omni rom and Omega rom(A CM11 variation). And sorry I can't because my primary phone is going for repair so I don't want to mess with this phone till my other gets repaired
bigsupersquid said:
the patch cuts voltage and switches wlan to regulator instead of vreg.
the 2.6 kernel uses the same voltage as before my patch.
i hadn't tried to cram the old drivers into the new kernel, and other than changing txpower like suggested earlier, this patch was all i could think of to cut wlan power usage.
Click to expand...
Click to collapse
Ok. I get it. Nice work. Keep it up!
samade123 said:
I think your getting confused between Omni rom and Omega rom(A CM11 variation). And sorry I can't because my primary phone is going for repair so I don't want to mess with this phone till my other gets repaired
Click to expand...
Click to collapse
Well, Omega ROM is omni based, and not cm11. Previously it was CM based but beta5 onwards, its Omni based. And that's the reason why I'll even try to build it for omni.
Sent from my LG-P500 using XDA Premium 4 mobile app
rhar**** said:
Ok. I get it. Nice work. Keep it up!
Well, Omega ROM is omni based, and not cm11. Previously it was CM based but beta5 onwards, its Omni based. And that's the reason why I'll even try to build it for omni.
Sent from my LG-P500 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Oh ok fair enough then it would be good to get this on Omega then the battery will last longer.
bigsupersquid said:
the patch cuts voltage and switches wlan to regulator instead of vreg.
the 2.6 kernel uses the same voltage as before my patch.
i hadn't tried to cram the old drivers into the new kernel, and other than changing txpower like suggested earlier, this patch was all i could think of to cut wlan power usage.
Click to expand...
Click to collapse
Please, could you make a patch for the os2sd roms?
i tried to apply the patch to an os2sd rom (hardlight's KK) but the result was a bootloop after the LG logo
however it's ok on the omega 7.1 and mukulsoni's KK
xdema said:
Please, could you make a patch for the os2sd roms?
i tried to apply the patch to an os2sd rom (hardlight's KK) but the result was a bootloop after the LG logo
however it's ok on the omega 7.1 and mukulsoni's KK
Click to expand...
Click to collapse
it's too old for the TLS-enabled ROMs and needs rebuilt for that.
The rebuild won't work on the ROMs that the current version works on.
plus the comments in HardLight's thread indicate the battery holds up pretty well in his version anyway...
you can apply my patch to the current androidarmv6source and build a kernel that should work with the TLS-enabled ROMs.
Spirit free
After a second attempt of flashing this patch to Omni, It seems Spirit free works well. Brilliant patch. :good:

[ROM][5.1.1][T710][UNOFFICIAL] CyanogenMod 12.1 for Tab S2 8.0 [BETA]

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This ROM is BETA at the moment​
CyanogenMod is based on the Android Open Source Project with extra contributions from many people within the Android community
First I would like to thank the following developers :
@moonbutt74
@yeshwanthvshenoy
@gladiac
@RaymanFX
@sub77
@T_I
@hennymcc
@Sarum4n - for Donating XDA add free
Each of them helped me with this project so a big thanks goes to them!
Before you start
THIS ROM IS ONLY FOR THE SM-T710
A T810 port of this rom by @T_I is available here
Code:
*
* Your warranty will be voided !
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*
About the ROM
Current state of ROM : BETA
What is Fixed
Camera
Sound
Wifi
Storage
Headphones
External sdcard
Screen Rotation
Bluetooth shows note 4 instead of tab s2
Resolution
What is not working
Important
MTP
Minor
Microphone
Minor graphical glitches
Lag after trying to send a text via sms app (Just don't do it and disable the app. It will try to reach RIL even tough its wifi only)
Instructions
How to install CM12.1
If you don't have TWRP yet, get it from here : TWRP by ashyx
Download the ROM and the Gapps that are located below to your device
Reboot into TWRP by holding VOL UP + POWER + HOME on boot
In case things go wrong make a backup
After the backup has completed return to home and select Wipe and then Advanced Wipe
Now ONLY tick Dalvik Cache, System, Data and Cache
After ticking those, Swipe below to wipe
Once the wipe has completed return to home and select the ROM
After you selected the ROM swipe below to install it
After the ROM has installed flash the Gapps
When all of this is done, reboot into system, wait, and enjoy CM12.1
How to ROOT
In CM 12.1, enable the developer options
Select Root access
Select Apps Only
Done
Questions and bug reporting
The following questions will be ignored
Inappropriate questions
Requests for other devices
Forced orders, EX. : "PLS FIX!!!!!!"
ETA's
Often repeated questions usually by the same user
Requests that are out of CM's framework (Ex. Adding Samsung Apps)
How to report a bug/issue
Explain exactly what happens
Mention a log if you can (Please use hastebin or any other paste site to keep the thread clean)
If you can't mention a log, explain as precise as possible when, why and where it occurs!
Changelog
Code:
18/4/2016 - Fixed Camera (Yes I'm still alive)
**********
27/1/2016 - Fixed Headphones not working
**********
30/12/2015 - Fixed External sdcard
**********
28/12/2015 - Fixed Sound
- Removed Calling option from lockscreen
- Added missing OMX formats
- ROM is now BETA
**********
21/12/2015 - Fixed Storage problems
**********
19/12/2015 - ROM is now ALPHA
- Fixed Wifi
**********
15/12/2015 - Fixed Rotation/Orientation
- Lowered to 320 DPI
- Updated Screenshots
**********
12/12/2015 - Fixed Bluetooth showing note 4
- Fixed bad resolution
- Updated Screenshots
**********
11/12/2015 - CM12.1 Booted for the first time
**********
Downloads
Latest CM 12.1 build : Android File Host
All CM 12.1 releases can be found here : Android File Host
Recommended GAPPS Open Gapps
Source
Special Thanks to @RaymanFX for releasing his Exynos 5433 source, without him this ROM would most likely not be possible!
All my sources can be found here : https://github.com/Galaxy-Tab-S2
Screenshots
XDA:DevDB Information
CyanogenMod 12.1 for Samsung Galaxy Tab S2 8.0 T710, ROM for the Samsung Galaxy Tab S2
Contributors
CTXz, Sub77, Moonbutt74, RaymanFX, Hennymcc
Source Code: https://github.com/Galaxy-Tab-S2
ROM OS Version: 5.1.x Lollipop
Based On: CyanogenMod
Version Information
Status: Beta
Created 2015-12-11
Last Updated 2016-04-18
Q&A
Q : Why does it say Galaxy Tab S2 9.7 on Android File Host if this is for the 8.0 version ?
A : Android File Host doesn't feature the 8.0 version in their devices. Because of that, all is located under a folder called 8.0
Q : Why is everything so small?
A : The DPI rate is 320 which is the same as on the Stock rom. However, Samsung has made everything bigger. Since this is personal preference, you may always higher your DPI to make things bigger or lower your DPI to make things smaller under Settings > Display > DPI
Q : Will you ever work on CM13?
A : Yes, once we feel like CM12 is good enough, we will move to CM13
Reserved 2
New build 12/12/2015
- Fixed Bluetooth bug showing Galaxy note 4 instead of tab s2
- Fixed bad resolution
- Updated Screenshots
Great work!
Can't wait to use this once it reaches a point where it's functional for everyday use! Excellent work so far!
Good job man!!! Will test this as soon as the WiFi works
Sent from my SM-T710 using Tapatalk
good news for all T810 users! @T_I is working on a port of my ROM. It came to the CM setup wizzard however had some problems with the touchscreen. Should hopefully be a easy fix.
So the sensor module just isn't loading.
Code:
I/ ( 3857): System server: starting sensor init.
D/SensorService( 3857): nuSensorService starting...
E/HAL ( 3857): load: module=/system/lib/hw/sensors.exynos5.so
E/SensorService( 3857): couldn't load sensors module (Invalid argument)
I/ ( 3857): System server: sensor init done.
Tried to use the note 4 ones. They did load up successfully but use different drivers.
Ex the gyroscope uses ICM20610 where mine uses LSM6DS3. I really only came this far. My nightmare would be to make my own sensor libs. That would mean that I would have to learn lot's of lot's of coding!
CTXz said:
So the sensor module just isn't loading.
Code:
I/ ( 3857): System server: starting sensor init.
D/SensorService( 3857): nuSensorService starting...
E/HAL ( 3857): load: module=/system/lib/hw/sensors.exynos5.so
E/SensorService( 3857): couldn't load sensors module (Invalid argument)
I/ ( 3857): System server: sensor init done.
Tried to use the note 4 ones. They did load up successfully but use different drivers.
Ex the gyroscope uses ICM20610 where mine uses LSM6DS3. I really only came this far. My nightmare would be to make my own sensor libs. That would mean that I would have to learn lot's of lot's of coding!
Click to expand...
Click to collapse
I really dont know but doea this help:
https://github.com/STMemsLinuxDrivers/lsm6ds3-input
Sent from my SM-G928I using Tapatalk
Beukhof1 said:
I really dont know but doea this help:
https://github.com/STMemsLinuxDrivers/lsm6ds3-input
Sent from my SM-G928I using Tapatalk
Click to expand...
Click to collapse
Sadly those are for the kernel.
However,
I found this open source sensor for the s3 I9300 that uses a , what I believe, older version of the gyro found in our device. I will see what I can decompile/reverse out of the current module for the tab and will compare it with the open source ones for the I9300. This will be hard and I would be very thankfull if you could redict any expierienced dev you know, here
Suprise!
Turns out I was just missing a shared libary. That caused the module not to load. Sooo.... all that s3 sensor work for nothing
Hey.... atleast I learned something.
Also, build will be released in about 1-2h
CTXz said:
Suprise!
Turns out I was just missing a shared libary. That caused the module not to load. Sooo.... all that s3 sensor work for nothing
Hey.... atleast I learned something.
Also, build will be released in about 1-2h
Click to expand...
Click to collapse
Nice! Good job mate!
Did you have time to look at wifi yet? I would love to try it if that works!
Sent from my SM-T710 using Tapatalk
Beukhof1 said:
Nice! Good job mate!
Did you have time to look at wifi yet? I would love to try it if that works!
Sent from my SM-T710 using Tapatalk
Click to expand...
Click to collapse
Not yet, but I will take a look at it soon!
New build is out !
**********
15/12/2015 - Fixed Rotation/Orientation
- Lowered to 320 DPI
- Updated Screenshots
**********
Links have been updated!
Ok so to wifi :
I know most of you want as number 1. priority a working WIFI connection, but this doesn't seem to be that easy to fix, at least not for my empty brain. As you've probably already noticed, my debugging skills are still quite bad (Yes I'm still learning... Yes I'm not perfect.... well maybe yes... ok no just kidding). The current issue i'm facing has probably to do something with the api drivers and wpa_supplicant. I've noticed that the KMSG doesn't even show a tiny trace of the cfg80211 driver and the nl80211 driver. If any developer out there knows what to do with the following log output when trying to access the wifi HAL / Enabling WIFI please tell me.
Code:
D/SoftapController( 3507): Softap fwReload - Ok
W/CommandListener( 3507): Failed to retrieve HW addr for wlan0 (No such device)
D/CommandListener( 3507): Setting iface cfg
E/WifiStateMachine( 3901): Unable to change interface settings: java.lang.IllegalStateException: command '90 interface setcfg wlan0 0.0.0.0 0 down' failed with '400 90 Failed to set address (No such device)'
E/WifiMonitor( 3901): killSupplicant p2ptrue init.svc.wpa_supplicant=unknown init.svc.p2p_supplicant=unknown
I/wpa_supplicant( 7883): Successfully initialized wpa_supplicant
I/wpa_supplicant( 7883): rfkill: Cannot open RFKILL control device
E/wpa_supplicant( 7883): Could not read interface wlan0 flags: No such device
I/wpa_supplicant( 7883): nl80211: Driver does not support authentication/association or connect commands
E/wpa_supplicant( 7883): Could not read interface wlan0 flags: No such device
E/wpa_supplicant( 7883): wlan0: Failed to initialize driver interface
E/WifiStateMachine( 3901): Failed to start supplicant!
D/WifiService( 3901): setWifiEnabled: false pid=5956, uid=1000
E/WifiService( 3901): Invoking mWifiStateMachine.setWifiEnabled
D/SoftapController( 3507): Softap fwReload - Ok
W/CommandListener( 3507): Failed to retrieve HW addr for wlan0 (No such device)
D/CommandListener( 3507): Setting iface cfg
E/WifiStateMachine( 3901): Unable to change interface settings: java.lang.IllegalStateException: command '93 interface setcfg wlan0 0.0.0.0 0 down' failed with '400 93 Failed to set address (No such device)'
E/WifiMonitor( 3901): killSupplicant p2ptrue init.svc.wpa_supplicant=unknown init.svc.p2p_supplicant=unknown
I/wpa_supplicant( 7915): Successfully initialized wpa_supplicant
I/wpa_supplicant( 7915): rfkill: Cannot open RFKILL control device
E/wpa_supplicant( 7915): Could not read interface wlan0 flags: No such device
I/wpa_supplicant( 7915): nl80211: Driver does not support authentication/association or connect commands
E/wpa_supplicant( 7915): Could not read interface wlan0 flags: No such device
E/wpa_supplicant( 7915): wlan0: Failed to initialize driver interface
E/WifiStateMachine( 3901): Failed to start supplicant!
D/WifiService( 3901): setWifiEnabled: true pid=5956, uid=1000
E/WifiService( 3901): Invoking mWifiStateMachine.setWifiEnabled
D/WifiController( 3901): WifiController msg { when=0 what=155656 target=com.android.internal.util.StateMachine$SmHandler } deferred for 313ms
D/WifiService( 3901): setWifiEnabled: false pid=5956, uid=1000
E/WifiService( 3901): Invoking mWifiStateMachine.setWifiEnabled
D/WifiController( 3901): DEFERRED_TOGGLE handled
D/WifiService( 3901): setWifiEnabled: true pid=5956, uid=1000
E/WifiService( 3901): Invoking mWifiStateMachine.setWifiEnabled
D/SoftapController( 3507): Softap fwReload - Ok
And then.... all of a sudden a wild google appeared!
Big thanks to @gladiac
Build coming soon!
CTXz said:
And then.... all of a sudden a wild google appeared!
Big thanks to @gladiac
Build coming soon!
Click to expand...
Click to collapse
Thanks a lot for the effort you're putting into this.
New build 19/12/2015
This build is no longer PRE-ALPHA but ALPHA
**********
19/12/2015 - ROM is now ALPHA
- Fixed Wifi
**********
CTXz said:
And then.... all of a sudden a wild google appeared!
Big thanks to @gladiac
Build coming soon!
Click to expand...
Click to collapse
Ok, this convinced me, sdcard 4th, wifi 3rd. Build on the T810 stack is running.

[WIP!][KERNEL] Razer Phone 2 Kernel (+exfat module, TWRP device tree, and more!)

Hi all!
What is this?
This is my mostly-working Razer Phone 2 Kernel and TWRP device tree!
I've been reading threads where people are having issues compiling the Razer-provided source for the RP2 and figured I should post what I have so others can use it to help achieve a fully working source-built kernel.
I'm also including a set of scripts to repack a Magisk-patched boot.img so you can iterate on building a new kernel rapidly, and am including a prebuilt magisk-patched boot.img with the custom kernel so we can QA other features while focusing on the known-broken things.
Also also, I'm including an exfat kernel module (not built into kernel for now) so that can be tested too!
Click to expand...
Click to collapse
Why is this mostly-working?
I've tested many features on this kernel and so far the only feature *not* working is the microphone. (Audio recording, haven't tested in-call audio)
This kernel is a mashup of Razer's source and a few other OSS repos from CAF - specifically the TFA98XX driver, and the audio-kernel repositories, so there's a bit of integration left to do to get all the audio features working.
I also had to edit the defconfig to get the DTB to build, and have to build with some special flags to use the prebuilt DTB compiler (dtc) since the one included in the source isn't capable of compiling the FIH DTBs inside the Razer-provided source (correct me if I'm doing something wrong here, but this was how I ended up getting it to work).
The kernel parameter skip_initramfs has also been renamed to skip__initramfs to break the silly bootloader skipping the ramdisk (and thereby breaking Magisk). This means you don't need to run Magisk's binary patch to rename that kernel argument to make Magisk or TWRP work.
Keep in mind, though, that this means if you use this kernel with a 100% stock ramdisk, you'll only ever get recovery since new Android ramdisks only contain recovery! (Thanks Dees_Troy for the refresher course!)
If you're familiar with the new audio-kernel CAF stuff, please let me know! I could use your assistance getting the microphone working.
It seems like the microphone isn't working because of some mismatches between the in-kernel msm audio drivers and the Razer customized drivers in the vendor partition.
I get errors like
Code:
[31269.485217] send_afe_cal_type cal_block not found!!
in dmesg when attempting to record audio. This seems isolated to the q6afe drivers in the kernel (specifically here: https://github.com/thecubed/android_kernel_razer_sdm845/blob/master/techpack/audio/dsp/q6afe.c#L1593 ) not playing nice with the prebuilt snd_soc_sdm845 kernel module.
Click to expand...
Click to collapse
Where do I get this?
See here for the TWRP device tree (and detailed instructions on how to set up your build tree): https://github.com/thecubed/android_device_razer_cheryl2
See here for just the kernel source: https://github.com/thecubed/android_kernel_razer_sdm845
See here for a kernel-less boot.img skeleton that you can drop your newly minted kernel into and repack with mkbootimg: http://downloads.codefi.re/thecubed/aura2/kernel/magisk_custom_kernel_skel.tar.gz
See here for a prebuilt boot.img with this custom kernel which includes Magisk: http://downloads.codefi.re/thecubed/aura2/kernel/boot_magisk_custom_9.img
See here for an exfat module you can insmod from a booted phone with custom kernel to try mounting exfat SD cards: http://downloads.codefi.re/thecubed/aura2/kernel/exfat_module.tar.gz
See here for a stock Magisk-patched boot.img for when you're done playing with this: http://downloads.codefi.re/thecubed/aura2/kernel/boot_magisk.img
Click to expand...
Click to collapse
How do I use this?
First off, this isn't for the average user. This kernel is *under development* and is not fully working yet. This means don't try this kernel on your mom's phone, your neighbor's phone, or any device that you aren't comfortable developing for.
Secondly, to test this, you'll need to be oem unlocked. There's plenty of guides to do this, but be aware that it erases all data on your phone when doing so. You could try using adb backup first, but I didn't have much success with that.
I'd suggest looking at the first link in the Where do I get this section and reading the README for the device tree as it'll have the most detailed instructions.
The gist is you'll need to download a minimal OmniROM manifest, add some lines to a file in .repo/local_manifests/cheryl2.xml, and run mka kernel to get a kernel image.
After that, you'll want to use mkbootimg to build a bootable magisk-patched boot.img, which you'll flash to your device with fastboot flash boot_X path/to/boot.img (where X is the active boot partition).
Once you've got the Image.gz-dtb file from your $OUT/obj/KERNEL_OBJ/arch/arm64/boot/Image.gz-dtb you'll want to repack it into a magisk-patched boot.img
Repacking the boot.img can be done with this command:
Code:
mkbootimg \
--kernel Image.gz-dtb \
--ramdisk boot_magisk.img-ramdisk.gz \
--cmdline 'console=ttyMSM0,115200n8 earlycon=msm_geni_serial,0xA84000 androidboot.hardware=qcom androidboot.console=ttyMSM0 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 service_locator.enable=1 swiotlb=2048 androidboot.configfs=true androidboot.usbcontroller=a600000.dwc3 buildvariant=user' \
--base 0x00000000 \
--pagesize 4096 \
--kernel_offset 0x00008000 \
--ramdisk_offset 0x01000000 \
--second_offset 0x00f00000 \
--tags_offset 0x00000100 \
--os_version 8.1.0 \
--os_patch_level 2018-10 \
-o ../boot_magisk_custom.img
Click to expand...
Click to collapse
FAQ
Does this have TWRP?
No. This does not have TWRP. The device tree is for TWRP eventually, and to make compiling the kernel easier (since Android kernels don't like compiling outside of Android's makefile system anymore)​
Does this have Magisk?
Yes! It's "pre-patched" too, as long as you're using my prebuilt one above.​
Do I need the custom kernel to use the exfat module?
Yes. This is because the Razer stock kernel has module signing forced. I don't have Razer's kernel module signing key so I can't compile kernel modules for the stock kernel. My kernel has module signing set to allow mismatched signatures, so both the Razer modules in /vendor/lib/modules (required for sound) and my exfat module can coexist.​
Why is exfat not compiled into the kernel?
Laziness, primarily. Actually, in this case I just didn't want to add extra variables to testing the kernel. If adding exfat into the kernel directly causes other issues it could potentially derail my quest to get this kernel up to par with the stock kernel.​
Why did other kernels not boot?
Most likely due to incompatible audio-kernel revisions, or dtb issues. I'm not sure, but getting this kernel to compile required a bit more hacking than it should have.​
Are you working on TWRP for Razer Phone 2?
Yep. Look for another post once the kernel is good to go. I aim to get encryption support working too, unless Dees_Troy beats me to it ​
Is audio still not working?
I'll update the post to remove the WIP tag and the section about audio as soon as it's working.​
Is anything else not working?
Feel free to download and test to let me know what else isn't working and I'll add it to the OP.​
Click to expand...
Click to collapse
Acknowledgements
Special thanks to Rashed97 and Dees_Troy for all their help.
Click to expand...
Click to collapse
y u quote OP?
Thanks for your work! Looking forward for a stable version. Wanna help but RP2 is currently my only working phone..
u sir,deserve a beer,thanks for working rp2 and not to forget other devs who help u along the way,we will wait patiently,cheers!!!!
Thank you.
Interesting discovery just now, seems that the stock kernel gives the same 'error' in dmesg when recording audio (but obviously audio recording still works).
Code:
[ 1365.950315] send_afe_cal_type cal_block not found!!
This could mean that Razer doesn't have a calibration profile for the microphone anyway (interesting, wonder if there's an opportunity to improve recording quality here?) and that I'm barking up the wrong tree re: calibration mismatches.
I've also confirmed that I get the same 'ASoC: no backend DAIs enabled for [backend name here]' messages in the stock kernel when brute force trying all PCM inputs with:
Code:
for f in `seq 1 80`; do tinycap /sdcard/wavs/device-$f.wav -D 0 -d $f -r 48000; done
It's also (very) possible that I don't understand how tinycap works.
I dumped the list of PCM inputs/outputs with:
Code:
for f in `ls -d /proc/asound/sdm845tavilsndc/** | grep pcm`; do echo "$f : `grep 'id' $f/info`"; done
and
Code:
cat /proc/asound/pcm
on both kernels (stock and custom) and they seem to match.
I'm thinking I should figure out how to record sound outside of android (from adb only) from stock kernel, and use that same test to try in the custom kernel. If I can find a test like that, I should be able to determine if I need to rename one of my DAI links to match whatever's baked into the XML files in /vendor/etc .
Any ideas?
Are you using the audio.a2dp.default.so driver?
Warrior1988: A2DP isn't in play here, and I'm using the stock /system and /vendor partitions, so any razer-customized tweaks are still present.
Currently, I've been working on figuring out the codec mappings to make sure that when audio is being recorded in the custom kernel that all the appropriate routing is set to enable audio from the tfa98xx chip (NXP amplifier, apparently supports digital microphones too?) or the wcd934x codec.
I'm not sure where the microphones are physically connected internally, so I'm working backwards from what gets enabled/disabled when recording audio in the stock kernel.
So far I have observed a few things (pardon my potentially incorrect terminology, the whole linux ASOC sound layer is new to me):
1. Audio in the stock and custom kernels is being captured by the mixer device called "SDM845 Media1", and it is capturing from SLIMBUS_0_TX input.
Code:
[Recording]
aura:/sys/module # cat /sys/kernel/debug/asoc/sdm845-tavil-snd-card/SDM845\ Media1/state
[SDM845 Media1 - Playback]
State: new
Backends:
No active DSP links
[SDM845 Media1 - Capture]
State: start
Hardware Params: Format = S16_LE, Channels = 1, Rate = 16000
Backends:
- SLIMBUS_0_TX
State: start
Hardware Params: Format = S16_LE, Channels = 1, Rate = 48000
2. You can also see when recording and not recording that in both kernels the SLIMBUS_0_TX input is wired correctly to the right mixer:
Code:
[Not recording]
aura:/sys # cat ./kernel/debug/asoc/sdm845-tavil-snd-card/platform:soc:qcom,msm-pcm-routing/dapm/SLIMBUS_0_TX
SLIMBUS_0_TX: Off in 2 out 0 - R0(0x0) mask 0x1
stream Slimbus Capture inactive
out "static" "SLIM0_UL_HL"
in "static" "Slimbus Capture"
in "static" "BE_IN"
[Recording]
aura:/sys # cat ./kernel/debug/asoc/sdm845-tavil-snd-card/platform:soc:qcom,msm-pcm-routing/dapm/SLIMBUS_0_TX
SLIMBUS_0_TX: On in 2 out 1 - R0(0x0) mask 0x1
stream Slimbus Capture inactive
out "static" "SLIM0_UL_HL"
out "SLIM_0_TX" "MultiMedia1 Mixer"
in "static" "Slimbus Capture"
in "static" "BE_IN"
Now that I've observed those things, I need to do a bit more research on how audio can get enabled/disabled on each of the chips that touch it.
For instance, in the custom kernel, I noticed that during recording sounds the DMIC* lines on the second tfa98xx aren't enabled. I haven't checked in the stock kernel yet - but if the tfa98xx chip is providing mic bias, it's possible that everything is wired right for input but since the mic bias isn't on, the mic isn't powered and thus we get no sound.
(Updated side note, why is Razer Phone 2 is using two TFA9888 chips? The tfa98xx.cnt firmware references TFA9892 which is mono only, too. I need to see a disassembly to figure out what chips it's actually using...)
Code:
aura:/sys # cat ./kernel/debug/asoc/sdm845-tavil-snd-card/codec:tfa98xx.4-0034/dapm/DMIC*
DMIC1: Off in 1 out 0
out "static" "AIF OUT"
DMIC2: Off in 1 out 0
out "static" "AIF OUT"
DMIC3: Off in 1 out 0
out "static" "AIF OUT"
DMIC4: Off in 1 out 0
out "static" "AIF OUT"
aura:/sys # cat ./kernel/debug/asoc/sdm845-tavil-snd-card/codec:tfa98xx.4-0035/dapm/DMIC*
DMIC1: Off in 1 out 0
out "static" "AIF OUT"
in "static" "MIC BIAS1"
DMIC2: Off in 1 out 0
out "static" "AIF OUT"
DMIC3: Off in 1 out 0
out "static" "AIF OUT"
in "static" "MIC BIAS3"
DMIC4: Off in 1 out 0
out "static" "AIF OUT"
Update: just noticed that this path doesn't exist on stock kernel. So the TFA driver I have doesn't match the one Razer is using. Interesting!
Also, I'm not sure why SLIMBUS_2 playback/capture aren't shown as 'dynamic DAI' linked (the '(*)' means it's a dynamic DAI)... Probably not important though.
Code:
aura:/proc/asound # cat pcm
00-00: MultiMedia1 (*) : : playback 1 : capture 1
00-01: MultiMedia2 (*) : : playback 1 : capture 1
00-02: VoiceMMode1 (*) : : playback 1 : capture 1
00-03: VoIP (*) : : playback 1 : capture 1
00-04: MultiMedia3 (*) : : playback 1
00-05: SLIMBUS_0 Hostless (*) : : playback 1 : capture 1
00-06: AFE-PROXY RX msm-stub-rx-6 : : playback 1
00-07: AFE-PROXY TX msm-stub-tx-7 : : capture 1
00-09: AUXPCM Hostless (*) : : playback 1 : capture 1
00-10: SLIMBUS_1 Hostless (*) : : playback 1 : capture 1
00-11: SLIMBUS_3 Hostless (*) : : playback 1 : capture 1
00-12: SLIMBUS_4 Hostless (*) : : playback 1 : capture 1
00-13: MultiMedia5 (*) : : playback 1 : capture 1
00-14: Listen 1 Audio Service (*) : : capture 1
00-16: MultiMedia10 (*) : : playback 1 : capture 1
00-17: MM_NOIRQ (*) : : playback 1 : capture 1
00-18: HDMI_RX_HOSTLESS (*) : : playback 1
00-19: VoiceMMode2 (*) : : playback 1 : capture 1
00-20: Listen 2 Audio Service (*) : : capture 1
00-21: Listen 3 Audio Service (*) : : capture 1
00-22: Listen 4 Audio Service (*) : : capture 1
00-23: Listen 5 Audio Service (*) : : capture 1
00-24: Listen 6 Audio Service (*) : : capture 1
00-25: Listen 7 Audio Service (*) : : capture 1
00-26: Listen 8 Audio Service (*) : : capture 1
00-27: MultiMedia9 (*) : : playback 1 : capture 1
00-33: MM_NOIRQ_2 (*) : : playback 1 : capture 1
00-34: SLIMBUS8_HOSTLESS Capture (*) : : capture 1
00-35: Slimbus4 Capture tavil_vifeedback-35 : : capture 1
00-36: SLIMBUS_2 Hostless Playback tavil_rx2-36 : : playback 1
00-37: SLIMBUS_2 Hostless Capture tavil_tx2-37 : : capture 1
00-38: MultiMedia6 (*) : : playback 1 : capture 1
00-39: USB Audio Hostless (*) : : playback 1 : capture 1
00-80: QUAT_MI2S_RX Hostless (*) : : playback 1
Meanwhile, we've reached out to Razer to see if they'll bless us with the full and complete kernel source this time
I doubt it. They won't even answer simple questions as to an estimate of when we're getting Pie
blackknightavalon said:
I doubt it. They won't even answer simple questions as to an estimate of when we're getting Pie
Click to expand...
Click to collapse
>simple question
>eta
pick one
Any progress on this kernel? I'm really curious now that we have pie.
No progress as of yet, I've been busy with work recently and Razer hasn't dropped source for the new kernel version (still 4.9 but a different patch level).
I'm hopeful that Razer will drop the complete source for Pie's kernel and I can backport that to the Oreo kernel for those who want to keep the old OS.
I haven't updated my RP2 to Pie yet so I can test out any changes once the source for the new kernel is out. I'll be sure to post here when I have any updates
Audio-kernel source is out! https://s3.amazonaws.com/cheryl-factory-images/audio-kernel-aura-2009.tar.gz
I'll be rebuilding my kernel very soon and testing.
https://s3.amazonaws.com/cheryl-factory-images/
Warrior1988 said:
https://s3.amazonaws.com/cheryl-factory-images/
Click to expand...
Click to collapse
Yup, I'm building it right now!
Yup, it works! I have fully working audio and microphone now. Seems like there's a bunch of DAI changes and some offset changes to calibration stuff that FIH added (ugh).
Please hold while I get the commit up on my Github, and I'll get a build with exfat going here in just a minute after.
Plan is:
- Github updates (readme changes, etc) UPDATE: done
- Upload this current build I just tested for anyone that wants it
- Add exfat module to kernel and rebuild / test UPDATE: exfat support works, BUT I need to recompile vold to support exfat. I can mount the SD card just fine, but Android doesn't understand that it's mounted because vold isn't tracking it
Also, <3 u razer, thanks
I'm bummed to hear about the layoffs, and I really appreciate whomever uploaded the source even after that. Hopefully Razer's phone team will grow again and get to make us a Razer Phone 3 at some point in the future.
For anyone that's still running 8.1 and wants to try my custom kernel (no, no exfat support yet until I get vold fixed), here's a link: http://downloads.codefi.re/thecubed/aura2/kernel/boot_magisk_custom_10.img
Github has been updated as well.
I'll be sure to update the OP tomorrow when it's not 2AM.
EDIT: Fixed link, 2AM is not kind to my typing skills
Awesome work! Very excited to try it out tomorrow.
Also sad to see your post about their layoffs. Pretty fun phone with much potential for future.
I think some of the reviews are pretty harsh given the penchant of Pixel / Samsung / Apple worship out there.
Anyway, thanks so much for this.
thecubed said:
For anyone that's still running 8.1 and wants to try my custom kernel (no, no exfat support yet until I get vold fixed), here's a link: http://downloads.codefi.re/thecubed/aura2/boot_magisk_custom_10.img
Github has been updated as well.
I'll be sure to update the OP tomorrow when it's not 2AM.
Click to expand...
Click to collapse
Thank you for this!
It's showing up "Not found" on the download link though.
jal3223 said:
Thank you for this!
It's showing up "Not found" on the download link though.
Click to expand...
Click to collapse
Fixed the link in my previous post - sorry about that!
I'll be updating the OP tonight too when I get home from work.
Looking good! Is the sound as good as stock (or maybe better, considering the low volume crackling we get)?
Hoping to give this a shot soon, as soon as I figure out rooting on 9.0. I saw a thread about it, but nobody answered my question there, and light digging through threads didn't turn up an answer, so trying this kernel will have to wait a bit. Makes me miss the HTC root days, when finding out about root was a simple yes or no situation... lol.

Categories

Resources