Almost a year and a half i got my htc m8 drowned & I bought myself meizu m2 note. This device has the worst audio u can imagine, so i started modding it. The first idea was to use well known mods from android software development section. Still I was really unsatisfied with the audio, so I started "porting" & mixing things on my own. After a while i teamed up with several guys from 4pda, that stated "Dude, u do everything wrong. Most of the stuff u are using is not working". OK. So, instead of believing in their words I googled how to make logs, got myself a proper Disassebler & start discovering on how things are working for real.
It's been a huge drama over this thread between me & Arise team. But they are sitting on the very top of the junkyard & there are plenty of "port" mods in this xda section, where things are even worse. I understand that users & evangelists of these mods will call me idiot & stupid, but several people that asked "hey guys, can u explain me how does *thatparticulartechnology* works?" & those people never had a chance to have clear answers. Have u ever interested why? Because people don't know. They think, they can pull several apk's, libs, jars, etc - and this makes effects to work. Well in some cases like Dolby, previous MaxxAudio builds, Am3D, Arkamys - that will work. But for most others it WON'T EVER (well there is a trick, but no one except one guy can do that).
Now I'm gonna share with you all of my findings:
Beats Audio. It's been a very huge history in putting beats libs & binaries into mod's. The first thing you need to consider - beats are deeply bind in HAL. Original HTC m7 flinger has special beats switchers in it, that control the whole effect. Beats API then is tied to Sense framework & several others files. If we open the original file from the M7 - we see that the effect starts with reference to 16A44 substream, and then goes on distributing to multi-channel substreams. So the only thing u need to do - port flinger from m7 to the desired device. The only way to do that - closed arm porting - that is a very tricky way I still don't understand, but Sun_dream successfully did that several times (last time he ported H/K to m9 from m8). Well, we also can replace the HTC M8 flinger with beats one entirety – it will work, but this trick works only under MM. No way to replace flinger on MM & up. All of those "dummy-binaries" like "beatsbass", "beatsnormal", renamed libraries & other stuff - is just nothing but a trash that never worked properly & never will.
Pictures:
Harman/Kardon & Jbl. Another HTC technology that people desperately want to port. H/K switcher stays in flinger just the same as Beats. The only way to fully port that - using closed arm porting, but still u would need Htc device for that. There is no other way.
Harman/Kardon from Huawei. I never examined Huawei's pad flinger, but having "
libaudioflinger.huawei.so" libs in "ports" is a real surprise. As u can see it refers to original flinger to set HiFi setup. Not every HAL has those connections, or they are written in another way, so the libs won't work on many devices. Also, note that original MediaPad has Kirin CPU, which is different from Qualcomm, MTK & Exynos - the purpose of having H/K from is highly debatable.
Pictures:
SRS. From the dark ages of android, SRS was used by HTC to optimise your video experience. From 2015 Sony placed it in their XperiaX & XZ. If htc was using it for video stuff, sony uses it for speaker & virtualizer bundle. The problem behind porting it - the good all flinger & HAL. Yes, SRS is also written in flinger, so no way it will work outside original device.
What surprises more - is edits devs make to srs configs for those devices that originally has it - like Project Yume pushes the eg compressor value to 15000. While the maximum is only 1. Even if this effect works for your device, dear devs change it so deep, that it becomes non working)
DeeHX & LDAC. Sony’s Dseehx optimization works ONLY with proper player (Sony’s default music player & PowerAmp) that has DseeHX API. Even when you port SOMC & try to switch DseeHX you won’t hear any audible changes as this thing is also deeply integrated in the whole framework. If you take a look at Z2/Z3 threads - u can see, that before Sony made DseeHx for Z3, people tried to port it from Z5 & failed. Even when Sony finally made it working on Z3 the cap was 96 upsampling) This thing is very specific & hw dependent, so claiming that you have successfully ported - is ridiculously stupid.
Speaking of Ldac - i didn’t examine it deeply, but my guessing is that it is tied to adtp policy, which can’t be replaced with just your wish.
When you make a port of Sony features - you clearly can hear some noticeable changes to audio - i guess that is work of Xloud &/or Clearphase &/or ClearAudio. I didn’t found anything in logs, when i was playing with files from XZ & X. So let’s call this stuff as “partially working”.
DTS. There are various devices having DTS - vivo, asus, acer - but none of them are truly working. For example vivo stuff relates to huge amount of files in the system which works only on vivo. Asus DTS is seeking for particular app (which devs are deleting, cause it can’t be properly porter and modified) & for special flinger that has “Icepower” switcher in it, or at least has set the “fasttrack” to “false”. I’m waiting for acer jade2 - so i can take a look at it’s implementation of DTS, but as far other phones are very hw & framework dependent, I highly doubt it can be ported.
Audio_effects Configs. Now that is the “greatest” & the funniest part of all. I can imagine that “modders” are lazy enough, they don’t want to use disassembler & google. But writing mad configs - is a real disaster. Devs call this “method” an “engine” - what they basically do is putting a non working effect like “eagle_pipeline” (that is used in DTS effects) & trying to stick to standard proxy lib) The whole config in a typical way is written for soundfx API to take part in rendering the audio - like “preeffect” bundle is setting echo cancellation & controls gain, rewerbwrapper is controlling the amount of reverberations & is typically used for aux setup, etc. That is why most of audio_effects configs looks the same, with small integrations of other effects phone developers put into it, so that their own effect will work. But you can’t load unloadable effect (any of those i wrote above), by mixing it with standard API. HAL would appeal to particular library & particular uuid of the effect & only then, if needed will load standard API to render the sound.
This info i was collecting for last half a year. I might be wrong in several places, but I guess you got the main idea: most of effect technologies rely much on particular frameworks & Hw stuff. I’m not sorry for being rude to several people over this thread & there are several other guys i disrespect even more for trashing the whole AD&H section with their crap (no, not Arise guys, as i said - they are just the top of the junkyard). This whole situation leads me to idea, that 90% of “modders” doesn't know what they really do. What is even worse - other people take their work & use it in their projects, so after a while everyone believes that this stuff is truly working. That huge amount of partially working “mods” are trashing your system partition with up to 200+ mb of useless files! “Modders” make ridiculously stupid mistakes, but users still admire & praise them. I don’t need to soothe my ego that much, I just want to warn users of that rubbish:
please, don’t be fooled! Make your own research!