Git Product home page Git Product logo

drc-remover's Introduction

DRC (Dynamic Range Control) remover

This simple module disables DRC (Dynamic Range Control, i.e., a kind of compression) on all audio outputs (a 3.5mm jack, an internal speaker, bluetooth earphones, USB DAC's, etc.; You cannot bypass this DRC feature activated in a DAC chip itself even by using a proprietary pseudo USB driver) if DRC has been enabled on a stock firmware. For example, smart phones and tablets whose SoC's have an SDM??? or SM???? model number usually enable DRC on all audio outputs, but those whose SoC's have an MT???? model number don't enable DRC on any audio output.

This module behaves as follows:

  1. Checks whether this device enables DRC or not. If so, then continues below, else exits.
  2. Copies the active main audio policy XML configuration file (e.g. /vendor/etc/audio_policy_configuration.xml, /vendor/etc/audio/audio_policy_configuration_a2dp_offload_disabled.xml, etc.) to a folder under $MODDIR/system/vendor
  3. Edits the copied file under $MODDIR/system/vendor to replace 'speaker_drc_enabled="true"' with 'speaker_drc_enabled="false"'.
  4. Overlays this modified file on its original one.


  • Remark: There may be several main audio policy configuration XML files, but only one file being currently active will be copied, modified and overlaid on its original one. If you changed the active main audio policy configuration XML file by using a special settings menu or the like (e.g., "disable a2dp hardware offload" in developer options) after installing this module, please re-install or update this module to reflect the change.

  • This module has been tested on LineageOS and crDroid ROM's, and phh GSI's (Android 10 ~ 14, Qualcomm & MediaTek SoC, and Arm32 & Arm64 combinations). But some custom ROM's (not stocks and GSI's) intendedly invert or change the meaning of 'speaker_drc_enabled' switch on context, then this module cannot disable DRC.

  • See also my companion magisk module "Audio misc. settings" for simply improving audio quality with respect to the number of media volume steps and resampling distortion of the Android OS mixer (AudioFlinger), and my root script "USB_SampleRate_Changer" to change the sample rate of the USB (HAL) audio class driver and a 3.5mm jack on the fly like Bluetooth LDAC or Windows mixer to enjoy high resolution sound or to reduce resampling distortion (actually pre-echo, ringing and intermodulation) ultimately.

DISCLAIMER

  • I am not responsible for any damage that may occur to your device, so it is your own choice whether to attempt this module or not.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.