Audio Compatibility Patch (Formerly Universal deep_buffer Remover) [MMTEx]

Search This thread
Mar 20, 2017
46
4
I have a rooted Samsung Galaxy A5 2016 with v4a. Spotify works when applying the attach audio effects in v4a settings, however youtube won't. I installed this module with every single combination in the installer but youtube still doesn't work with v4a. Can something be done ?
 

warrencoakley

Senior Member
May 1, 2014
918
166
47
Dublin
I have DDP, JDP, AML and ACP installed.

I've noticed over the pass few days that I'm getting a crackling sound from some games and notifications.

I unistalled the patch and everything is back to normal.

Is this a bug?
 

Riki Irawan

Member
Mar 11, 2016
23
1
@Zackptg5 ACP v2.0 is still not loaded at all with AML 4.0. Files are taken by AML and .aml.sh is failed to patch it again.

Without AML, its failed to patch audio policy, but usb audio policy only..
 
Last edited:

Zackptg5

Recognized Developer
Sep 18, 2014
4,148
7,005
zackptg5.com
Google Pixel 4a
Google Pixel 5a
@Zackptg5 ACP v2.0 is still not loaded at all with AML 4.0. Files are taken by AML and .aml.sh is failed to patch it again.

Without AML, its failed to patch audio policy, but usb audio policy only..

Can you flash acp, save the log in magisk manager, then attach that and the acp folder (zip it up) in /data/adb/modules_update? (Do this all before rebooting)
 

Zackptg5

Recognized Developer
Sep 18, 2014
4,148
7,005
zackptg5.com
Google Pixel 4a
Google Pixel 5a
@Zackptg5 https://drive.google.com/file/d/1EWsrQggtcXyBTuSgK7KNl4Kq3fpV2PKB/view?usp=drivesdk
v2.1 test
Still didn't patch audio policy, but only usb policy
btw v1.7.3 is patching audio policy correctly, even aml failed

It patched audio policy fine, looked over your results from 2.0 again and patched fine there too (I was looking for remove stuff instead of patch stuff lol)
So the remove logic is the old school deep_buffer remover and stuff where the entries are removed from the routes at the bottom of the xml file. With the patch logic (recommended because less buggy stuff happens with it vs removed), certain lines are changed. In the case of an xml (like yours):
  • deep_buffer and low_latency mixPort flags are replaced with "AUDIO_OUTPUT_FLAG_NONE"
  • raw mixPort flags are replaced with "AUDIO_OUTPUT_FLAG_FAST"

Checkout the common/install.sh file in v2.1 update I just pushed. It's much more readable/simple then the v1.x releases because I switched from unity to mmtex templates to make it magisk only - patches are simple removes rather than backups/substitutions
 
Last edited:

Zackptg5

Recognized Developer
Sep 18, 2014
4,148
7,005
zackptg5.com
Google Pixel 4a
Google Pixel 5a
thats v2.1 from magisk repo actually

---------- Post added at 02:05 AM ---------- Previous post was at 02:04 AM ----------



that is v2.1 from magisk repo that you uploaded actually
Can you try redownloading and installing? The aml log is giving an error for a line I removed in the latest update. Github can lag behind by a few minutes due to catching
 

Top Liked Posts

  • There are no posts matching your filters.
  • 97
    This fixes music and streaming apps (Spotify, Pandora, etc) that aren't processing audio effects for various equalizer applications through the modification of audio policy.

    Starting with v1.6 USB_policy patcher (upp) and Notification_helper remover (nhr) have been combined with acp. upp is to be used for usb dacs for v4a/jdsp. nhr is to remove notification_helper from audio_effects or delete the libvolumelistener.so binary. this prevents the "ducking" of v4a when you recive a notification and that notification comes in while playing music and v4a unprocesses and the processes again after the notification causing the volume to be extra loud. this stops that.

    The vol key options are as follows :
    - " Do you want to skip audio_policy patching? (Original acp before became 3in1 module)" This is asking if you want to skip what acp was before the combining of modules. if you are installing acp for spotify to process with v4a or jdsp then you'll want to select no here.
    - " Would you like to skip notification_helper remover?" If you dont mind the "ducking" v4a does or if it doesnt happen or your device then you'll want to select yes here.
    - " Would you like to skip usb policy patching for usb dacs?" If you dont use a USB extrenal DAC and v4a then you can select yes here.
    - " - Use lib workaround? -" If you arent having issues then you can select no here. Pixel 2's, 3's, and essential phones will have this selected as yes automatically.

    Download

    XDA:DevDB Information
    Audio Compatibility Patch, Tool/Utility for the XDA Community Apps

    Contributors
    ahrion, zackptg5, JohnFawkes
    Source Code: https://github.com/Magisk-Modules-Repo/acp


    Version Information
    Status: Stable
    Current Stable Version: v2.3
    Stable Release Date: 2020-11-10

    Created 2017-03-21
    Last Updated 2020-11-10
    14
    In light of recent discoveries, udbr has been redone and rereleased as Audio Compatibility Patch. The reasoning behind this is:
    • raw also needs removed in addition to deep_buffer on some devices
    • Instead of commenting out or removing deep_buffer and raw, we can instead change the flags to 'AUDIO_OUTPUT_FLAG_FAST'
    These together make this a more complete solution and should fix lots of compatibility issues some users were having.
    13
    Instructions:
    - Do not use this version with any v1.4/1.5 or v2.4/2.5 Audio Modification Version.
    - Before installing, uninstall Audio Modification Library and any other mods that do not use the latest Unity/AML v2.0
    - Reboot after uninstall
    - Install

    [UPDATED] Universal deep_buffer Remover
    v3.0:
    - Reworked the way deep_buffer removals function when a user uninstalls
    - Unity/AML v2.0: Massive installer and script overhaul
    - Unity v2.0: Added autouninstall (if mod is already installed and you flash same version zip again, it'll uninstall), thus removing the need for an uninstall zip
    - Unity v2.0: Added file/folder backup/restore of modified files
    - Unity v2.0: Added file/folder backup/restore of normally wiped files
    - Unity v2.0: Added Osm0sis @ xda-developers uninstaller idea (just add "uninstall" to zip name and it'll function as uninstaller)
    - Unity/AML v2.0: Added phh's SuperUser and LOS su support (note, LOS doesn't support sepolicy patching)
    - Unity/AML v2.0: Added proxy library to AML to allow the proxy effects found in multiple audio modules
    - Unity/AML v2.0: Added support for Magisk imgs located in /cache/audmodlib
    - Unity v2.0: Added system_root support for Pixel devices
    - Unity v2.0: Added system override (if you're on magisk but would rather have it install to system, add word "system" to zip name and it'll install everything but scripts to system)
    - Unity v2.0: Add Unity system props
    - Unity v2.0: Added vendor fix for Nexus devices
    - Unty/AML v2.0: AML functionality and uses overhauled
    - Unity/AML v2.0: Bug fixes
    - Unity/AML v2.0: Modified Unity Installer to allow use for non AML modules
    - Unity/AML v2.0: Moved scripts from Magisk .core to the individual module folder due to .core limitations
    - Unity/AML v2.0: New modular approach - no need to modify update-binary anymore: check instructions for more details on how this works
    - Unity v2.0: Reworked addon.d system install scripts
    - Unity/AML v2.0: Removed AML cache workaround by reworking AML changes via magisk_merge
    - Unity/AML v2.0: Reworked AML vendor audio_effects to not be overwritten by system audio_effects by commenting out conflicting lines
    - Unity v2.0: Reworked script permissions
    - Unity/AML v2.0: Update sepolicy for Magisk 13+
    - Unity/AML v2.0: Updated to Magisk module template 1400

    Download

    Previous Changelogs (Universal deep_buffer Remover):

    HTML:
    v2.4
    	- AudModLib v1.4 update which changes SELinux live patching to allow better compatibility between different devices, kernels, and roms; while also keeping the amount of "allowances" to a minumum
    	- AudModLib v1.4: changed post-fs-data(.d)/service(.d) shell script names for cosmetic recognition
    	- AudModLib v1.4: merge SuperSU shell script with MagiskSU post-fs-data(.d) script for less fragmentation
    	- AudModLib v1.4: added /cache/audmodlib.log to determine if script has run successfully
    	- AudModLib v1.4: more audio policy files and various mixer_paths files are now included in the framework
    	- Install script changes that include: major update to Pixel (A/B OTA) support, mounting changes, improved script efficiency, fixes & consolidation, and cosmetic fixes
    	- Add/fix proper addon.d support
    	- Add more deep_buffer remover compatibility between differing devices and ROMs
    
    v2.3
    	- AudModLib v1.3 update push which includes the script addition to allow various audio mods working with SELinux Enforcing
    	- Remove (audmodlib)service.sh and replace with post-fs-data(.d) audmodlib.sh, which should fix when root may be lost upon installing certain mods
    
    v2.2
    	- Added audmodlib.sh post-fs-data.d script
    	- Install script fixes
    	- post-fs-data.d script fixes
    	- Push AudModLib v1.2 hotfixes
        
    v2.1
    	- AudModLib v1.1 hotfix for bootloops issues on some devices
        
    v2.0
    	- Initial Magisk release
    13
    ACP has been updated to unity v3.2. This'll be the last update from me (@JohnFawkes is taking over)
    13
    Since I'm going to be much more busy in the coming months, I'm passing on this mod to @JohnFawkes who's been nothing short of amazing with helping me out with unity and these mods. Welcome aboard! :)