Skip to content

NLSound v4.5 RELEASED

Latest

Choose a tag to compare

@Briclyaz Briclyaz released this 27 Sep 18:20
· 2 commits to main since this release
3dac070

🚀 NLSound Release Notes

⚠️ IMPORTANT NOTE ON MEDIATEK (MTK) DEVICES

  • Before: MTK-based devices had zero support in the codebase.
  • Now: Initial mechanisms and configurations for Dimensity and Helio chipsets have been implemented:
    • Unlocked 32-bit output and sample rates up to 384 kHz in the mtk_bessound and mtk_iir processing engines;
    • Completely deactivated the aggressive stock BesLoudness limiter/compressor (MTK_BESLOUDNESS_SUPPORT=no);
    • The speaker output stage has been switched to the high-efficiency CLASSH mode;
    • Hardware-level jitter reduction mode has been enabled for I2S digital audio buses (Low_Jitter);
    • Base system flags ro.vendor.mtk_hifiaudio_support=1 and hardware FLAC/APE/ALAC decoders have been enabled.
    • Fine, device-specific tuning of MTK audio pipelines will continue in future updates.

🎵 1. Global Audio Path Cleanup (Rejecting Placebos and Distortions)

The primary focus of this release is pure audio engineering. Dozens of obsolete and harmful tweaks, copied across forums for years and breaking the Android Audio HAL architecture, have been completely removed.

A. system.prop and AudioFlinger Cleanup:

  • Removal of the bogus 24-bit software decoder block:
    • Before: More than 20 non-existent AOSP/CAF keys were injected, such as vendor.audio.mp3.sw.decoder.24bit=true and vendor.audio.dsd.sw.decoder.24bit=true.
    • Now: All fictitious keys have been completely removed.
    • Impact on sound: Resolved an initialization issue with C2/OpenMAX media decoders where the system would fail over from hardware DSP offload to CPU-heavy software decoding, introducing jitter and excessive battery drain.
  • Removal of the forced 64-bit mediaserver (ro.mediaserver.64b.enable=true):
    • Before: Forcing 64-bit mode caused the audio server to crash on devices with 32-bit vendor libraries.
    • Now: Process architecture is determined natively by the firmware.
  • Removal of synthetic reverb (effect.reverb.pcm=1):
    • Before: Artificial echo was injected into the digital signal path.
    • Now: The parameter has been stripped. The sound is now focused, clean, with precise instrument localization and natural transient punch.
  • Removal of the static volume lock (persist.audio.hifi.volume=90):
    • Before: A fixed volume value disrupted the gain staging of Qualcomm WCD chips, clipping dynamic headroom and causing distortion on high-impedance headphones.
    • Now: Dynamic range headroom management has been fully restored to the native DSP.
  • Deprecation of archaic LPA flags:
    • Removed dead parameters from the Android 4.4–6.0 era (lpa.decode=false, lpa.use-stagefright=false).

B. Hardware Distortion Fixes in the Mixer:

  • Total deactivation of soft-clipping (Softclip):
    • Before: Softclip Enable mixer controls were set to 1, aggressively flattening and compressing volume peaks.
    • Now: Soft-clipping limiters (RX_Softclip, WSA_Softclip0/1) are forcibly zeroed out (0). The low-end is no longer muffled or muddy—restoring tight, punchy dynamics.
  • Disabling multiband compressors and noise gates (MBDRC, Compander, Noise Gate):
    • Before: Stock noise gates and compressors choked quiet string decays and natural room reverberations.
    • Now: COMP, MBDRC, Compander, and Noise Gate blocks have been completely zeroed in the mixer. Subtle textures and micro-details of live recordings are now fully audible.
  • Removal of stock battery-level speaker throttling:
    • Before: When battery levels dropped below 20%, vendor drivers forcibly choked volume and cut low frequencies.
    • Now: lowbattery_speaker_profile_support=false, battery_listener_enabled=false, and oplus_ear_protection_enable=false have been disabled.
  • Restoring true infrasonic sub-bass (Step 8):
    • Before: Stock High-Pass Filters (HPF) cut frequencies below 25–40 Hz to protect cheap phone hardware.
    • Now: The hardware HPF cutoff in DSP registers has been lowered to 4 Hz (CF_NEG_3DB_4HZ / MIN_3DB_4Hz), and the headphone path interpolator is switched to PURE_HIFI / CLS_H_HIFI. Quality headphones now deliver deep, physically resonant sub-bass.
  • Proper microphone gain staging (Step 3):
    • Before: The script blindly inflated primary ADC sensitivity (ADC Volume), introducing severe electrical hiss and room noise.
    • Now: Only digital recording decimators (DEC Volume) are calibrated, preserving clean voice capture without room rumble or clipping.

🎬 2. New Dolby Atmos Architecture (Step 14)

  • Universal DAX cleanup profile (dax-default.xml):
    • Disabled the automatic volume leveler (volume-leveler), eliminating sudden volume pumping during bass-heavy drops;
    • Disabled artificial dialogue enhancers (dialog-enhancer), removing metallic, synthetic vocal coloration;
    • Eliminated the hollow "sound in a bucket" effect in headphones while preserving punchy bass and wide imaging.
  • Dedicated stereo speaker tunings:
    • Xiaomi 13 Ultra / 14 Ultra (ishtar, aurora) — Precision phase balance, fine-tuned harmonic distortion (harmonic_2/3), and parametric GEQ profiles to flatten the stereo frequency response;
    • Oppo Find X6 Pro / OnePlus 12 (PGEM10, OP595D, OP528BL1) — Hardware offload unlock and removal of power caps on smart amplifiers.

🧩 3. Installer Architecture & Full OverlayFS / Mountify Compatibility

  • Adaptive path normalization (normalize_path):
    • Before: The installer hardcoded all files into /system/..., causing symlink collisions on modern dynamic partitions.
    • Now: The normalize_path() function automatically detects the environment:
      • Under KernelSU, APatch, Magisk OverlayFS, and Mountify, files are routed directly to their respective partition roots (/vendor, /product, /system_ext, /odm, /my_product);
      • Under classic Magisk (Magic Mount), the standard /system/ tree layout is maintained.
  • Elimination of leftover folder bugs in /data/adb/metamodules/:
    • Completely eliminated legacy post-fs-data.sh scripts with manual mount --bind loops that previously caused EBUSY (Device or resource busy) errors upon module removal.
    • Eliminated folder collisions caused by simultaneous /vendor and /system/vendor structures inside the module.
    • Injected PARTOVER=true into the root customize.sh to prevent MMT-Ex from dropping partition definitions via unset PARTITIONS.
  • Kernel protection against invalid overlays (/sys):
    • Before: The module created physical files under $MODPATH/sys/module/..., attempting to overlay the kernel sysfs filesystem, which is strictly prohibited by the Linux kernel and broke overlay managers.
    • Now: Kernel parameter tweaks (maximum_substreams=4096, high_perf_mode=1, impedance_detect_en=1) are injected as runtime echo commands into service.sh and applied safely after boot completion.
  • Reliable Xiaomi device detection:
    • Added fallback handling for the mivendor placeholder in ro.product.vendor.device, switching to the true codename from ro.product.device (resolving issues on Xiaomi 13/14 Ultra and Redmi Note 13).
  • Ultra-fast filesystem scanning:
    • Heavy directories such as /lib, /lib64, /framework, /fonts, and /bin are excluded from discovery. Initial system scanning time has been reduced from tens of seconds to 1–2 seconds.
  • Pure POSIX Shell migration:
    • The installer has been rewritten entirely for the native Android shell #!/system/bin/sh, eliminating bash dependencies and explicitly adding KernelSU and APatch binary paths to $PATH.

🎚 4. Hardware Mixer & Direct Patching Technology (Step 13)

  • Two-stage hardware register application:
    • The module no longer relies solely on boot scripts. Generated mixer parameters are directly injected into mixer_paths.xml as native <ctl> / <kctl> tags. Audio chips initialize in Hi-Fi mode from the very first millisecond of boot.
    • For live enforcement, parameters are also appended to service.sh with a sys.boot_completed=1 watchdog.
  • Updated tinymix_ext binary build:
    • Integrated a custom tinymix_ext utility compiled from AOSP sources with support for string selectors and crash prevention when sending unconventional hex values.
  • Native DSD support:
    • Activated native DSD routing in the mixer (DSD_L Switch=1, DSD_R Switch=1, switching TERT MI2S to NATIVE_DSD_DATA, and routing DSD over PCM via SLIMBUS).
  • Ultra-low ADM buffer latency:
    • Qualcomm Audio Downlink Module (ADM) DSP routing latency has been reduced to 2 ms (vendor.audio.adm.buffering.ms=2).

🔍 5. Hardware Scanner (Hardware Detection)

  • Implemented low-level bus scanning across I2C, SoundWire, Slimbus, Platform, and DeviceTree nodes for exact chip identification:
    • Amplifiers: Cirrus Logic (CS35L41), NXP/Goodix (TFA98xx), Texas Instruments (TAS25xx), Awinic (AW88xx), Maxim (MAX98373), Qualcomm WSA (WSA88xx);
    • DACs & Codecs: Qualcomm WCD (Aqstic / Bolero family), ESS Sabre, Asahi Kasei (AKM).
  • If a device is missing from the preset database, the installer dynamically generates an adaptive tuning profile based on the detected amplifier hardware.

🔊 6. Audio Stack & Codec Optimization

  • Direct PCM routing (Step 11):
    • The DIRECT_PCM flag is merged into existing direct streams via a logical OR (AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_DIRECT_PCM), preventing track initialization crashes and allowing compatible players (Poweramp, UAPP, Neutron) to send bit-perfect streams straight to the DAC without AudioFlinger processing.
  • Safe Hi-Res sample rate additions (Step 5):
    • Selected sampling rates are appended with a | delimiter rather than overwriting base rates, preserving standard 44.1 and 48 kHz clocks and preventing sound crashes in games and messaging apps.
  • Voice call protection:
    • The earpiece handset speaker (PAL_DEVICE_OUT_HANDSET) is hardware-excluded from forced resampling, completely preventing in-call silence bugs.
  • Bit-Perfect for USB DACs:
    • System audio policies enforce bit-perfect transmission: bit_perfect_supported=true, avoid_processing=true, and usb_output_direct_pcm=true.

🎛 7. System Audio Effects Policy (Step 12)

  • Streamlined installation wizard:
    • Deprecated manual IIR filter configuration has been removed. The installer is now structured into 15 logical steps.
  • Syntax-aware streaming parser for audio_effects.conf:
    • Implemented an awk stream parser that tracks bracket { } nesting depth, preventing corruption of audio effect configuration files.
  • Guaranteed call voice clarity:
    • Even when all sound effects are disabled, echo cancellation (AEC) and noise suppression (NS) modules under voice_communication are preserved with their original system library UUIDs.

📶 8. Bluetooth Audio (Step 10)

  • Comprehensive Absolute Volume bypass:
    • Applied an exhaustive property chain (persist.bluetooth.disableabsvol=true, vendor.btstack.absolute_volume=false, persist.vendor.btstack.absolute_volume=false, persist.vendor.btstack.absvolfeature=false), permanently resolving low-volume bugs on wireless headphones.
  • High-definition wireless protocols:
    • Unlocked high-bitrate Dual Channel mode for SBC (SBC HD / Dual Channel);
    • Enabled Qualcomm aptX Adaptive 2.1 and 2.2 specifications alongside the Lossless LE profile;
    • Bypassed AAC bitrate caps (persist.vendor.bt.a2dp.aac_whitelist=false, persist.vendor.qcom.bluetooth.aac_vbr_ctl.enabled=true).

⚙️ 9. System Properties, Latency & Resampler

  • Adaptive resampler calculation (Steps 4 & 5):
    • Android resampler filters in system.prop are calculated dynamically: image rejection STOPBAND is set to 100 dB for 16-bit and 144 dB for 24/32-bit, while the passband CUTOFF is widened to 93% on Hi-Res sample rates.
  • AAudio MMAP latency optimization:
    • Reduced hardware burst sizes (aaudio.hw_burst_min_usec=4000) and enabled exclusive policies (aaudio.mmap_policy=2, aaudio.mmap_exclusive_policy=2, aaudio.mixer_bursts=2).
  • Bypassing European volume limits (CSD):
    • Injected audio.safemedia.csd.force=false to prevent the OS from automatically throttling listening volume.
  • Cross-platform media step enforcement (Step 1):
    • Configured volume step counts across all known vendor branches (ro.config.media_vol_steps, persist.vendor.media.volume_steps, vendor.media.volume_steps, media.volume_steps) and applied directly to system settings via settings put system volume_steps_music.

📱 10. Expanded Hardware Preset Database (Step 13)

Added, updated, and optimized model-specific mixer register presets:

  • Xiaomi / POCO / Redmi:
    • Xiaomi 13 Ultra (ishtar), Xiaomi 14 Ultra (aurora), Xiaomi 10 Pro (cmi), Xiaomi 11 Ultra (star);
    • POCO F3 / K40 (alioth), POCO X3 Pro (vayu), POCO X3 NFC (surya), POCO F5 / Note 12 Turbo (marble);
    • POCO M3 / Redmi 9T (citrus, juice, chime, lime), Redmi Note 10 Pro (sweet, mojito), Redmi Note 9 Pro (joyeuse, curtana, gram, excalibur), Mi 10 (umi).
  • OnePlus:
    • OnePlus 13 (OP5D55L1), OnePlus 12 (OP595DL1), OnePlus 12R / Ace 2 Pro (OP5D3BL1, OP5D2BL1), OnePlus Ace 3 (OP5929L1), OnePlus 9R, OnePlus 9 Pro (ingres), and the OnePlus 7 / 7T / 7 Pro series (guacamole, hotdog).
  • Realme:
    • Realme 12 Pro+ (RE5C82L1, RE5C3B), Realme GT Neo 5 (RE5C4FL1), Realme GT Neo / GT 2 (RE5473, RE879AL1, kona).
  • Google Pixel:
    • The modern Pixel lineup: Pixel 6/6 Pro/6a/7 (bluejay, oriole, raven, panther), Pixel 8 and Pixel 8 Pro (shiba, husky), alongside a dedicated DSP-bypass profile for the Pixel 7 Pro (cheetah).
  • Samsung & Sony:
    • Samsung Galaxy S22 Ultra (b0q);
    • Sony Xperia 1 II (XQ-AT52) and Xperia 5 IV (XQ-CQ62).

🌐 11. Localization & Redesigned UI / UX

  • Total elimination of marketing AI slop:
    • All descriptions across Russian, English, and Traditional Chinese localizations have been completely rewritten with clean, technically grounded engineering language.
    • Stripped away pseudoscientific buzzwords ("Ultra dynamic range", "Maximum internal math", "Extreme Audiophile"); each step now concisely explains its real impact on the audio path (ALSA gain, frequency filtering, amplifier power rails).
  • Elimination of visual clutter ("One screen — one separator"):
    • Removed dozens of redundant separator bars that previously cluttered the terminal into a striped barcode. Each step now features a clean single divider line beneath the title, properly indented options, and eliminated duplicate [15/15] step tags.
  • Reliable profile save & restore (Restore Step):
    • Synchronized settings.nls across all 15 configuration items. When updating the module, pressing [VOL+] at the restore prompt seamlessly re-applies past configurations while properly recalculating all sample rate and bit-depth dependencies.

💾 12. Qualcomm ACDB Calibrations (Step 15)

  • Adaptive package installation paths:
    • ACDBDIR and calibration-clearing procedures are dynamically resolved via normalize_path(), preventing folder sync conflicts under KernelSU and OverlayFS.
  • Direct downloads without false disconnects:
    • The unreliable ping github.com check has been replaced with direct busybox wget fetching backed by a 15-second timeout and automated archive integrity validation.
  • Guaranteed calibration nulling:
    • Replaced ineffective touch calls with :> "$file" truncation to ensure target calibration files are zeroed out, reliably bypassing factory DSP limiters.
  • Expanded model compatibility:
    • Integrated and verified custom ACDB profiles for: Nothing Phone (2) (Pong), POCO F5 (marble), POCO F5 Pro / K60 (mondrian), Realme GT Neo 3T (RE5465), Realme GT5 Pro / Neo 6 (REE2B2L1), Xiaomi 13 Ultra (ishtar), Xiaomi 14 Ultra (aurora), POCO F3 (alioth), and the PQ83A01 platform.