yashsingh1/xdaforums huggingface dataset:
[Miscellaneous Android Development] ShaDisNX255:
Yeah I've checked your examples. I took a look at the Samsung Snapdragon Note 8 and your edits seem to be almost exactly as you described in your video, with only one extra edit. Even with that, doesn't work for me

I'm not modifying 2 mixers, I attached 2 files on my post so that people can see my edits. "mixer_paths_idp.xml" is my original, unmodified file and "att1_mixer_paths_idp.xml" is my attempt at the modification.

This is for a Galaxy A71, Snapdragon 730.
[Miscellaneous Android Development] lev22885:
Hello! is it possible to make this mod on mi note 10 / pro. I will attach the files. will suddenly be needed to determine a successful result

Mi note 10 pro - Google Drive

drive.google.com
[Miscellaneous Android Development] Hyuner:
Hello, have you modified it successfully? Can you provide me with a modified file? I also use Xiaomi device, but it's k30pro (poco F2 Pro). In some cases, my phone has no sound after modification. I don't know if you have this problem
[Miscellaneous Android Development] Agu5t1n:
De tus publicaciones
[Miscellaneous Android Development] Klein61967:
Hello! Is the 2nd type of mixers (From Youtube) solved yet?
[Miscellaneous Android Development] Dante63:
Second type, as in Snapdragon mixers?
[Miscellaneous Android Development] Klein61967:
(Sorry late reply) yes, snapdragon 410
[Miscellaneous Android Development] Dante63:
I don't recall much ever since I made this thread into a DIY to be honest with you...

But as I recall, the steps for snapdragon were to locate the mixer, once that is done, apply the modifications required to the paths, then locate the earpiece (depending on the name) make a copy and apply all the values inside it at the top, locate the speaker and add the earpiece path that you copied and you're done
[Miscellaneous Android Development] awerqw22:
Any way i can make notification sounds go through ear piece?
[Miscellaneous Android Development] Dante63:
Because I haven't done this in a very long time, and things changed a lot, all you can do is trial and error till it works, in other words, first 84 changed made things laggy, put it back 84, change something else and so on
[Miscellaneous Android Development] helgi1507:
Hello!

Maybe somebody has a fix for low volume in A5 (2017)?
[Miscellaneous Android Development] Qqlby:
Hello everyone, Thank you for your effort, Is there any way to make dual speaker for realme 6 pro Android 11? Also what file should we use, and what mixer path should use? There are two mixer paths, in \vendor\etc and there are another one in \system\vendor\etc, I'll leave you a screenshots
[Miscellaneous Android Development] Dante63:
Follow the guide steps, since the file names never changed, the DIY logic is the same
[Miscellaneous Android Development] dopebeats123:
Hey dante63, I have trouble getting the module to do its job, it doesnt want to replace the files, I've tried your template and many other like the one zackptg offers and from youtube. I attached the magisk, it shows that the directory is non existent. Also is it possible to replace the mixer file directly with twrp, so i dont have to go through all this trouble, i am freaking frustrated man. Please help
[Miscellaneous Android Development] Dante63:
My magisk module is very old and I don't think it would ever install anymore, it is there for the sake of copying the lines and putting it in the latest magisk template...

And yes, you can replace directly, I recommend that you rename original files and add ".bak", if something goes wrong, you can rename the original files back... think of it as a smart backup, after all, this is what my TWRP template was doing...
[Miscellaneous Android Development] dopebeats123:
So, I've tried your template, https://github.com/Zackptg5/MMT-Extended this one, https://github.com/oasisfeng/magisk-module-template this one, and one from a youtube video upload like a month and it was using magisk 23, can you send me a working template, like ive tried them all, and none of them are working. I dont have twrp installed so if the template hopefully you are going to send works, i wont have to install twrp... I am going to attach the modules i made, maybe i am doing something wrong, i dont know. Also do you have like telegram or smthing, communication here is slow af
[Miscellaneous Android Development] Dante63:
I have updated the Magisk Template for you, all you need to do is replace the files in the system folder to match the path of the location of your mixers on the phone then edit "config.sh" and change the paths, for example:

on the phone, you want to change the following mixers,

(Exynos)

/system/vendor/etc/mixer_paths.xml

/system/vendor/etc/mixer_gains.xml

(Snapdragon and others)

/system/vendor/etc/mixer_tavil.xml

let's say you have the path:

/system/vendor/etc/mixer_tavil.xml

so inside Magisk template, you edit the folder contents of system by deleting everything and creating the same path of your phone and place your modded mixers, then you edit config.sh and change

REPLACE="
/system/vendor/etc/mixer_paths.xml
/system/vendor/etc/mixer_gains.xml
"

to

REPLACE="
/system/vendor/etc/mixer_tavil.xml
"

and

set_perm $MODPATH/system/vendor/etc/mixer_paths.xml 0 0 0644
set_perm $MODPATH/system/vendor/etc/mixer_gains.xml 0 0 0644

to

set_perm $MODPATH/system/vendor/etc/mixer_tavil.xml 0 0 0644
[Miscellaneous Android Development] dopebeats123:
Now when i try to flash it shows magisk is not activated.... abort. Installation failed. When i try to flash other modules from the repo or like downloaded from the internet they flash normally. Magisk is installed, version 23. I tried rebooting, still the same error. What is going on lol
[Miscellaneous Android Development] Dante63:
Not a clue to be honest, share the magisk you created, I'll have a quick look
[Miscellaneous Android Development] dopebeats123:
Me neither, some templates fail to find directory or whatever it is, this one shows magisk is not installed. Lol xD
[Miscellaneous Android Development] Dante63:
Your mixer file is empty, invalid file, it cannot install invalid file as a system file, 0 Kb
[Miscellaneous Android Development] dopebeats123:
Yes i know that the mixer file is dummy, i read a forum by John Wu the creator of magisk that instead of deleting i can make a dummy file with the same extension and name to do my stuff, also i tried with a real mixer file here is the one with a real mixer its a mixer_paths.xml file. Still the same error
[Miscellaneous Android Development] dopebeats123:
Also look what I found in the Update-binary. think its failing to mount system or magisk and thats why its showing the error. Maybe the paths for magisk are not the same as in my phone idont know, i guess its searching magisk in the wrong directory?
[Miscellaneous Android Development] Dante63:
That is correct, not just that but different android version, our root is part of the recovery partition, not system (as I recall, we have to enter into recovery and reboot to enable root or alternatively flash a patch to enable root always, yet still, Magisk path is not there...

So, the template is correct but not for all devices, the solution is using another template, I already sent it to you on discord, but I will update my Google drive with it later
[Miscellaneous Android Development] :
I'd love to see something like this for the Moto G Stylus 5G. Honestly the lack of stereo speakers is my only dislike about the phone as a whole, though I'm not sure I have the ability to create a mod myself
[Miscellaneous Android Development] Dante63:
It's pretty much straightforward, you first find the mixer that your phone uses, then you apply the changes required, then you use magisk or replace the mixer directly, reboot and see

You'll probably need a cup of coffee and patience
[Miscellaneous Android Development] DorianX:
@Dante63

Is there a way to find which mixer file is being used on my device?
[Miscellaneous Android Development] Dante63:
Yes, rename the mixers one by one and reboot till your phone goes into bootloop or goes mute...
[Miscellaneous Android Development] akmoy92:
Is there anyone who can help me by adding the setting in the picture to these files?
[Miscellaneous Android Development] Ivan23848:
Hello! I have this samsung galaxy m12 device with a custom kernel, which mod should I install?
[Miscellaneous Android Development] VR_guy:
@Dante63

Trying to do this on the Samsung A7 2018 (Exynos)

I have a problem. I have done everything in the tutorial video but failed to create a working magisk module. When installing the module it will always say "Magisk is not activated!... abort" Did I do something wrong? I've attached the module I made if you want to look into it. Edit: I've also attached the original mixer files.
[Miscellaneous Android Development] VR_guy:
Try to make your own magisk module/twrp flash file with the video tutorial
[Miscellaneous Android Development] Dante63:
DIY, you can look at my mods as a reference and watch the video for more details...

Did you use my magisk module? If yes, delete it, you need to grab the latest magisk template, use my magisk as a reference on how I've set up the template...
[Miscellaneous Android Development] VR_guy:
Yea I did. Where do I het the latest template?

I've got another question, is it possible to set a maximum volume for the earpiece? Like for example, when my main speaker is at 40% the earpiece is 40%, but when my main speaker is 100%, the earpiece is still at 40% or limited to a certain volume. Because I'm happy with the volume balance between the earpiece and the speaker so I don't want to turn down the earpiece value in mixer_gains.xml, but the earpiece is dangerously loud when the volume is >80%. At least by limiting the earpiece volume, I still get a balanced sound between the two drivers at lower volumes.

Or if it's not possible, then how do I lower the maximum overall volume? It would lower the main speaker's max volume, but it still would have louder total volume if you add up the earpiece.

Thanks in advance!👍I'll send you the mod for my phone after I've perfected it so that others could use it too.

Edit: I've attached the mixer files I've edited so far
[Miscellaneous Android Development] silvershadow:
Hey, before putting a request, id like to see if its even necessary.

One Plus 5 has a "stereo" speaker mod and it seems to work fine. But I noticed that the mod only edited the mixer_path_tasha file, and it doesn't touch any of the other mixer paths.

Are the other mixer paths used? or in the case of this phone, only mixer_path_tasha is used?

Thanks in advanced

EDIT:

if the request is valid and your mod will be more thorough or (louder/better) than the mod on the oneplus 5 forums, here is the information:

Device Specs:

Name: One Plus 5

Model: OP5-A5000

Android: Oreo 8.0.0 (Specific: Oxygen OS 5.0.2..op5 changes the mixer tasha file once in a while so i have uploaded the latest one from stock)

Processor and RAM: Snapdragon 835 and 8GB ram

Thank you!

Note: if i have v4a installed, does that edit the mixer files? if it does, please let me know and i will grab fresh mixer files with v4a uninstalled.
[Miscellaneous Android Development] Dante63:
Each device has 1 primary mixer_path, any other mixer alongside would be considered as volume control in most cases and can be seen in mixer_paths as import line...

I've never used any MODs to Modify my phone, as I modify it myself, but I can tell One Plus 2 tester faced issues in testing my MOD as one of his audio MODs was rerouting the phone settings to use custom mixers...

I can't tell for sure what your other MODs do...

So your request is to enable the earpiece alongside the speaker, better sound gain, and I believe you want it Stereo, earpiece act as left channel and speaker as right channel...?

If what's available on oneplus 5 forums lacks of sound quality only... It would be better that I just tell what to do to increase the sound quality & gain...
[Miscellaneous Android Development] silvershadow:
Ah I misunderstood the request completely and I made some of my own assunptions.

Ideally I would want a joint stereo sound from both the earpiece and speaker at the same time (both playing both left and right) or a dual mono but the same "full sound" coming out of both speakers. I would ideally like to eliminate v4a and just use this mod since v4a causes a bit of issues in other areas.

I believe I may not have provided the correct mixer files after what I learned today so I will think about it some more and post a proper request when I have all the proper information.

Thank you for your swift reply.
[Miscellaneous Android Development] Dante63:
Take your time, I usually ask for all mixers as it's easier for the requester to upload them... As for the SoundMod, that's what I mostly do... Enable them both and to play as loud & safe as possible... You can have it as Magisk, or flash it with TWRP or do it manually... As well I provide the lines which control the volume level so you'd adjust them if you wish to do so...

In my thread, you can see that on other devices...

Let me know if you have other questions... :good:
[Miscellaneous Android Development] Markxdx:
Dual speaker solved for honor 8 ( mixer path must be put in /product/etc/audio/hi6402 and to change volume edit mixer_volume in /vendor/etc/audio/hi6402 ..I thank Dante for enlightening me:laugh:
[Miscellaneous Android Development] boonthongw@gmail.com:
Work great on g9500. Thanks.
[Miscellaneous Android Development] silvershadow:
Hey Dante,

I reinstalled my OS without any sound mods. Then i renamed the 7 files that are named mixer_paths*.xml to .bak, rebooted phone and i kept getting direc control service has stopped errors (so i forced my way into an app inbetween the error popups) and played a video, got no sound, so based on your first post, these are the correct files.

I have them attached (i put a few extra files from that same folder that may be useful, im not sure).

Here is my official request:

Device Specs:

Name: One Plus 5

Model: OP5-A5000

Android: Oreo 8.0.0 (Specific: Oxygen OS 5.0.2..op5 changes the mixer tasha file once in a while so i have uploaded the latest one from stock)

Processor and RAM: Snapdragon 835 and 8GB RAM

As you stated, I would like to Enable both earpiece/speakers to play as loud & safe as possible.

I prefer a TWRP flashable zip. From what I seen, a lot of one plus 5 users like to have magisk modules so if its not much more effort, both versions would be appreciated.

Please let me know if you need any more information to start.

I will be as swift and thorough as possible for testing. I will not disappear like other requesters :D

Thank you!
[Miscellaneous Android Development] sacnotsack:
Thank you, this is the last thing I needed to make my Snapdragon s8 perfect for me. You are a god among us mortal men. Thabk you. I used up all of my thanks today on you. Sorry I cannot do more.
[Miscellaneous Android Development] Dante63:
Thank you for your support... :o

Let me know if you need MOD for any other device... ;)
[Miscellaneous Android Development] Dante63:
Sent you a sample to test...

hopefully to release it today if it goes well...
[Miscellaneous Android Development] Dante63:
Added Volume Lines...

Glad I Helped...

MOD released, Added Volume Lines, please reinstall the MOD...
[Miscellaneous Android Development] silvershadow:
Thank you very much [MENTION=7047928]Dante63[/MENTION] !

I am going to be running this throughout the day.

I did want to make note of one thing i noticed, on the first post you listed:

<path name="speaker">

........................................................................

<ctl name="RX0 Digital Volume" value="85" /> <!--earpiece up-to 95, beyond is DANGEROUS-->

<ctl name="RX1 Mix Digital Volume" value="85" /> <!--speaker up-to 95, beyond is DANGEROUS-->

<ctl name="RX2 Mix Digital Volume" value="85" /> <!--speaker up-to 95, beyond is DANGEROUS-->

But I am not seeing a RX2 Mix under the speaker <path name>. Was this a mistake in the instructions on the first post or is that line supposed to be added in?

Regards,
[Miscellaneous Android Development] Dante63:
As I mentioned as a comment...

<!--as speaker was rewritten, RX1 & RX2 are usually seen as Speaker level, if it's not noticed please report it-->

if you look inside <path name="speaker">, many lines have been commented out,

Aside that Nothing indicates which RX to use for which except the earpiece is RX0 in 99% of the cases...

Not mentioning which RX will apply default volume level 84 -> 0 db...

now why two, I noticed in the commented lines, left channel and right channel, in such cases you'd need two RX but it might be only one, that you can experiment yourself...

The volume levels you set won't have any side effects on other playbacks even if you put All RX volume inside the speaker, it will only be a burden on the Device every time Speaker is requested,

it would set Volume levels of other Hardware that won't even play which go back to default when speaker ends...

I simply put RX1 & RX2...
[Miscellaneous Android Development] silvershadow:
Hey Dante, I didn't modify the file myself as yet, was just using the version you uploaded, and i noticed that i don't hear anything when i use the earpiece for calls, i have to switch to "speakerphone" in order to hear the other person on the call.

I guess i was too focused on one aspect of the speaker, forgot about a regular call.

When i added in the RX2 line discussed above, it seemed to have disabled the mod and the earpiece no longer plays at the same time. I still dont hear anything when in a call.

I reverted back to the original (no mod) and the earpiece works as expected..sort of.

I believe oneplus5 has a bug where sometimes you don't hear anything from the earpiece at first, so if you call back, or more conveniently, if you 'toggle' speaker phone on and back off, the earpiece starts working. So doing the "toggle", i can hear from the earpiece WITHOUT the mod.

The "toggle" doesn't work when using the mod, the earpiece still remains completely silent.
[Miscellaneous Android Development] GilloLillo:
Name:Xiaomi Mi5X(Tiffany)

Processor:Qualcomm Snapdragon 625 MSM8953, 64-bit Processor

Android:7.1.2
[Miscellaneous Android Development] Dante63:
Ok so you noticed the RX volume has issues..?

Try commenting the volume lines...

Files please...
[Miscellaneous Android Development] GilloLillo:
Sorry, problem loading, I can not find the button to load the file, sorry for the stupid question
[Miscellaneous Android Development] silvershadow:
I commented out all of the volume lines and the dual speaker mod still works in videos (its noticeably quieter as expected).

But the earpiece is still not working in calls (even after i toggle between earpiece and speaker).

One thing i noticed with the dual speaker mod was: if i rush into a video as soon as the phone boots up, it starts off with both speakers working, then when i turn up the volume really fast and the earpiece stops for a second or two but the main speaker keeps going, then the earpiece sounds kicks back in.

Also, while typing up this response, i got a call, and i was hearing through the earpiece. then when i hung up, i realized it was working.

So when i do an outgoing call, the earpiece doesn't work, but when receive a call, the earpiece works.
[Miscellaneous Android Development] Dante63:
This thing is happening in Note 8 Snapdragon users too... On phone calls, does the speaker mode also activate the earpiece...? If it does, kernel OS probably failing to utilize the speakers... If you can send me a logcat of phone call activity, I can have a look and confirm where my MOD could be affecting...

At least now we're sure RX lines have nothing to do with your issue in phone calls, so you can uncomment them...

Note 8 make a phone call once after reboot, turn on speaker on then off... They reported it's only the first call after reboot...

So if you'll make a logcat, reboot... Start logcat, make a phone call, toggle speaker on and off... End call, stop the logcat and pm it to me...

Just upload it to Google Drive or other website and post the link here...
[Miscellaneous Android Development] Mentalmuso:
Hi mate, can you work your magic on this xml from the LG V30? thanks!

--->
[Miscellaneous Android Development] Dante63:
You can search github:

Build software better, together

GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 420 million projects.

github.com

Find a template and use it as a reference or use it itself...

Or create it yourself

https://github.com/topjohnwu/magisk-module-installer

as @topjohnwu has made it DIY...

As for your question, you can set the earpiece volume to safe level without affecting the speaker volume, but lowering the speaker volume will affect the sound quality, wouldn't make sense, you could try combining it with another sound mod but first, make sure your module is working, after that test different sound mods with yours till you find what you need...
[Miscellaneous Android Development] madhatter57:
Can i safely flash this on galaxy S8 using Android Pie ? Because it says only Nougat or Oreo.

If not, someone can point me to the right mod?
[Miscellaneous Android Development] Izinom:
Can it work for lineage os 16 android 9 huawei p smart
[Miscellaneous Android Development] Dante63:
DIY, I explained that you need to try & see for yourself
[Miscellaneous Android Development] delfanasa:
hello, sorry I'm new here. My android is broken with the audio ic but I can still use the earpiece speakers. can the main speaker be disabled and only use the earpiece? because if the cellphone tries to sound through the main speaker, the mainboard gets hot. I use bluetooth for daily use, but bluetooth causes a ping jump on the wifi signal.

sorry I used translate.

details of the phone that I use:

Xiaomi Redmi Note 5a Prime (ugg)

snapdragon 435

Android: 11 Havoc OS v4.16 aosp

twrp installed
[Miscellaneous Android Development] Dante63:
You should be able to do that by either deleting lines related to speaker or setting the volume to 0
[Miscellaneous Android Development] Diepie:
Hi Dante,

thank you for your efforts, and for making a tutorial, I think this method became outdated and will not work with 2020+ phones anymore, my device as example don't have EAR PA Gain value, and instead it got EAR SPKR PA Gain with G_Default

I heard that your're no longer make this, can you refer us to a someone who has a knowledge with editing mixer_paths.xml, or tell us how did you learned editing them, so we can keep making a dual speaker mods for the phone with mono speaker, it's a real shame that some companies still launch their device with mono speakers in 2022!
[Miscellaneous Android Development] Dante63:
I shared what I have been taught,

XDA @chdloc taught me basics of how to modify mixers because he stopped, and then what I learned i decided to share with everyone (chdloc kept sharing everything on XDA while I made a video and shared it on YouTube) ...

The concept will be the same all the time, trial and error to understand which mixer is loaded then modify its value...

I hope you'll be able to achieve what you're aiming for...
[Miscellaneous Android Development] official_pro:
Please modify this file... Your old guide doesn't match with the new qcom/realme devices.. please help. Thanks in advance
[Miscellaneous Android Development] Dante63:
You're free to investigate and then make a new thread to target new devices...

This is a DIY thread and used as a reference only...
[Miscellaneous Android Development] official_pro:
Below commit will certainly help to enable stereo speaker/dual speaker on newer Qualcomm based SOCs..

Commit:- https://github.com/improbir/android...mmit/01ac96a1e90331024d574b94480d20c7eceab3ec
[Miscellaneous Android Development] SHSM12:
The upper speaker is connected, with the left channel going into it. Question. How do I remove the left channel from the lower speaker? Because it turns out the wrong circuit (L-LR)