[GUIDE] How to Make Audio Mods Work Amazingly Well

Mafioso

Senior Member
Nov 13, 2007
1,059
122
93
Pune
Does anyone face that v4a stops working suddenly. v4a status says processing no and stays the same on enabling/disabling it, only fix is to restart the phone which also doesn't work sometime. Then it starts working again after a while. Earlier this thing rarely used to happen, but its happening lot frequently now especially on wired earphones. BT most of the times is fine.

Is there a fix for it or a better solution than restarting the phone?

I'm on crdroid BTW with ainur sauron ,audio modification library and audio compatibility patch applied along with v4a (as per guide) and use musicxmatch as music player..
 

Mattari

New member
Dec 14, 2018
2
0
0
BenParz, i can't thank you enough for this! the choppy audio after installing Viper was making me crazy.
I'm running Lineage OS 05/18/2019 + nano gaaps

After mess around with this modules i got other way:

1 . Install Audio Compatibility Patch. It now comes with a multi-option installer, so you want to Select NO to the first option then choose Vol + (Patch New Logic). Select NO to the second option and then use Vol - (remove Volume Listener Library). This is done so that your audio won't crackle. You can skip USB Dac if you're not using it and you should choose NO at the last option (library workaround).

2. Download and install Viper4Android 2.7.1 Magisk Module here: https://zackptg5.com/downloads/v4afx_v2.7.1.0.zip .
More info : https://forum.xda-developers.com/android/apps-games/app-viper4android-fx-2-6-0-0-t3774651

3. Fix BT:

a. Rename "audio_policy_configuration.xml" in "/sbin/.magisk/img/acp/system/vendor/etc/audio" to "audio_policy_configuration.xml.bak".

b. Copy the audio policy configuration xml file from "/sbin/.magisk/img/acp/system/etc" to "/sbin/.magisk/img/acp/system/vendor/etc/audio".

4. Go to ViperFx and install drivers, Viper will auto Reboot!

I'm probably cutting some corners here, but i got no problems at all this far.

Fantastic!!!

The step 3 has been also useless, since my BTR3 works silky fine even without it!!!!

Thank you!!! :good::D
 

Amstro

Senior Member
Aug 14, 2015
448
79
58
Hi, thanks for the guide, followed all of the steps and installed Viper4Android, but when i get notifications the sound gets crackled. Music and video playback has no problems at all though, so i was wondering if there's a solution for it?
 

paarthkhatri

Senior Member
Jul 6, 2016
128
14
18
Hi, thanks for the guide, followed all of the steps and installed Viper4Android, but when i get notifications the sound gets crackled. Music and video playback has no problems at all though, so i was wondering if there's a solution for it?
Yes, there is a solution to it. Just read the post above. There is a heading named "Bluetooth fix"
 

Amstro

Senior Member
Aug 14, 2015
448
79
58
BenParz, i can't thank you enough for this! the choppy audio after installing Viper was making me crazy.
I'm running Lineage OS 05/18/2019 + nano gaaps

After mess around with this modules i got other way:

1 . Install Audio Compatibility Patch. It now comes with a multi-option installer, so you want to Select NO to the first option then choose Vol + (Patch New Logic). Select NO to the second option and then use Vol - (remove Volume Listener Library). This is done so that your audio won't crackle. You can skip USB Dac if you're not using it and you should choose NO at the last option (library workaround).

2. Download and install Viper4Android 2.7.1 Magisk Module here: https://zackptg5.com/downloads/v4afx_v2.7.1.0.zip .
More info : https://forum.xda-developers.com/android/apps-games/app-viper4android-fx-2-6-0-0-t3774651

3. Fix BT:

a. Rename "audio_policy_configuration.xml" in "/sbin/.magisk/img/acp/system/vendor/etc/audio" to "audio_policy_configuration.xml.bak".

b. Copy the audio policy configuration xml file from "/sbin/.magisk/img/acp/system/etc" to "/sbin/.magisk/img/acp/system/vendor/etc/audio".

4. Go to ViperFx and install drivers, Viper will auto Reboot!

I'm probably cutting some corners here, but i got no problems at all this far.
These are all the steps that you did to remove the cracking sounds? You didn't install BusyBox?
 
Jun 9, 2015
7
10
0
These are all the steps that you did to remove the cracking sounds? You didn't install BusyBox?
No BusyBox needed.
There is also another way that is working for me till now:

Hi Again!
After some time of testing, i think i got it how to use Audio Compatibility Patch (1.7.3+) with Lineage OS properly on our device:

Skip audio_policy patching?
- No

Patch flags or remove selections?
- Remove (old logic)
If patched the audio gets worse/lower on speaker/jack.

Would you like to skip notification helper?
- No

Remove notification helper effect or volume listener library?
- Remove volume listener library

Would you like to skip usb policy patching for usb dacs?
- Whatever

Use library workaround?
- No
If used causes bluetooth routing problems.

No Audio Modification Library needed.
After this sequence, my earphones,bluetooth and speaker worked fine with ViperFX 2.7.1, especially the jack, witch was really quieter and muffed before.
Can you guys try it out?
 
  • Like
Reactions: Amstro

YasuHamed

Senior Member
Dec 17, 2013
2,152
849
183
is there a way to alter MIXER PATH file(s) in modified VENDOR images? to produce LOUD LOUDER music on earphone?
i used to do that on REDMI N5P but not on Poco and really miss that!
 

tj65

Member
Jul 5, 2011
36
8
28
Hello, i'm searching for a way to enable V4A for my USB DAC (GGMM A1). I'm on 7.1.2 AOSP (AXON 7) and everything works fine except USB. Has someone a working solution?
 

tj65

Member
Jul 5, 2011
36
8
28
Hello, i'm searching for a way to enable V4A for my USB DAC (GGMM A1). I'm on 7.1.2 AOSP (AXON 7) and everything works fine except USB. Has someone a working solution?
Finally it works with JamesDSP! I tried different Roms. On 8.1 AOSP Extended ! without TREBLE ! it finally works! I can use the Headset preset and it works through my DAC. JamesDSP has much potential but in the moment V4A works better. Now i can hear with 192000Hz 24bit on my 1More Treble Driver Over ear.
I think V4A will never support DAC but it's good to have both V4A and JamesDSP
 
  • Like
Reactions: timbuctoo

Antidote03

Senior Member
Jun 19, 2012
419
64
58
hello there
i hope someone answer my question

i wanna ask if here anyway or any trick to enable HD Audio driver (apt x/ SBC) for custom roms aosp based like " Havoc"

i have Bluetooth headset with viper 2.7.1.0

when i run viper in miui whatever beta 9.6.27 or stable 10.3.4.5 the sound is amazing and so much bass
but in AOSP based rom like havoc ,the sound is terrible specially the bass completely bad

is there i can fix this
i hope you got what i mean

thanks in advance
Sorry for my bad language
 

Damoedge

Senior Member
Apr 23, 2010
733
287
93
Dublin 1
Finally it works with JamesDSP! I tried different Roms. On 8.1 AOSP Extended ! without TREBLE ! it finally works! I can use the Headset preset and it works through my DAC. JamesDSP has much potential but in the moment V4A works better. Now i can hear with 192000Hz 24bit on my 1More Treble Driver Over ear.
I think V4A will never support DAC but it's good to have both V4A and JamesDSP

I'm interested in you setup mate as I have the 1more triple drivers too...so what Rom, kernel and audio mods do you have running to get this good base sound?

I've just read the post after yours that MIUI has the best sound but I don't want that Rom...

Thanks!
?
 

buhanita

Senior Member
Jun 12, 2012
245
27
58
I am an audiophile and I make it a point to use audio mods whenever possible. That being said, the audio mods that I've tried and worked amazingly well are Viper4Android and Ainur Sauron, but you will also need Audio Compatibility Patch and Audio Modification Library to make things work so seamlessly.

That being said, I get to see a lot of people complaining about Viper4Android being too buggy in that after every restart, it asks for the driver to be installed again, etc. Well, I have clean flashed/dirty flashed plenty of ROMs now so I can honestly say that my method works.

So, what is my method for installing all of the audio mods I mentioned earlier? Well here are the steps:

1. Install Busybox for Android (in Magisk Repo)
2. Install Audio Compatibility Patch. It now comes with a multi-option installer, so you want to Select NO to the first option then choose Vol + (Patch New Logic). Select NO to the second option and then use Vol - (remove Volume Listener Library). This is done so that your audio won't crackle. You can skip USB Dac if you're not using it and you should choose NO at the last option (library workaround).
3. After Installing ACP with the chosen options, proceed to install Ainur Sauron.
4. Once that is done, install Audio Modification Library. After AML, DO NOT REBOOT YET.
5. Download the Viper4Android 2.7.1 APK here: https://labs.xda-developers.com/store/app/com.pittvandewitt.viperfx . I find this to be the best iteration of the module since it is not buggy at all. Once that is installed, run the application and it will prompt you to install drivers for the first time, choose OK and then allow it to reboot. (Note: after installing this, a Magisk Module will be created automatically)

At this point, all of the audio mods should work in unison. Do not toggle anything else in Viper4Android but the main interface. This means that do not go to the settings and toggle anything. Just configure the audio options as per your liking.

6. Currently, the setup will bork BT audio which means that there is no sound that is going to come off of your BT speakers or headphones. What you need to do to fix this is as follows:

a. Rename "audio_policy_configuration.xml" in "/sbin/.magisk/img/aml/system/vendor/etc/audio" to "audio_policy_configuration.xml.bak".

b. Copy the audio policy configuration xml file from "/sbin/.magisk/img/aml/system/etc" to "/sbin/.magisk/img/aml/system/vendor/etc/audio".

c. Restart the device.

Additional Notes

a. When dirty flashing your custom ROM, allow the modules to recoup itself. In other words, do not touch anything until everything is back to normal (or after 5 minutes from dirty flashing).
b. If you happen to uninstall Ainur Sauron (or Narsil), I find that it usually uninstalls viper4android as well. If that is the case, uninstall Sauron and then click the viper4android app from the drawer and allow it to install drivers again.
c. In some devices, the BT workaround is no longer needed. However, I find that for the Pocophone, the workaround is still required. I guess you just have to test it for yourself if it works right off the bat or not.
d. Audio compatibility patch (remove patch logic) actually enhances the volume and the sound quality of the Poco F1. I cannot test this on other devices since I do not have another phone, but you can try and see if it works for you. (thanks to @Jonas G. Morsch for this).
e. If you are going to try Ainur Narsil, I suggest that you do not install viper4android anymore since it provides a great listening experience right off the bat. You can still install v4a, though if you really want it (The same procedure applies).
f. If you are using a custom ROM that has a built-in "AudioFX" app, you need to freeze it using Titanium Backup or similar apps for Viper4android to work. Thanks to @mikedavo for this tip.
g. If, after following all of the above instructions, and you still experience random driver issues or bugs, I suggest that you do a clean installation of your ROM and do the entire steps again. If it still presents the same error, I suggest that you hop on the Viper4android telegram channel to address your concern so that the dev can fix it.
h. Attached below is a profile converter, so if you're using the old version of Viper4android, you can use the attached file to convert all of your profiles to supported presets.

That's about it! If you have questions, feel free to drop them below. Happy listening!
I did all of that... Still the same problem... ViperFX works perfectly.. but camera don't. I have 2 camera apps, the stock one and Gcam. None of them works after installing viperfx.
 

vibrantliker

Senior Member
Dec 20, 2010
4,093
533
253
Boston
Installing dolby atmos is ways better than Viper4Android. and It will not make distortion in Bluetooth earphones.
Where did you find Dolby Atmos for Pie?

---------- Post added at 10:02 AM ---------- Previous post was at 09:47 AM ----------

Will the ACP mod help to stop random pops and other impurities I hear with streaming apps?
I use more high end headphones and good headphone amps. It feels when I listen through the headphone amp, I'll hear random crackles and pops.