yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi A1 Themes, Apps, and Mods] black_arashi:
Hello,

It has been a pleasure to help you find whatsapp issue, just like the images :D, thank you for this mod, a lot of people wanted this from the start of this device :good:.

Regards
[Xiaomi Mi A1 Themes, Apps, and Mods] Ritwik Rahman:
Dual Speaker Acts As Mono

Can you make them Stereo Please?
[Xiaomi Mi A1 Themes, Apps, and Mods] KorokHidup:
I'm sorry but i don't understand how does dual speaker sound from a single speaker works , can anybody explain it to me?
[Xiaomi Mi A1 Themes, Apps, and Mods] ProchyGaming:
So after testing this you get a little more clearer sound more details in the song and, basically a front firing speaker(I have all my songs in .flac so i don't know if you'll hear the difference on .mp3)
[Xiaomi Mi A1 Themes, Apps, and Mods] JaadiBooti:
The earpiece at the top of the phone is used as the second speaker.
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
It's in the request list...

I'll be trying to make such request...

Whoever wants to be a tester, PM me, mentioning his Android version...

Currently I'm on a break, so no need to rush...

PS: I'll be trying means I might fail, no high hopes please, I'm doing my very best as well doing other devices...
[Xiaomi Mi A1 Themes, Apps, and Mods] Rakibboss:
Can I use it with Dolby atmos?
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
You can try, but avoid even the slightest noise and crackles... If you can't get rid of the noise and crackles, then either you edit my MOD volume levels and reduce them or try different MOD...
[Xiaomi Mi A1 Themes, Apps, and Mods] Goayandi:
Thank you very much :) I love this mod!
[Xiaomi Mi A1 Themes, Apps, and Mods] ludditefornow:
You can learn more about it here

It has nothing to do with your code changes. It is an inherent Mi Ai setting issue, I believe. But if you can find the solution, you will be in the gratitude of a lot of people.
[Xiaomi Mi A1 Themes, Apps, and Mods] Sachin1998:
Link for whatsapp fixed one??
[Xiaomi Mi A1 Themes, Apps, and Mods] tanapak1:
I think he means hissing on the earpiece not the headset, because this mod force the earpiece as a speaker which if it gone too loud it may happen some kind of that thing.
[Xiaomi Mi A1 Themes, Apps, and Mods] Gawelsonn:
Can I use dolby atmos with this?
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
Link in the thread is the latest version with the fix...

No user reported hissing from earpiece, but headphones, I'm still on a break so I'll have a look tomorrow and see if anything is interesting there to be modified...

As I keep mentioning, use anything as long there is no noise or crackles... You'll need to adjust the volume either my MOD or Dolby MOD to remove any noise or crackles, I'm not responsible if you decide noise and crackles are nothing, your earpiece will get damaged...
[Xiaomi Mi A1 Themes, Apps, and Mods] tanapak1:
Headphone hissing is an issue from stock rom since October Nougat rom.

And it's still not fixing even on latest January Oreo rom.

It's should be a Xiaomi side issue not from your mod as some comment mention about resistance of headphone here.

Maybe it would be fixed on future rom, or Xiaomi would leave it as a "Feature", just want to mention OP that it's nothing to do with this mod btw.
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
It has nothing to do indeed, but I'd like to see if my MOD is able to fix the hissing sound too...
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
I made a sample for headphones, It could fix the hissing or not, worth a try...

As well a StereoMod...

Any testers?

Got Testers... Be Patient till we reach to a conclusion...
[Xiaomi Mi A1 Themes, Apps, and Mods] mahmoodfadaei:
hello , great mod ! i like this but 2 things : some times i hear viiiiz (hiiiiissss) sound from earpiece ( when play a voice recorded before and no problem with musics) and both channels are actived on both speakers (make earpiece left channel and main speaker both channel). tnx <3 (excuse me for my bad english)
[Xiaomi Mi A1 Themes, Apps, and Mods] black_arashi:
Hello,

I will test it, send me a pm with the archives and instructions :good:

Regards
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
Earpiece buzzing is DANGEROUS, you're Damaging the earpiece, so reduce the volume until you solve this problem...

Are you using any Amplifiers/Equalizers/Sound Boosters such as Viper, Dolby, etc?

Sure...

First Batch has been tested already...

I'll include you in the coming tests...
[Xiaomi Mi A1 Themes, Apps, and Mods] mahmoodfadaei:
No i don't use anything , this problem shows when play a sound from Instagram ( not always )

---------- Post added at 04:57 PM ---------- Previous post was at 04:44 PM ----------

I cant restore my backup , when i try to replace my backed up mixer file root explorer says failed !( Root by magisk )
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
Probably amplified music then...

Reduce the volume of my MOD,

Root explorer either failed to obtain root access or it's on r/o mode...

If you still are unable to restore it, I'll add TWRP original mixers for you to use
[Xiaomi Mi A1 Themes, Apps, and Mods] mahmoodfadaei:
It isnt on r/o mode and granted root access . I havent twrp ! What can i do ? Is really this (some times) dangerous for my earpiece ?
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
What I meant is, it's possible Root Explorer got granted access but it was late grant...

Try different file managers...

buzzing sound is damaging on long term use, since the earpiece isn't built to withstand loud noise...

You're the first person to report a buzz...

You can reduce the volume by yourself if you want to use the MOD...

I have added TWRP ORIGINAL MIXERS in the link...

Flash it with TWRP or Flashfire...
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
So here are the Updates: StereoMod isn't Compatible with the Earpiece, the more I decrease the speaker and increase the earpiece the weaker the sound according to the tester so no, Stereo isn't possible unfortunately, but on the bright side, Hissing Sound can be fixed through this MOD, Doing final tests before releasing it... :good: :good: :good: :good: :good:
[Xiaomi Mi A1 Themes, Apps, and Mods] jashancheema:
Nice work @Dante63 ???
[Xiaomi Mi A1 Themes, Apps, and Mods] mahmoodfadaei:
Where did you add link ?
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
in my thread, the same link for my Google Drive, you'll find "OREO_ORIGINAL_MIXER_TWRP_Xiaomi_mi_A1.zip"

Download and flash...
[Xiaomi Mi A1 Themes, Apps, and Mods] mahmoodfadaei:
I cant find it , there is 6 files in there , and no one isn't this !
[Xiaomi Mi A1 Themes, Apps, and Mods] amarbajpai:
Can you please upload a MOD to just reduce or remove the hissing from headphones and speakers? It would be a great help to the whole MI A1 community.
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
It's strange you're not seeing it but here you go, direct link to the file...

Here you go:

Oreo Original TWRP
[Xiaomi Mi A1 Themes, Apps, and Mods] jashancheema:
Want to test give me latest
[Xiaomi Mi A1 Themes, Apps, and Mods] ludditefornow:
I am happy to test your mod to stop the hissing in Nougat when it is ready. Sir you are a champion. I have been trying to fumble my way through settings to find a solution to this.
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
Still no response from tester, it seems he got busy...

What you Quoted is the Original Mixer Files...

Sorry for the Delay, I still didn't get test results from the tester...

I can't decide to release it or not as I am not sure if the final adjustments can be improved...

My Plan is to release the hissing sound fix for the DualSpeaker and SoundFix Alone for those who don't want dual speaker , just the fix...
[Xiaomi Mi A1 Themes, Apps, and Mods] amarbajpai:
It would be great. If you want the testers, maybe I can do that.
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
THANKS TO [MENTION=5366227]black_arashi[/MENTION] & BIGGER THANKS TO [MENTION=7590774]amarbajpai[/MENTION] for being TESTERS...

Google Drive has been Updated, DualSpeaker MOD has headphones buzz fix...

You can also find BuzzFix MOD which fixes the headphones only...
[Xiaomi Mi A1 Themes, Apps, and Mods] jashancheema:
Increased earpiece volume to 95 .

Working very well
[Xiaomi Mi A1 Themes, Apps, and Mods] black_arashi:
Hello,

As always a pleasure to test this mod, bad luck about the hissing, maybe with some kernel modifications we could eliminate it completely with this mod. :good:

Regards
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
I doubt it's kernel related, the only kernel related issue is utilizing both speakers for apps that use ultra low latency...
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
Updated thread, Important Notice, It seems many misunderstood the word shouldn't as never...

You can use my MOD with Other SoundMod just make sure no noise or crackles are produced...

You can read the Important Notice Again...
[Xiaomi Mi A1 Themes, Apps, and Mods] Jithin0801:
I have a doubt installing this via magisk breaks ota? And is magisk method is enough or u should also flash via twrp?
[Xiaomi Mi A1 Themes, Apps, and Mods] black_arashi:
Hello,

This magisk module is system-less so you are able to update via OTA, not needed to flash it via TWRP, as it's the same modifications and this last will break OTA updates.

Regards
[Xiaomi Mi A1 Themes, Apps, and Mods] gougous3:
May we please get the code to the stereo mod even though you think that it isn't practical ? You could like place it on a "experimental" section of the thread or either just post on a comment (worst case scenario, you could pm it to me).
[Xiaomi Mi A1 Themes, Apps, and Mods] Ritwik Rahman:
After the last update the Earpiece doesn't gives much Beats

Using Headphones has very low volume and bass and sounds feels limited... Not clear and deep sound...
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
I deleted the mixer...

If you want, you can do it yourself...

It's in path="speaker", you can comment everything inside & reconstruct it... I can't really say much, another xda member is working on trying to make the stereo MOD...

The only thing I did is lower the volume db...

You can adjust it by yourself, it's mentioned in my thread, raise both values in headphones, they represent left & right channel...
[Xiaomi Mi A1 Themes, Apps, and Mods] gougous3:
Is it safe to reconstruct it? Wouldn't we be breaking the speaker amp feature? Also have you got the actual stereo part working?
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
Yes it is safe, Nothing would break...

I'll explain it to you as simple as possible...

It's just like you have many switches and many lights, but you don't know which is which, so you switch all the lights off, then switch it on one by one and observing what each switch is turning on, so later you can decide what to keep on and what to keep off...

Similarly to the path="speaker", you'll comment everything inside by placing them between

"<!--" and "-->", that will switch everything off, later line by line you you write to enable part of the speaker...

Have I got it working...? Testers reported back it doesn't sound nice... Another tester reported it's not working as stereo...

I have neither the device nor the documentation in my hand, but by looking at the file contents, it looks possible unless I am reading lines not for the speaker but for other components then it would be no...
[Xiaomi Mi A1 Themes, Apps, and Mods] gougous3:
That's what I've been doing these last days, got the volume levels acceptable now I just need to get the stereo itself to work.
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
Post me what you have done inside the path="speaker"

or

Contact me on Wire,it's mentioned in my signature...
[Xiaomi Mi A1 Themes, Apps, and Mods] albi7894:
Are there any chances to break or damage earpiece/speaker?
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
If you hear noise, crackles in either speakers and not so something about it, then yes it will damage the speaker & bust the earpiece permanently...

I've the volume levels to safe zone...

So the noise, crackles will be obvious if you use other sound MODs with mine or you edit my MOD increasing volume levels...

My advice is you can test it yourself by playing music and gradually increase the volume until you reach to the max, no distortion, noise or crackles then you're good to go...

Another relief, no one ever used my MOD as it is and reported speaker busted...
[Xiaomi Mi A1 Themes, Apps, and Mods] gougous3:
<path name="speaker">
<ctl name="MI2S_RX Channels" value="Two" />

<ctl name="Boost Output Voltage" value="8.5V" />
<ctl name="Left Feedback Enable" value="OFF" />

<!--
<ctl name="DRE EN" value="1" />
<ctl name="Ramp Switch" value="0" />
<ctl name="Amp DSP Enable" value="1" />
<ctl name="Amp Volume Location" value="0" />
-->
<ctl name="Speaker Volume" value="5" />
<ctl name="Digital Gain" value="52" />
<ctl name="Left Channel Enable" value="1" />

<ctl name="RX1 MIX1 INP1" value="RX1" />
<ctl name="RDAC2 MUX" value="RX2 />
<ctl name="RX2 MIX1 INP1" value="RX2" />
<ctl name="RX1 Digital Volume" value="88" />
<ctl name="EAR PA Gain" value="POS_6_DB" />
<ctl name="EAR_S" value="Switch" />
</path>
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
By logic

<ctl name="Left Feedback Enable" value="OFF" />

<ctl name="Left Channel Enable" value="0" />

Should turn off left channel but that didn't do anything

Even deleting them or outing them to ON and 1 no effect according to one of the testers...

Additionally below the path="speaker"

You'll find "spkrmono", including them doesn't seem to have an effect...

If I have time, I'll have a look and create few files to be tested, but they will be my last time I attempt for stereomod as it's more difficult compared to the DualSpeaker MOD as I need the phone in my hands to run continuous tests...
[Xiaomi Mi A1 Themes, Apps, and Mods] albi7894:
So if I don't use other audio mod along with yours and don't hear clear strange noises I should be 100% fine, right? Cause I didn't hear anything strange so far, but that could be just me not noticing. Anyway, I'll test. Thanks
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
100% safe...

If you can't hear it directly, hear through the music quality, it's like playing music that sounds too much bass and screeching you lower the volume to get better quality... That's another way of knowing you should take an action... But test multiple music files, sometimes the music file itself is amplified :)... Then you should just edit the music file and not the phone ;)
[Xiaomi Mi A1 Themes, Apps, and Mods] basilan99:
Thanks [MENTION=7047928]Dante63[/MENTION]! DualSpeaker works on my Mi 5X with December Nougat ROM using your Magisk module. It is also compatible with Viper4Android. Headphones volume is a bit low so I slightly increased it to 68 from 65. ?
[Xiaomi Mi A1 Themes, Apps, and Mods] xSairous:
Awesome Work, thx man .

and i have a question, if you can help me with it.

can i increase in call Volume only?

cuz i have a problem and i can't hear another side as well.
[Xiaomi Mi A1 Themes, Apps, and Mods] varunkumar007:
how to remove the sound mixer after replace it in vendor path it showing error device or resource busy. iwant to remove stero speaker mode.
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
Sure... I'll have a look...

Please explain more, I didn't understand your request...

PS:

On a break with my family... On Sunday I'll proceed working...
[Xiaomi Mi A1 Themes, Apps, and Mods] robby_tan:
Sorry for being out of topic a little bit. But this might answers me why I can't make my "own making" camcorder mic fix working using magisk. It's basically a tweak adapted from some thread in redmi 3s forum (easy to found on google). So, could you consider to try this, maybe? Thank you.
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
Please elaborate more...
[Xiaomi Mi A1 Themes, Apps, and Mods] robby_tan:
You can find more info right in this thread: https://xdaforums.com/xiaomi-redmi-3s/how-to/fix-fixing-bad-sound-video-recording-t3523171

This mic fix works by modifying some lines in audio_platform_info.xml and mixer_paths_mtp.xml too (although for redmi 3s itself it uses mixer_paths_qrd_sku1.xml) It works for redmi 4/note 4, and I assumed it works too with our device.
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
I'll have a look and see what I can do...

I'll need your mixer file and audio platform please...
[Xiaomi Mi A1 Themes, Apps, and Mods] robby_tan:
There you go. From official android oreo january security patch. Thank you.
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
Would you like SoundMod to be added as well? or just the Mic Fix?

I have added the Mic Fix in the Google Drive, Feel Free to test it...

It doesn't have the DualSpeaker & you can't have DualSpeaker installed with the Mic Fix since they are all Controlling the same file...

So, Question for everyone,

Is the Mic Recording BAD? should I Apply the Mic Fix on the DualSpeaker...?
[Xiaomi Mi A1 Themes, Apps, and Mods] robby_tan:
That would be a great combination and options. But for now, I only want to test the mic fix first.

Anyway, thank you very much for helping me, as I don't have an access to a computer right now. And my ambition to keep systemless is somewhat holds me to this kind of tweaks. :laugh:
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
Everything is there, TWRP + Magisk + Manual...

But keep in mind, you can't install Magisk DualSpeaker & Mic Fix...

In fact I made them install on each other (overwrite) as having both Mods could result to bootloop or Race last One Applies Wins because they're both targeting same file...

The Question is why only you reported Mic Issue while other users are fine with it :confused:
[Xiaomi Mi A1 Themes, Apps, and Mods] robby_tan:
Back to last december oreo patch, i tried this on my own by creating a magisk module. It didn't work. Then, I tried the "fluencepro" tweak. It works (sort of), BUT not as good as I like. No stereo, suppression still present that even when I'm clapping, the sound is clipped, and sometimes producing a glitchy sound that I assumed occured by the suppressions. Whether using a Sony's Audio Recorder app on Play Store or video recording at highest quality. I don't know why.

And now I try it again with current january oreo patch, using your magisk module. IT'S WORKING! But only video recording works, Standalone audio recording still not working, which is sucks because this is my primary reason to want a mic fix (sometimes I record some lectures, speeches, and live music). Mic gain is high, but so much noise floor. And I tried the "fluencepro" tweak again, and I WAS BLOWN AWAY THAT I'M SO SORRY TO YOU RIGHT NOW TO WASTE YOUR TIME. IT WORKS TOO! But same, only video recording works, Standalone audio recording still not working. Mic gain is lower but noise floor is much little.

Also, it may be worth mentioning that in december patch I don't have any headphone noise issue. But now, I have that. It's hearable, but can be ignored.

Sorry for the long reply. I have to tell my story, so you can understand why I still stuck when the others are already enjoying a good mic themselves. Derp.
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
So basically, you want to reduce the Mic Volume... set it to 0 db or make it less...?

If you by any chance have the December mixers, would be great, even if you have the ROM...

If you have Nandroid backup for december, you can pull your mixers from it..

as for what I did, I simply Applied what redmi 3 applied which according to his comments:

Disabling noise suppression only for video and apps

Incerasing mic volume only for video and apps

Fixing loud voice in-call for those, who disabled noise suppression

DEC Volume = 84 is equivalent to 0 db, if it's too loud, perhaps decreasing it would yield you better results...

However the thread, he set the Dec Volume to 96, which adds few dbs...

So before applying the MOD you it was bad quality and After Applying it it became better?

if you want to make higher db everywhere (video & audio recording, phone calls ( it might cause echos) , voice commands, anything related to the mic,etc ) it can be achieved, but if it's only Standalone audio recording, please logcat the activity for using Standalone audio recording and send it to me, I'll apply the same lines to the path that is being requested by your audio hardware...
[Xiaomi Mi A1 Themes, Apps, and Mods] robby_tan:
Tried re-testing and the results fluctuates and varies each tweaks and test. But in my opinion, this tweak is, surprisingly, only slightly better. Need other opinions and tests for this.

I think leave the mic gain as is for now. Let other people test it and give their results.

I have December Oreo ROM in my A partition. But i can't change partition now because I don't have TWRP installed and I have no access to computer right now.

Quick noob question. How to logcat specific app/hardware events?

Thank you very much for your effort.
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
There are many logcat application on playstore...

Use any one of them...

Simply hit record, open and do your activity then stop recording... And send me the results...

PS: Some apps can select an app specifically...
[Xiaomi Mi A1 Themes, Apps, and Mods] robby_tan:
Hope it helps. Thank you.
[Xiaomi Mi A1 Themes, Apps, and Mods] Ritwik Rahman:
Magisk is not possible... But is system change via TWRP possible?
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
Please elaborate, I didn't understand...
[Xiaomi Mi A1 Themes, Apps, and Mods] Ritwik Rahman:
Can you make Stereo mod Without Magisk? Only flash able with TWRP?
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
I already mentioned there is no Stereo MOD...

You have Dual Speaker, Buzz/Hissing headphones Fix Only & Mic Fix Only...

Dual Speaker includes the Buzz/Hissing headphones Fix but not the Mic Fix...

You can find Magisk and TWRP for each...

UPDATE: I noticed I wrote Stereo "Magisk" not possible instead of Stereo "MOD" not possible...

Sorry for confusion...
[Xiaomi Mi A1 Themes, Apps, and Mods] Ritwik Rahman:
O I understand now! ??
[Xiaomi Mi A1 Themes, Apps, and Mods] jukalo:
Magisk does not recognize the zip file
[Xiaomi Mi A1 Themes, Apps, and Mods] robby_tan:
There you go. Hope it helps.
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
mixers are the same....

However the audio_platform has a small change...

From what it looks like, it's related to Voice call...

I doubt it has anything to do with the headphones...

Would you please provide me:

audio_policy.conf

audio_policy_configuration.xml

audio_policy_volumes.xml

for the December and the current to compare...

they are in the same etc folder...
[Xiaomi Mi A1 Themes, Apps, and Mods] robby_tan:
I might be out of luck then...:laugh:

Files below.
[Xiaomi Mi A1 Themes, Apps, and Mods] gougous3:
Are you completely sure about the Stereo Mod not being available ?
[Xiaomi Mi A1 Themes, Apps, and Mods] Dante63:
As far as testers gone to, some reported quality loss, others reported no effects are occurring when modifying the mixers...

You can experiment yourself at path="speaker", if you fail, then it needs other fails to be modified to work alongside the mixers...

Keep in mind the earpiece won't give you Quality the main speaker provides when you set the earpiece as left channel...

All these were reported by testers...

Stereo MOD isn't my main objective, sorry to you and all those who want Stereo MOD... You may use my MOD & make a thread, but remember to credit me & reference my thread...

My main objective is to create DualSpeaker Stereo in both speakers mainly which has been achieved, now I'm seeing if headphones issue can be fixed as well mic issue, so people could have their DualSpeaker MOD working with fixed issues...
[Xiaomi Mi A1 Themes, Apps, and Mods] ghale:
Ok, it's clear that this module is not for me.

I've downloaded the OREO_MAGISK_Xiaomi_mi_A1_DualSpeaker.zip and I've installed it in Magisk. I've enabled it and rebooted.

Now?

What I have to do?

I can't hear differences listening to music, for example, in Spotify.

What I'm missing? What I'm doing wrong?

Sorry for my newbie question, but I'm really new to Magisk and mods in general.