[Android Software Development] UltraM8:
Being exhausted by coding Sauron, I wanted to listen to music & play with libs. I have bad news & good news.

Bad news for some android porting "experts". I disassembled several libs from Nougat update for Sony XZ:

Sony post processing & offload lib:

.plt:00000A60 ; Needed Library 'libcutils.so'
.plt:00000A60 ; Needed Library 'liblog.so'
.plt:00000A60 ; Needed Library '[B]libtinyalsa.so[/B]'
.plt:00000A60 ; Needed Library 'libc++.so'
.plt:00000A60 ; Needed Library 'libdl.so'
.plt:00000A60 ; Needed Library 'libc.so'
.plt:00000A60 ; Needed Library 'libm.so'
.plt:00000A60 ; Shared Name 'libsonypostprocbundle.so'

As you can see it depends on tinyalsa which can't be flashed - on most other devices you might loose sound. Here is the mixer functions from it:

__imp_mixer_close extern 00000000000070A4 00000004 R . . . . . .
__imp_mixer_get_ctl_by_name extern 00000000000070A8 00000004 R . . . . . .
__imp_mixer_open extern 00000000000070AC 00000004 R . . . . . .

Tinyalsa lib will also rely on Sony's mixer- which again might break any other msm8996 device.

Now, dseehx lib:

.plt:00002780 ; Needed Library 'libcutils.so'
.plt:00002780 ; Needed Library 'liblog.so'
.plt:00002780 ; Needed Library [B]'libaudioresampler.so[/B]'
.plt:00002780 ; Needed Library '[B]libaudioutils.so[/B]'
.plt:00002780 ; Needed Library 'libc++.so'
.plt:00002780 ; Needed Library 'libdl.so'
.plt:00002780 ; Needed Library 'libc.so'
.plt:00002780 ; Needed Library 'libm.so'
.plt:00002780 ; Shared Name 'libsonydseehxwrapper.so'

Since i don't have msm8996 device - I can't check if the highlited libs can be replaced. But i tried replacing above libs from sony z5 to mine m9 - and obviously i've lost sound)

Scrolling down the functions we see:

dsx_v2_FIR_Upcon8_multi16taps_ARMv7 dsx_filt_hr_ARMv7 000000000000A060 00000154 00000024 FFFFFFFFFFFFFFDC R . . . . . .
dsx_v2_FIR_Upcon16_multi32taps_ARMv7 dsx_filt_hr_ARMv7 000000000000A1B4 0000023C 00000024 FFFFFFFFFFFFFFDC R . . . . . .
dsx_v2_FIR_Upcon4_ARMv7_2ch dsx_filt_hr_ARMv7 000000000000A3F0 0000044C 00000024 FFFFFFFFFFFFFFDC R . . . . . .
dsx_v2_FIR_Upcon2_ARMv7_2ch dsx_filt_hr_ARMv7 000000000000A83C 00000358 00000024 FFFFFFFFFFFFFFDC R . . . . . .
dsx_v2_maximally_decimated_filtering_hr_ARMv7_2ch dsx_filt_hr_ARMv7 000000000000AB94 00000548 00000024 FFFFFFFFFFFFFFDC R . . . . . .
dsx_v2_FIR_filtering_downcon_ARMv7_2ch dsx_filt_hr_ARMv7 000000000000B0DC 00000184 00000024 FFFFFFFFFFFFFFDC R . . . . . .
dsx_v2_FIR_2band_filtering_ARMv7 dsx_filt_ARMv7 000000000000B260 000001C8 00000024 FFFFFFFFFFFFFFDC R . . . . . .
dsx_v2_[B]IIR[/B]_filtering_ARMv7_4taps_2ch dsx_filt_ARMv7 000000000000B428 000000C8 00000024 FFFFFFFFFFFFFFDC R . . . . . .
dsx_v2_[B]IIR[/B]_filtering_ARMv7_16taps_2ch dsx_filt_ARMv7 000000000000B4F0 00000184 00000024 FFFFFFFFFFFFFFDC R . . . . . .

IIR filters (Biquads thread to learn what is that), which again send us to mixer.

What is also interesting - XZ lost srsprocessing with N update, cause on MM we can see this:

.plt:0000B844 ; Needed Library 'libsonydseehxwrapper.so'
.plt:0000B844 ; Needed Library '[B]libsrsprocessing.so[/B]'
.plt:0000B844 ; Needed Library 'libc++.so'

The same stuff with other Sony effects stuff - too much dependances on libs, that can't be replaced, so you either won't boot at all, or will loose sound. So if you see someone claiming he ported Sony audio features from XZ (or other Xperias) to non-sony devices - spit in his face asap:p

Now good news. After i found this srs "bug/feature" i decompiled Htc's Bolt srsprocessing & it seems it can load without the flinger, but with other needed libs:

.plt:0001351C ; Needed Library 'libcutils.so'
.plt:0001351C ; Needed Library 'libutils.so'
.plt:0001351C ; Needed Library 'libmedia.so'
.plt:0001351C ; Needed Library 'libdl.so'
.plt:0001351C ; Needed Library 'libc++.so'
.plt:0001351C ; Needed Library 'libc.so'
.plt:0001351C ; Needed Library 'libm.so'
.plt:0001351C ; Shared Name 'libsrsprocessing.so'

XZ & Z5 MM users (and other devices as well, but i'm not sure) can try my Adaptive sound port, to check if srs can work for them. I guess that's why [MENTION=6825776]SSNJR2002[/MENTION] flashed Adaptive port & got that boomy Trumedia 3D sound)