[Android Software Development] ZeroInfinity:
Just to let you know and all other audio developers on XDA

, there is one vital rule about audio libraries. Just adding any audio library will not mean that they will load. In most cases, the code needed to load the specific audio library is needed in audioflinger.so. It's not as easy as you think. Doing this sort of stuff (Hex editing libraries) can be a challenging thing. Piling a bunch of audio libraries (Not even knowing the source of the file) will just bloat up the mod - as well as the system partition. Adding H/K audio libraries will not work. The framework coding needs to be available as well to activate the effect, exactly like Beats Audio on HTC. HTC's audio features requires HTC's framework codes (Also, remember the libraries need to be loaded via audioflinger). If it's not there, the libraries will simply not work at all. A lot of users might believe that adding audio files will make the audio a million times better but that would obviously be a placebo. If you have audio libraries with nothing to enable/load them, will it work? No, absolutely not. Basic audio libraries such as libaudiopreprocessing, libbundlewrapper, libdownmix (If supported by android version), libldnhncr.so (Android 4.4.x only), libreverbwrapper and libvisualizer might work when just replacing stock ones. Additionally, OEM-specific audio libraries are a completely different thing as they use new codes to load those additional libraries. Furthermore, chipset-specific files are the same. They will not work on other chipsets simply because the hardware is totally different and the system will not load those files. Files specific to the Tegra chipset will definitely not work on the Qualcomm chipset. New files from Qualcomm S800 will not work on older chipsets due to new hardware. S600/S4 Pro will share the same files as the hardware is quite similar. I hope everyone can keep this information in mind in the future and I hope the best for all new audio developers out there on XDA ;) I just had to keep this clear to everyone so you don't get mixed up with what is working and what is not working.

Now, most of you might be asking "How do we port these OEM-specific audio features to our devices?" That depends on the oem. For example, Sony's audio effects (Walkman, ClearAudio+, xLOUD, Clearphase etc.) can be ported easily without the need to modify the audioflinger.so since Sony doesn't use audioflinger.so to load their effects. HOWEVER, HTC's audio effects such as SRS, Beats Audio, BoomSound or even Harman/Kardon requires the audioflinger to load their 'processing' libraries. For example, for SRS it's "libsrsprocessing.so", for Beats Audio it's "libbeatscorehtc.so", BoomSound also uses "libsrsprocessing.so", and Harman Kardon uses "libharmancorehtc.so" "libHHS_ARM.so" and finally "libSD_ARM.so". They are all loaded via audioflinger with the codes. The thing is, we can't port them that easily. The codes aren't already present in audioflinger so we can't simply hex edit and switch a value. We need the full code which we do not know as they are closed source and we can't just simply compile a new audioflinger with those codes. This is just the first part of the problem! HTC's audio effects also requires framework codes for the system OS to load those libraries and actually apply those effects. Additionally, Harman Kardon also requires chipset-specific libraries (audio.primary, audio_policy) (Specifically for MSM8974 chipsets) to support 192KHz 24Bit audio (As this is one of Harman's audio features.) Obviously, this won't work for just any chipset/hardware, it will only work on the HTC One M8 due to it having all the required codes to loads those files, support for HTC's framework and the S801 chipset.

I hope this clears up everything!