Maximizing the audio quality of bluetooth
I have enjoyed SBC XQ on TWS earphones very much and find a mod to maximize the audio quality by reducing jitters.
DISCLAIMER: I am not responsible for any damage that may occur to your device, it is your own choice to attempt this mod.
1. No battery optimizations of apps
music players, licensing apps, bluetooth (system app), magisk, keyboard
2. No bluetooth absolute volume and setting -6dB gain
In developer options, you can disable bluetooth absolute volume.
Reduce the sender side volume to -6dB gain level to avoid distortion of the
receiver side DAC. (DACs on portable devices are easily distorted by loudly
3. DRC disabled
In /vendor/etc/audio_policy_configuration.xml, there may be a line containing 'speaker_drc_enabled="true"'. This means that all audio output on your device is deeply compressed. Edit the line to replace "true" with "false" and reboot. Then, the DRC go away.
(Note: Pie GSI roms may have a bug that cannot disable DRC on bluetooth audio output.)
4. Using kernel adiutor to modify kernel settings
Change CPU governors to "performance". Change I/O schedulers to
"deadline" and set their parameters like:
fifo_batch:15, front_merge:1, read_expire:0, write_expire:460,
writes_starved:1, RQ_Affinity:2, read ahead buffer size:640kB
Change the 'Laptop mode' on in the virtual memory section. If there are core
control or CPU hotplug (MPDecision), set the controls off.
5. for MediaTek CPUs
MediaTek is using the EAS+ scheduler that affects CPU governors. To let
really performance mode, edit /vendor/etc/init/hw/init.mt????.rc to replace
'write /proc/cpufreq/cpufreq_sched_disable 0' with
'write /proc/cpufreq/cpufreq_sched_disable 1' .
6. Remove effects
In /vendor/etc/audio_effects.xml, remove effects relating to equalizing (reverb, base boost, virtualizer, etc.) and visualizer.
7. Reducing wifi jitter for streaming servcies and DLNA play
settings put global wifi_suspend_optimizations_enabled 0