[Android Software Development] :
-crosspost from http://xdaforums.com/showpost.php?p=64902405

Hey [MENTION=4445176]guitardedhero[/MENTION] - here's my setup working with my Lover of Sound Profiles as of 2/8/16:

ViPERAudio 5.2.1 - Dark Sony Beats Edition (Permissive)

Once again, the only changes from ViPERAudio Sony Beats 5.2.1 are the replacement of the stock V4A APK with the Material Dark version, and the removal of the su.d folder and its entry from the updater script, for use with devices with an outside solution for Permissive Selinux, such as an init.d script or the Selinux Mode Changer app.

To clarify: If you have Enforcing Selinux this will not operate properly. If you already have Permissive Selinux set up on your device, or if your device has problems with supolicy scripts (as mine does), this should work excellently for you.

I've removed Atmos (rebased on just ViPERAudio) in this version as it was introducing severe popping, skipping and even slowdown to my sound even with every solution I've suggested so far implemented, which may be an issue unique to my device but it's not one I'm willing to tolerate. Atmos only really adds some volume and clarity to midrange and vocals, experientially, for me anyway, and the latest Lover of Sound Profiles easily compensate. I was also tired of having to mess with Memory Locker to keep Atmos from dying every time I started literally any other app besides it, Spotify and V4A.

--

Sonophilos (Lover of Sound) Profiles

Lock Effect Mode - Headset (so Speakers/Bluetooth get all ViPER options) - You will use separate profiles for Headphones and Speakers rather than the separate tabs. The Lover of Sound profiles include both preset as described below.

UI Setting - Expert (so you can see all these settings)

Sonophilos-Headphones:

PlaybackAGC - Enabled, Moderate / 4x Max Gain / -1.0Db Max Output

ViPER-DDC - Enabled, audio-technica ATH-M50 (set this to your headset after first install, then save over Headphones profile)

Spectrum Expansion - 0.5

FiREqualizer - (0.0, -0.6, -1.2, -1.8, -2.4, -3.0, -2.1, -1.3, -0.6, 0.0)

Convolver disabled, it's a major battery drain

Field Surround disabled, it's only really helpful on larger speakers

Differential Surround disabled, it's only really helpful on speakers spaced widely apart

Headphone Surround + Enabled, Level 1

Reverb disabled

Dynamic System enabled / High-End Headphone (v2) / 20%

^You may want to set this to Common Headphone (v2) or if you have one of the specific models listed use that preset

ViPER Bass - Enabled / Natural / 40Hz / 8.0Db

ViPER Clarity - Enabled / Natural / 8.0Db

Cure Tech+ Enabled, Moderate

AnalogX - Enabled, Moderate

Output Gain (-3.0Db) / Channel Pan 0.5:0.5 / Limit Threshold 0Db

Sonophilos-Speakers:

PlaybackAGC - Enabled, Moderate / 4x Max Gain / -1.0Db Max Output

ViPER-DDC - disabled

Spectrum Expansion - 0.5

FiREqualizer - (0.0, -0.6, -1.2, -1.8, -2.4, -3.0, -2.1, -1.3, -0.6, 0.0)

Convolver disabled, it's a major battery drain

Field Surround disabled, it's only really helpful on larger speakers

Differential Surround disabled, it's only really helpful on speakers spaced widely apart

Headphone Surround + disabled

Reverb disabled

Dynamic System disabled

ViPER Bass - Enabled / Natural / 40Hz / 10.0Db

ViPER Clarity - Enabled / Natural / 8.0Db

Cure Tech+ disabled

AnalogX - Enabled, Moderate

Output Gain 0Db / Channel Pan 0.5:0.5 / Limit Threshold 0Db

--

I recommend adding the following section to build.prop:

#
# ViPER4Android
#
audio.deep_buffer.media=false
lpa.decode=false
tunnel.decode=false
tunnel.audiovideo.decode=false
lpa.releaselock=false
lpa.use-stagefright=false
persist.sys.media.use-awesome=1
ro.audio.samplerate=48000
ro.audio.pcm.samplerate=48000

You can set the bottom two higher - check in your audio_policy.conf under compress_offload to see how high the dynamic sampler will go. My HTC One M9's goes to 192000 and so I have those bottom two samplerate settings set to that.

I also recommend adding the two values to audio_policy.conf as described in the OP, and the use of Don't Pause! so notifications go to vibrate when music is playing instead of "ducking" or pausing the music stream.

The combination of this mod and profiles and tweaks is an absolutely gorgeous sound out of the internal speakers, realizing the potential of the device much better and adding some substantial volume, and the headphone experience is practically theatrical. The sound and its processing also defies being interrupted, making for an immersive headphone experience or lengthy playlist jam.

--Cheers all, from Sonophilos the lover of Sound.