Native heap - OS Porting

I am working for a project on Android ICS 4.0.4,where I have requirement to increase native heap size.
Is it possible to increase native heap size..?Any idea..?
If possible how to increase ..?

Related

[MOD][TWEAK][03/05]Nexus S: Fidelity 2.0 - Ultimate Low latency audio playback

Note: This project originally came form Nexus S: Fidelity in Nexus S forum and I added Galaxy S support in version 2.0. This first release for Galaxy S so I don't expect everything to work fine like Nexus S especially I/O tweak that might not work well with Micro-SD card.
***WARNING!!! THIS MOD IS FOR PEOPLE WHO LOVE HAVING ULTIMATE AUDIO PLAYBACK SYSTEM ONLY (LOW LATENCY, LINEAR BIT-STREAM, AUDIO PERFORMANCE AT ITS BEST). IT'S NOT AIMED FOR LONG BATTERY LIFE OR FAST/SMOOTH PHONE AND MAY NOT WORK RIGHT ON YOUR PHONE. I'M NOT PROMISING ANYTHING ABOUT SOUND QUALITY IMPROVEMENTS AND DON'T WANT TO DEBATE ABOUT IT***
After spending months in github looking in Voodoo Sound code and gotta admit I have no idea how it could get any better. Finally, i found something interesting to improve sonic quality that can make us audiophiles smile for higher fidelity. Time to say goodbye to Android life with just Voodoo + cool music player alone.
Six months ago...after ICS firstly released, Google patched audiostream buffer in Nexus S' audio library increasing buffer size and latency after fixing latency delay in 4.0.2 and so on. For normal people's perspectives, it should be a good move as we get stable audio stream, more battery friendly and no more delay issue.
However, some purist computer audiophiles may not agree and have strong motto about 'low latency'. Some Windows players like JPLAY and XXHighEnd went far enough to feed single byte buffer feeding audio card. Not that lower is always better as I prefer minimum hardware buffer size over something extraordinary.
Back to the topic, so I messed around with Nexus S' audio library wondering why no one ever tried that before. As this is first attempt, I'll try to make things as extreme as possible according to what it's capable off.
As there're a lot of misconceptions about latency and jitter stuff so I'm not gonna explain how any those stuff will do about audio performance. Better let your ears decide it as it wouldn't hurt to try. Let's see what this brings to you now.
Features:
Features come in build packages below. Make sure to read all of them as you need to carefully pick out the best for your need. I added my own platform optimizations script in version 2.0 and improved audio library according to new platform performance. I also added Galaxy S (I9000) device support and will try to make more devices like Galaxy Tab and Galaxy Nexus in future. Also keep in mind that there's no best sounding build without sacrificing system's stability.
Builds:
platform: This is innovation of the year for all Android.....no for all Linux-based audio systems and technically work on any Android devices too. Specialized platform for lowest possible I/O latency and CPU utilization having audio thread optimized to its finest having real-time I/O with priority at highest level, Voodoo Sound and Color configuration for purist un-altered sound, kernel resource scheduling optimized to highend DAW level, CPU+I/O+kernel optimized for low latency, audio effects being disabled completely and plus_music patched audio library. It'll have to remove all existing scripts in init.d as most of them can screw this ones up. It'll give you best environment to run even more extreme patches in 2.0 at more battery-friendly setup.
plus_general: Designed for battery-friendly build at 10ms latency playback. You can use this on any ROM, kernels, tweaks you like. General build uses original ICS frame buffer size before modifications and trimmed down buffer size to be the same size as ICS frame for direct frame buffer transfer. I recommend getting plus_general if you don't want to get sloppy second like other builds.
plus_music: Also designed for battery-friendly like general but use even smaller frame buffer size to only 128 at 8 frames for 5ms latency playback at stock environment. It's designed for only music playback alone so you may get some playback problems aside from music playback. To make this stable, I increased number of frames in buffer pool from 4 to 8 according to ALSA's ideal specifications. It works fine on most governors but 100MHz or deep idle may cause some problems. This still works fine on most apps except you try having music played in background on intensive apps.
plus_google: This is alternative design for ideal 5ms latency playback based on plus_general design. Frame buffer size being reduce from original ICS frame buffer size (448) to 256 at 4 frames. The reason I picked ALSA's specifications for music is most ALSA drivers configured for low-latency use that but doesn't mean it's generally better than this ones. I personally prefer lower frames rather than lower frame size at same pool size.
extreme_direct: Designed for those who want to go extreme with lowest possible hw/sw buffer design having buffer pool exactly the same size as output buffer. It's plus_music having number of frames in buffer pool trimmed down from 8 to only 2. Yes.....2 for smallest possible frame buffer pool. You need to install optimized platform environment to keep this stable or run it on high performance setup.
extreme_linear: Designed for those who want to go extreme with smallest possible frame buffer size design. It has only 32 frame buffer size (1/32 of normal buffer size) and have 8 frames in buffer pool. I doubt you can run this at stable level without optimized platform. It has highest battery consumption of all but doesn't mean it works the best. Direct design provides fuller dynamics with more depth while this ones gives you richer ambient with smooth sound.
extreme_insane: Designed for those who want to go extreme with everything smallest possible. It has 32 frame buffer size (1/32 of normal buffer size) and only 2 frames in buffer pool making buffer pool 1/4 of other extreme patches. I said insane because it's beyond what this phone is capable of technically. Even in specialized platform on performance govenor may not music played till the end without single spike. You can only try making it stable with steve.garon's filesync off kernel after patching specialized platform. The reason I didn't include his kernel in because it causes occasional reboots and currupt data partition due to disabled filesync running insane task.
Downloads
nexus_s_fidelity_platform
nexus_s_fidelity_plus_general
nexus_s_fidelity_plus_music
nexus_s_fidelity_plus_google
nexus_s_fidelity_extreme_direct
nexus_s_fidelity_extreme_linear
nexus_s_fidelity_extreme_insane
nexus_s_fidelity_restore
Changelog
[03/05/12] Version 2.0
-Added audio thread priority optimizations to highest level
-Added audio I/O priority optimizations to highest real-time level
-Added CPU optimizations for low latency playback
-Added Galaxy S (I9000) device support
-Added kernel resource scheduling optimizations
-Added I/O optimizations for low latency playback
-Changed Voodoo Sound headphone gain to 0db (2db has too high hiss on low impedance phone)
-Fixed clear old scripts in init.d that didn't work last time
-Removed libaudioeffect_jni.so as it increase more load and latency
-Removed DSPManager as it can't be disabled and keep showing error during music playback
-Removed wildestpixel tweaks
-Tweaked audio library improvements
|-plus_music uses library from version 1.0 for Alsa's ideal specifications
|-plus_google added as alternative ideal 5ms design based on Google's Android code
|-extreme_direct now has 1/2 frame buffer size comparing to 1.1 version
|-extreme_linear now has 1/8 frames comparing to 1.1 version
|-extreme_insane added with everything smallest from other extreme patches
|-restore now also remove installed optimizations and restore libaudioeffect_jni.so
[28/04/12] Version 1.1
-Added plus_general for all-around use at 10ms latency playback
-Added plus_music for music focused use at 5ms latency playback
-Added extreme_direct and extreme_linear for non-compromise builds
-Added restore for people who want to use current AOSP build
[27/04/12] Version 1.0
-Initial release with kernel/tweaks for 8x1/8 frame buffer optimized for 5ms latency playback
If you experiences any playback problems, try changing minimum frequency or use suited governors, I/O, CPU settings in NSTools. I'm quite satisfied with battery-life in version 2.0 and never have issue after finalizing version 2.0.
Im sure its gonna work as the audio driver is the same. Good work Windows X!
Sent from my Nexus S using Tapatalk 2
Flashing
Edit: Flashed nexus_s_fidelity_plus_google.zip v2.0 (cm9 snapshot build:devil2 0.79 kernel:smartass v2:sio) and i must say i can notice significant change in sound quality.... dunno if its jus placebo but high n lows are jus awesome!!! thankx... will try other zips as well
Edit: audio playback is not smooth... it skips now n then +battery life is poor... will try future releases... nw back to stock... thankx
Looks interesting
Will flush... Thanks a lot for all your hard work and efforts.
I really appreciate what you're trying to do here. However, latency has nothing to do with audio quality, and JPLAY and XXHighEnd are what I like to call placebo-players.
Unless something is critically broken with the Android playback system, then this will have no measurable effect.
Using this system is not like using ASIO or WASAPI in windows.
Funkstar De Luxe said:
I really appreciate what you're trying to do here. However, latency has nothing to do with audio quality, and JPLAY and XXHighEnd are what I like to call placebo-players.
Unless something is critically broken with the Android playback system, then this will have no measurable effect.
Using this system is not like using ASIO or WASAPI in windows.
Click to expand...
Click to collapse
Have you tried it? Though I already said it's for people who want low latency audio and won't debate about it or promise about SQ, I'd like to point out tons of engineers having latency issue for pro audio apps to work properly in Android. Do some research about latency problems in Android and PulseAudio for more promising insight.
Btw, it seems I'm facing I/O starvation problems as I set read_ahead to 0. Trying to adjust it right now hoping to push 2.1 along with new device.
placebo-players, hahaha :ddddd
have fun in your 'bit-perfect' world measuring SQ with rightmark frequency responsce
OP: well, sticking to the topic, im testing at the moment, lots of thanks for making this.
looks like linear is almost stable for me, i have to toy a bit more though
p.s. i had to disable deep sleep
I think I made some progress about I/O optimizations. It seems to produce more linear I/O streaming with better stability and while keeping no read ahead cache. I'm going to test this with extreme patches and see how things will work there. Hopefully to get this stable with Galaxy S too tomorrow
btw, it's possible to make deep idle stable with extreme but not sure if recent optimizations will work with it.
I suspect you own the windows program called "Fidelizer" right.
If so, really appreciate your previous work.
Will flash this tool soon.
<i love Tapatalk and I9000>
Thx for this nice mod! I appreciate all mods that improve audio. Hopefully works with deep idle soon.
--------------------------------
Windows X said:
btw, it's possible to make deep idle stable with extreme but not sure if recent optimizations will work with it.
Click to expand...
Click to collapse
you mind sharing how?
then havin cpu on 400MHz wouldn't be that painful
btw shame we have so little of ram, you could afford caching files to RAM -> no SD read ahead problem
archdoraz said:
I suspect you own the windows program called "Fidelizer" right.
If so, really appreciate your previous work.
Will flash this tool soon.
<i love Tapatalk and I9000>
Click to expand...
Click to collapse
Fidelizer is also my work too. Thank you. I'm also Thai btw.
dark_knight35 said:
Thx for this nice mod! I appreciate all mods that improve audio. Hopefully works with deep idle soon.
--------------------------------
Click to expand...
Click to collapse
Actually, I used to get deep idle working on extreme patches but it'd be impossible with highly optimized I/O for lowest latency. I tried changing scheduler to noop alone leaving the rest to defaults and worked fine with deep idle but buffered stream won't be as good as what I'm listening to now. You can look forward to 2.1 for better optimizations.
pwlj said:
you mind sharing how?
then havin cpu on 400MHz wouldn't be that painful
btw shame we have so little of ram, you could afford caching files to RAM -> no SD read ahead problem
Click to expand...
Click to collapse
Extreme patches won't suffice for 200MHz. I monitored from adb and it keeps jumping up all the time which is very bad comparing to 400MHz that always stay the same if you listen to music alone. For deep idle, it's like I mentioned above. I just removed my I/O optimizations leaving noop scheduler alone and it worked fine. But I love bufferless I/O so you'd better stick with plus files if you want to keep deep idle.
Thanks.
What is the best quality mod?
is there an order for flashing this mods or I need to select only one mod?
For best version, that really depends on user preferences. Some prefer plus over extreme, some prefer google over music, some prefer direct over linear, etc. If you want good platform, make sure to flash platform along one of those above.
OK Flashed Plus_Music and switched back default and then back to Plus_Music again,
I found that I can notice it only a bit (like 5%) difference.
However I'm not an audiophile, just a serious listener,
so I can't recognize every detail of a sound.
The thing I noticed was clarity, if there was a difference.
I can also felt that the phone was slowed down a bit, not as
smooth as the default setting. I dont know about battery life
coz I just flashed it. Anyway, don't take this seriously,
I suggest you all to try a patch and report.
However, I admit that I was quite confused reading the op.
My suggestion is to make it easier to read, like splitting technical
detail into lists. I have problem choosing a patch coz I dont
understand the detail at all TT (my bad).
Anyway, thanks for your effort on this work and hope you
keep doing this. I will keep a look on this thread.
Equipment: SGS i9000 / Slim Rom 3.5 / Semaphore 1.1.1s kernel
/ Shure SE530 earphone / Flac and 320Kbps songs.
@archdorz Yes, the difference isn't very big, but with other sound improvements, you really get a nice sound. And to performance and battery, I think it will get better in coming releases.
--------------------------------
kosta20071 said:
Thanks.
What is the best quality mod?
is there an order for flashing this mods or I need to select only one mod?
Click to expand...
Click to collapse
Reducing buffer sizes have no effect whatsoever on sound quality.
http://forum.xda-developers.com/showpost.php?p=25624775&postcount=91
Windows X said:
extreme_linear: Designed for those who want to go extreme with smallest possible frame buffer size design. It has only 32 frame buffer size (1/32 of normal buffer size) and have 8 frames in buffer pool. I doubt you can run this at stable level without optimized platform. It has highest battery consumption of all but doesn't mean it works the best. Direct design provides fuller dynamics with more depth while this ones gives you richer ambient with smooth sound.
Click to expand...
Click to collapse
{
"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"
}
Sorry couldn't resist
supercurio, I think you should at least post something like I tried plus_music (128x8) and extreme_direct (128x2) but couldn't notice difference at all except stability lag. Too sad that I have yet to see people posting they tried but they can't get into what I proposed. Maybe absurdity is too high for them to give a try I guess.
And worst of all, what you bold is misinterpreted, really. I said direct design as design philosophy not extreme_direct. I'm quite disappointed seeing people carelessly make fun of things they don't really care about like this. I know this device can produce output for just 5mW and no where close to actual design. Don't take extreme stuff too much and consider proper things like plus ones please.
FYI: smooth sound caused by transient response of dynamics being trimmed down making bandwidth seems wide and good depth is not trimmed that bad. That's why there's designer in audio/video circuit having bufferless motto who want to avoid using buffer.
I think I agree with earlier posters can you show some numbers or data that PROVES your process works. Not to stir the pot anymore but the community knows and trusts supercurios work. I am a previous vibrant user now a nexus s user and Voodoo sound has been proven to be effective time and time again. So far all I have seen for your mods is user feedback which best case is very subjective.
You have the un-enviable task or trying to prove that your mods are inherently better against one of the most trusted audiophiles on xda. I will continue to follow this tread as its interesting but like so many others here, I inherently trust supercurio as over the 2ish years of voodoo I have yet to see that his information or processes are wrong or flawed.

Free performance increase!

Hello all, and sory for my english.
Today I find one of the best apps to increase performance on rooted devices. Search on google play for "Resolution Changer".
It allowbusbto trully change the rendering resolution of our device and increase the performance in games, for example, I managed to play nova 3 with full effects (auto enabled by default) at 19:10 1024x640. The app is awesome, so, please, give it a try and support it!
Sorry again for the barbarian like english, and please, someone "translate" this to well spoked english.
Antara33 said:
Hello all, and sory for my english.
Today I find one of the best apps to increase performance on rooted devices. Search on google play for "Resolution Changer".
It allowbusbto trully change the rendering resolution of our device and increase the performance in games, for example, I managed to play nova 3 with full effects (auto enabled by default) at 19:10 1024x640. The app is awesome, so, please, give it a try and support it!
Sorry again for the barbarian like english, and please, someone "translate" this to well spoked english.
Click to expand...
Click to collapse
Although the app doesn't increase performance, it does allow some games to play on certain devices.
However, thread is moved to Themes and Apps as it falls under the Apps.
MD
As far as I can see, on for example, gfx bench, setting resolution to 480x740 give me 10 fps (on screen) and with 800x1280 it give me 3.9 fps, it changes the render resolution of games and some gpu intensive ones, it really increase performance (nova 3 is the best example of this).

GravityBox Increasing Volume Steps

Hey guys, anyone using GravityBox to enable the option to increase the volume steps (in media) ?
Does this actually increase the maximum volume? The output is really poor (quiet) compared to my old Samsung GS2.
Or do I have to edit some system file to increase the parameters?
No it doesn't increase the maximum volume, it just adds more steps until you reach maximum.
For those interested, I just found this from Auras on these XDA forums, originally for Z1 but also for Z1C ... increase volume mod
http://forum.xda-developers.com/showthread.php?t=2476498

Any way to increase PlayGround image resolution?

Hi, after taking some pictures in PlayGround I noticed their resolution being 960*540, is there any way to increase this resolution?

increase max volume, LineageOS 17.1

Hello,
I freshly installed LineageOS on my LG G7 following this tutorial: https://forum.xda-developers.com/lg-g7-thinq/development/lineage-17-1-t4053695
Most of the things are working well. One question I had is whether it's possible go increase the max media volume. I know it was a but louder with stock Android. Also, the volume doesn't seem to increase when I put the phone on a solid surface as it did before.. Is this even possible after a ROM change?

Categories

Resources