Balanced StereoSound & StereoRecord patch - Nexus 5X Original Android Development

Balanced stereo sound and stereo record with true left/right channel recording
Most stereo modifications do not take into account the lower volume of the conversation speaker, which is why the sound when playing in a polyphonic speaker is much louder. I corrected the gain values, for a more equal sense of loudness. This is especially noticeable when watching movies with a small number of low frequencies.
When you hold the smartphone with the buttons up, the recording of the channels is in the correct position. All the modifications, that I came across earlier, wrote a sound in an inverted position, because of the inverted position of our camera.
Installing:
Download attached file, and flash it throw TWRP
Or you can use magisk module from this post https://forum.xda-developers.com/showpost.php?p=76085341&postcount=4
With best wishes, AlexUnderKH
UPD:
Corrected the position of the channels during playback. It seems that now it sounds right. Files are updated

I edited a magisk module from other thread with sound modification and replaced with your modification. Works. If you allow to upload it here.
Edit: Also edited the module prop file with the whole info of the thread. The magisk module works, I'm waiting when you give permission to upload the magisk module there.

zurik said:
I edited a magisk module from other thread with sound modification and replaced with your modification. Works. If you allow to upload it here.
Edit: Also edited the module prop file with the whole info of the thread. The magisk module works, I'm waiting when you give permission to upload the magisk module there.
Click to expand...
Click to collapse
Of course you can upload module.

Magisk Module of Stereo sound & stereorecord patch:
EDIT: Edited config sh file with the mod name. (The script title when You flash the module on Magisk Manager)

Can i flash this over the old one?? Or i need to go back to stock?
Sent from my Nexus 5X using XDA Labs

good work!

AntonPanos said:
Can i flash this over the old one?? Or i need to go back to stock?
Sent from my Nexus 5X using XDA Labs
Click to expand...
Click to collapse
Yes, you can.

zurik said:
I edited a magisk module from other thread with sound modification and replaced with your modification. Works. If you allow to upload it here.
Edit: Also edited the module prop file with the whole info of the thread. The magisk module works, I'm waiting when you give permission to upload the magisk module there.
Click to expand...
Click to collapse
Thank you both for this awesome mod - completely overhauls the sound.

First off, you should credit the persons whose original work you've used for this mod, namely chdloc for the stereo recording and sshafranko whose stereo surround sound mod you seem to have based your files on. I can see that you've changed some of the digital volume gains (and added a frequenzy cutoff), but you seem to have boosted it for the headphones too quite a bit. I cannot however see that you've made any changes to the stereo recording compared to the original other than boosting the recording volumes. You have changed the lines
Code:
<!-- Incall Recording -->
<ctl name="MultiMedia1 Mixer VOC_REC_UL" value="1" />
<ctl name="MultiMedia1 Mixer VOC_REC_DL" value="1" />
<ctl name="MultiMedia8 Mixer VOC_REC_UL" value="1" />
<ctl name="MultiMedia8 Mixer VOC_REC_DL" value="1" />
<!-- Incall Recording End -->
from 0 to 1, but as far as I can tell, that doesn't have anything to do with the stereo recording. In fact, with the original mod my channels are already in the correct position when recording with the buttons on top. You also haven't increased the bitrate for the audio recorded so you're getting a quite low bitrate per each channel.

Mhm … If I put my N5X to the left, so the buttons are on the upper side the playback channels are reversed like in all other stereo mods before. Left channel sound comes out of the bottom speaker, right channel out of the upper one. Back to DualMonoV2 for me.

CazeW said:
First off, you should credit the persons whose original work you've used for this mod, namely chdloc for the stereo recording and sshafranko whose stereo surround sound mod you seem to have based your files on. I can see that you've changed some of the digital volume gains (and added a frequenzy cutoff), but you seem to have boosted it for the headphones too quite a bit. I cannot however see that you've made any changes to the stereo recording compared to the original other than boosting the recording volumes. You have changed the lines
Code:
<!-- Incall Recording -->
<ctl name="MultiMedia1 Mixer VOC_REC_UL" value="1" />
<ctl name="MultiMedia1 Mixer VOC_REC_DL" value="1" />
<ctl name="MultiMedia8 Mixer VOC_REC_UL" value="1" />
<ctl name="MultiMedia8 Mixer VOC_REC_DL" value="1" />
<!-- Incall Recording End -->
from 0 to 1, but as far as I can tell, that doesn't have anything to do with the stereo recording. In fact, with the original mod my channels are already in the correct position when recording with the buttons on top. You also haven't increased the bitrate for the audio recorded so you're getting a quite low bitrate per each channel.
Click to expand...
Click to collapse
You can use any mods, that you want - it's not my business. So where i took files - not your business. All files, that i used, included in official firmware for Nexus 5X
I did not upload them from XDA. So, you can tell me anything, but in first post i sad, what i did personally.

AlexUnderKH said:
You can use any mods, that you want - it's not my business. So where i took files - not your business. All files, that i used, included in official firmware for Nexus 5X
I did not upload them from XDA. So, you can tell me anything, but in first post i sad, what i did personally.
Click to expand...
Click to collapse
When you base your modifications on someone elses original work, you should always credit them.

j-a-d-z said:
Mhm … If I put my N5X to the left, so the buttons are on the upper side the playback channels are reversed like in all other stereo mods before. Left channel sound comes out of the bottom speaker, right channel out of the upper one. Back to DualMonoV2 for me.
Click to expand...
Click to collapse
I made this modifications to faithfully play the video on other devices, at the request of one of the owners of Nexus 5X, and not to view the videos on the smartphone.
If you do not like it, do not use it.

CazeW said:
When you base your modifications on someone elses original work, you should always credit them.
Click to expand...
Click to collapse
I don't know, who did this mod first time... So I can not credit anyone. I did not upload original files from xda...

CazeW said:
When you base your modifications on someone elses original work, you should always credit them.
Click to expand...
Click to collapse
I changed only mixer_path, not media_profiles

AlexUnderKH said:
I don't know, who did this mod first time... So I can not credit anyone. I did not upload original files from xda...
Click to expand...
Click to collapse
Your code
Code:
<path name="camcorder-stereo">
<ctl name="AIF1_CAP Mixer SLIM TX7" value="1" />
<ctl name="AIF1_CAP Mixer SLIM TX8" value="1" />
<ctl name="SLIM TX8 MUX" value="DEC7" />
<ctl name="DEC7 MUX" value="DMIC1" />
<ctl name="SLIM TX7 MUX" value="DEC10" />
<ctl name="DEC10 MUX" value="DMIC3" />
<ctl name="SLIM_0_TX Channels" value="Two" />
<ctl name="DEC7 Volume" value="84" />
<ctl name="DEC10 Volume" value="84" />
</path>
is the same as the code by chdloc (whom I mentioned in my first post) except for slightly different order and volume. You also mentioned that all the other modifications you had come across wrote the sound in inverted position so you must have seen it then as he's the only person who's done it (and you're still using the same positions as he is). But anyways, I don't want to argue. If you did do it all by yourself and didn't copy anything from anyone else, then good job. :good:

CazeW said:
Your code
Code:
<path name="camcorder-stereo">
<ctl name="AIF1_CAP Mixer SLIM TX7" value="1" />
<ctl name="AIF1_CAP Mixer SLIM TX8" value="1" />
<ctl name="SLIM TX8 MUX" value="DEC7" />
<ctl name="DEC7 MUX" value="DMIC1" />
<ctl name="SLIM TX7 MUX" value="DEC10" />
<ctl name="DEC10 MUX" value="DMIC3" />
<ctl name="SLIM_0_TX Channels" value="Two" />
<ctl name="DEC7 Volume" value="84" />
<ctl name="DEC10 Volume" value="84" />
</path>
is the same as the code by chdloc (whom I mentioned in my first post) except for slightly different order and volume. You also mentioned that all the other modifications you had come across wrote the sound in inverted position so you must have seen it then as he's the only person who's done it (and you're still using the same positions as he is). But anyways, I don't want to argue. If you did do it all by yourself and didn't copy anything from anyone else, then good job. :good:
Click to expand...
Click to collapse
It is possible that initially the file was made exactly by those you are talking about, but 100% I can not know about it And what exactly did it myself - i wrote in the first post

path name "speaker-gain-default" can be remove from mixer_paths.xml
this path never used as I see
thanks for this patch!
btw, you can use "Multi-quote" to reply those posts

This patch is pretty sweet Thanks!

j-a-d-z said:
Mhm … If I put my N5X to the left, so the buttons are on the upper side the playback channels are reversed like in all other stereo mods before. Left channel sound comes out of the bottom speaker, right channel out of the upper one. Back to DualMonoV2 for me.
Click to expand...
Click to collapse
same problem over here.
Is there an Nexus 5X speaker mod with real division of left and right audio channel for the upper and the lower speaker?

Related

[SOUNDMOD][S5_SurroundSound] UPDATE V1.3 16/11

Hi all, I have modded the Galaxy S5 mixer_paths.xml so that it will use earpiece aswell while playing music, watching youtube etc.
I found this on monivan's stereomod thread for the xperia Z (which i have) and I find it so cool that I wanted this on my wife's S5 so now I'm sharing here with you!
First of all, PLEASE DO A BACKUP OF YOUR CURRENT FILE BEFORE PROCEEDING!!
It is located in /system/etc/mixer_paths.xml
DISCLAIMER:
Everything you do is your choice, if you missing any important call or getting fired because of alarm didn't work, you busting your earpiece or thermonuclear war starts off and you point your finger at me, I will laugh at you.
I take no responsibility for your actions.
REQUIREMENTS :
-Rooted phone with busybox installed
-Stock rom (may also work on AOSP/CM, don't know try it yourself and let know here)
-galaxy s5 g900f
-users reported to work on note 10.1 and s4 also.
HOW TO INSTALL:
1. Download mixer_paths_xx_xx.zip
(Download links in download section)
(if not available request desktop version)
2. Move your stock/current mixer_paths.xml from /system/etc to any location on your sd card.
3. Unzip the zip file you just downloaded and copy mixer_paths.xml to /system/etc and set correct permission rw-r-r a.k.a. 0644
Like this:
XX0
X00
X00
4. Reboot
5. Turn down your volume before using and increase slowly to test safely.
I tuned volume values so that sound is not distorting at all kind of genres, with stock Samsung music player at full volume with no equaliser settings active.
But please be careful using this!!
Also I think S5 has much better earpiece than xperia Z or Z1, much more clear bass coming thru.
To test if this works see: Left/Right Stereo Audio/Visual Test.: http://youtu.be/dvqbq_0jZ_U
Have fun!
NOTE:
I now have made multiple versions made, to better fit everybody's needing.
I have made loud and normal versions, and I have made version with and without combined channels.
SINGLE AND DUAL CHANNEL?
I don't have to tell you guys what means loud and what means normal, but.. What means separated and combined channels?
Let's say, "RX1" is earpiece and "RX7" is loudspeaker. Those are hardware components.
Let's now say, we have an left and right channel. "RX1" and "RX2".
You might be thinking "why is RX1 earpiece and channel at the same time?"
-it isn't. Doesn't matter but read further.
Separate channel will mean left channel for example will play on earpiece (rx1 is playing rx2) and right channel is playing loudspeaker (rx7 is playing rx1)
Combined channel will mean left and right channels will both play on earpiece and loudspeaker at same time (rx1 is playing rx1 and rx2, and rx7 is playing rx1 and rx2)
TUTORIAL:
So, how to edit this to your exact needs?
Simple, open the xml file and goto somewhere around line 450. (Using 920 text editor from play store works fine)
You will see something like this ================================================================ -->
<!-- Play Scenario -->
<path name="handset">
<path name="rcv" />
<ctl name="EAR PA Gain" value="POS_3_DB" />
<ctl name="RX1 Digital Volume" value="84" />
</path>
<path name="speaker">
<path name="spk" />
<ctl name="HPHL Volume" value="20" />
<ctl name="HPHR Volume" value="20" />
<ctl name="EAR PA Gain" value="POS_3_DB" />
<ctl name="RX1 Digital Volume" value="86" />
<ctl name="RX7 Digital Volume" value="74" />
<ctl name="SPK DRV Volume" value="8" />
<ctl name="COMP0 Switch" value="1" />
</path>
<path name="headset">
<path name="ear" />
<ctl name="HPHL Volume" value="20" />
<ctl name="HPHR Volume" value="20" />
<ctl name="RX1 Digital Volume" value="79" />
<ctl name="RX2 Digital Volume" value="79" /
<ctl name="COMP1 Switch" value="1" /
path>
The thing you want to adjust are in the "speaker" section.
Rx1 and rx7 digital volumes.
Just remember:
Rx1 is earpiece in this section and rx7 is loudspeaker in this section.
Also you can adjust headphone volume , it is just beneath speaker section.
Only adjust the digital volumes, nothing else.
DOWNLOAD SECTION
Combined channels:
-loud
http://www.mediafire.com/view/f4uvmvj0wr82y97
-normal
http://www.mediafire.com/view/1rgx6jkrwwl8duy
Separated channels:
-loud
http://www.mediafire.com/view/xrvp9gsk4w20262
-normal
http://www.mediafire.com/view/5a7hd861dhbppca
Swapped separated channels:
-loud
http://www.mediafire.com/download/ujbeheq04esk9i7/swapped_rx1.90_rx7.80single.zip
-normal
http://www.mediafire.com/download/awspttlhppdl2za/swapped_rx1.86_rx7.74single.zip
CHANGELOG:
V1
-initial release
V1.1
-combined left and right channel on both speakers
-little clearer bass
-Earpiece slightly boost
V1.2
-multiple versions
V1.3
-added swapped channel versions at request of @smartypants88
Bugs: not working for 900H (not yet, if someone provide me correct files for it i will try)
CREDITS: @monivan for making this for XZ, without him you wouldn't have this by now @dontbelive for finding this on Z1, without him monivan didn't bring this to XZ @Sony @samsung for the wonderful mixer_paths.xml
@my girlfriend for testing on her brandnew gold S5 xD
Well done! Good luck, dude! Keep it up!
G900H Compatible?
Mediafire not available
gyxter said:
Mediafire not available
Click to expand...
Click to collapse
You have to request desktop page in your browser, as stated in OP
Salim.Keady said:
G900H Compatible?
Click to expand...
Click to collapse
Try it yourself, just make backup before as I described.
If not work, send me your mixer_paths.xml :thumbup:
Works on AOSP 4.4.4. Running on Nameless ROM right now and it sounds beautiful.
androidfilesharing said:
Works on AOSP 4.4.4. Running on Nameless ROM right now and it sounds beautiful.
Click to expand...
Click to collapse
Yeah I'm glad you're enjoying it! :thumbup:
Will this MOD damage or have any ill effects on the ear piece?
thuglifesk said:
Will this MOD damage or have any ill effects on the ear piece?
Click to expand...
Click to collapse
I have tested volume's on my wife's g900f and I think all variants have same earpiece.
If you're unsure, you can set your volume to minimum before installing this mod, and when installed slightly increase volume and see it yourself.
It will not bang your earpiece immediately, IF volume is to loud on yours you will be warned by hearing distortion.
langeveld024 said:
I have tested volume's on my wife's g900f and I think all variants have same earpiece.
If you're unsure, you can set your volume to minimum before installing this mod, and when installed slightly increase volume and see it yourself.
It will not bang your earpiece immediately, IF volume is to loud on yours you will be warned by hearing distortion.
Click to expand...
Click to collapse
[edit]I've just seen the file is downloaded 181 times so I think everybody is happy
langeveld024 said:
I have tested volume's on my wife's g900f and I think all variants have same earpiece.
If you're unsure, you can set your volume to minimum before installing this mod, and when installed slightly increase volume and see it yourself.
It will not bang your earpiece immediately, IF volume is to loud on yours you will be warned by hearing distortion.
Click to expand...
Click to collapse
Ive noticed for music and ringtones its amazing. However, I hear distortion for notification sounds for some reason. Doesn't make sense though? Has anyone else experienced this?
So, does this actually use both speakers to play sounds?
koragg97 said:
So, does this actually use both speakers to play sounds?
Click to expand...
Click to collapse
Yes
thuglifesk said:
Ive noticed for music and ringtones its amazing. However, I hear distortion for notification sounds for some reason. Doesn't make sense though? Has anyone else experienced this?
Click to expand...
Click to collapse
Did you try another notification sound? Do you use v4a or something?
Do you use any volume mod?
Also, you can try lowering ring volume a step and let me know if it still persist.
hey even i did try the mod there is an improvement in sound quality but the base is still not clear as of sony devices...and really I would appreciate your efforts
sumedh123 said:
hey even i did try the mod there is an improvement in sound quality but the base is still not clear as of sony devices...and really I would appreciate your efforts
Click to expand...
Click to collapse
I can make another version with an filter for which may or may not improve it.
Anyway I'm owning an Z myself and I'd tested this mod on my wife's s5 but when compared I think s5 has much clearer bass than the Z.
Do you use any equaliser setting or other audio mod?
If so, make them undone and test again :thumbup:
This is great sir. Very impressed. The sound is fabulous.
Thank you.
Sent from my kick butt GoldenEye flashed SM-G900W8 using XDA Premium HD app
Your mode is ok but not enought , also you can try mine
Download http://speedy.sh/s5UeR/mixer-paths.xml
ManDone.vRs said:
Your mode is ok but not enought , also you can try mine
Download http://speedy.sh/s5UeR/mixer-paths.xml
Click to expand...
Click to collapse
What is in it? I see only some code from the site you shared when click slow download.
Only 30kb file.
Can you upload to another site perhaps?
New version is up, lemme know what you think guys!

[Q] Reduce the maximum media volume permanently

Hello everyone. I use the Android 4.1.1 (HTC Desire X) and I want to reduce the maximum media volume permanently at about 75-80% of the current one... I have found many apps and settings but they reduce it temporarily... Any help?
Thanks in advance...
energeiakos said:
Hello everyone. I use the Android 4.1.1 (HTC Desire X) and I want to reduce the maximum media volume permanently at about 75-80% of the current one... I have found many apps and settings but they reduce it temporarily... Any help?
Thanks in advance...
Click to expand...
Click to collapse
Editing the mixer XML would do this.
And how can I do it?
From the root directory, go to /system/etc/mixer_paths.xml this file can break audio for you so please make a backup of the original before editing it, now you're going to be looking for something very similar or the same as I've pasted for example,
<path name="speaker">
<path name="fb-protection" />
<ctl name="SLIM RX1 MUX" value="AIF1_PB" />
<ctl name="SLIM_0_RX Channels" value="One" />
<ctl name="RX3 MIX1 INP1" value="RX1" />
<ctl name="RX3 Digital Volume" value="67" />
<ctl name="RX4 Digital Volume" value="67" />
<ctl name="RDAC5 MUX" value="DEM3_INV" />
<ctl name="LINEOUT1 Volume" value="16" />
<ctl name="LINEOUT3 Volume" value="16" />
<ctl name="RX3 HPF cut off" value="MIN_3DB_150Hz" />
<ctl name="SPK Amp Volume" value="4" />
<ctl name="SPK Amp CLK" value="On" />
</path>
For the lines that read RX3 Digital volume value and RX4 Digital volume value you'll be editing the values of those two lines. For example if I wanted a lower maximum volume I'd change both RX3 and RX4 from 67 to 66 for a lower 100% volume, the 67 will not be the same on your device however it'll be different from mine just so you don't use mine as an exact example, lastly make sure the permissions are good and the end result should be where you want it.
PS:You're going to need to edit this several times and reboot after each time to have the changes take effect.
Remember to listen for a comfortable volume level each time after editing so you don't make it too low. And last but not least, Goodluck!
---------- Post added at 04:58 PM ---------- Previous post was at 04:55 PM ----------
energeiakos said:
And how can I do it?
Click to expand...
Click to collapse
This is assuming that you're rooted of course. If you need any help just ask me, I can edit this file for you if aren't comfortable with doing it yourself.
This particular tutorial is for the phones speaker by the way, If your question is intended for headphone use that can be changed also.
Really, thank you for your help. But I cannot find the file mixer_paths.xml. I use root explorer and root browser, but it is nowhere in system/etc. Maybe it is a hidden file?
It may be elsewhere within your device, I'm not too familiar with the root directory of HTC devices.

[root] How to increase max audio volume on stock Global ROM

Are you running the stock global ROM and you've noticed that even at max volume the headphone jack output is too low? Here's how to fix it.
For some reason Xiaomi uses different mixer settings between global and China ROMs. The ones in China ROM give you substantially louder volume output.
Those settings are stored in 3 files:
/system/etc/mixer_paths.xml, /system/etc/mixer_paths_i2s.xml, and /system/etc/mixer_paths_tasha.xml (I think that only the last one is actually used by the system, but I didn't check it). To fix the audio volume problem you have to extract those files from the China ROM and overwrite the ones on your /system/ partition. Then you just need to reboot and done.
Here are those files from China stable ROM 8.1.3.0: https://drive.google.com/drive/folders/0B0LGcdBSjQjKeERFRmRuM0ZXSlU?usp=sharing
GREAT... thank you so mush
hcwdjk said:
Are you running the stock global ROM and you've noticed that even at max volume the headphone jack output is too low? Here's how to fix it.
For some reason Xiaomi uses different mixer settings between global and China ROMs. The ones in China ROM give you substantially louder volume output.
Those settings are stored in 3 files:
/system/etc/mixer_paths.xml, /system/etc/mixer_paths_i2s.xml, and /system/etc/mixer_paths_tasha.xml (I think that only the last one is actually used by the system, but I didn't check it). To fix the audio volume problem you have to extract those files from the China ROM and overwrite the ones on your /system/ partition. Then you just need to reboot and done.
Click to expand...
Click to collapse
i did it and now there is no sound at all, help me please
never mind, i fixed it. It woks great
This works for the Mi Max as well, albeit using a different filename.
felixmorillo said:
never mind, i fixed it. It woks great
Click to expand...
Click to collapse
how ? i don't have sound too
yorikkk said:
how ? i don't have sound too
Click to expand...
Click to collapse
Probably have to fix the permissions?
felixmorillo said:
never mind, i fixed it. It woks great
Click to expand...
Click to collapse
oreo27 said:
Probably have to fix the permissions?
Click to expand...
Click to collapse
did, no change
yorikkk said:
how ? i don't have sound too
Click to expand...
Click to collapse
i deleted the three files, i rebooted de phone then i move the new files to etc folder, i rebooted the phone and it worked
felixmorillo said:
i deleted the three files, i rebooted de phone then i move the new files to etc folder, i rebooted the phone and it worked
Click to expand...
Click to collapse
that works, thanks...
yorikkk said:
that works, thanks...
Click to expand...
Click to collapse
happy to help
I would actually like to do the opposite, lower the volume on ROMs different from the Global-Stable
Other ROMs I've tried (xiaomi.eu and CM based) increase the volume but also the background noise... At least on sensitive In-Ear monitors.
And CM14/Lineage even changes the sound in other ways, increasing the bass (yes, even with AudioFX "off").
I wish it wasn't so, I prefer the sound as unadultered as possible...
Its working. Thanks a lot
Could someone please upload the mixer_paths_tasha.xml file from the global stable ROM, I'd like to understand what changes are made from this to Xiaomi.eu and to CM/Lineage.
I was able to retrieve it from the ROM image.
It seems the differences are these, in the "headphone" mixer path:
Lines present in Global stable but not on Lineage:
<ctl name="COMP1 Switch" value="0" />
<ctl name="COMP2 Switch" value="0" />
<ctl name="HPHL Volume" value="11" />
<ctl name="HPHR Volume" value="11" />
Lines changed from Global stable to Lineage (below are the original Global Stable lines):
<ctl name="SLIM RX5 MUX" value="AIF4_PB" />
<ctl name="SLIM RX6 MUX" value="AIF4_PB" />
<ctl name="SLIM_6_RX Channels" value="Two" />
<ctl name="RX INT1_2 MUX" value="RX5" />
<ctl name="RX INT2_2 MUX" value="RX6" />
RX5 and RX6 become RX2 and RX3.
Changing these settings on the Lineage mixer paths file has an effect on sound, but it isn't consistent. Sometimes, volume and noise is lower (what I wanted), but sometimes it isn't. This with Spotify.
Pausing and resuming playing a song sometimes results in louder and sometimes in lower volume, so it seems it is not reading the setting all the time or consistently...
strikereg said:
I was able to retrieve it from the ROM image.
It seems the differences are these, in the "headphone" mixer path:
Lines present in Global stable but not on Lineage:
<ctl name="COMP1 Switch" value="0" />
<ctl name="COMP2 Switch" value="0" />
<ctl name="HPHL Volume" value="11" />
<ctl name="HPHR Volume" value="11" />
Lines changed from Global stable to Lineage (below are the original Global Stable lines):
<ctl name="SLIM RX5 MUX" value="AIF4_PB" />
<ctl name="SLIM RX6 MUX" value="AIF4_PB" />
<ctl name="SLIM_6_RX Channels" value="Two" />
<ctl name="RX INT1_2 MUX" value="RX5" />
<ctl name="RX INT2_2 MUX" value="RX6" />
RX5 and RX6 become RX2 and RX3.
Changing these settings on the Lineage mixer paths file has an effect on sound, but it isn't consistent. Sometimes, volume and noise is lower (what I wanted), but sometimes it isn't. This with Spotify.
Pausing and resuming playing a song sometimes results in louder and sometimes in lower volume, so it seems it is not reading the setting all the time or consistently...
Click to expand...
Click to collapse
I noticed similar changes between Global and China ROMs as well:
Code:
<ctl name="COMP1 Switch" value="0" />
<ctl name="COMP2 Switch" value="0" />
<ctl name="HPHL Volume" value="11" />
<ctl name="HPHR Volume" value="11
strikereg said:
I was able to retrieve it from the ROM image.
It seems the differences are these, in the "headphone" mixer path:
Lines present in Global stable but not on Lineage:
<ctl name="COMP1 Switch" value="0" />
<ctl name="COMP2 Switch" value="0" />
<ctl name="HPHL Volume" value="11" />
<ctl name="HPHR Volume" value="11" />
Lines changed from Global stable to Lineage (below are the original Global Stable lines):
<ctl name="SLIM RX5 MUX" value="AIF4_PB" />
<ctl name="SLIM RX6 MUX" value="AIF4_PB" />
<ctl name="SLIM_6_RX Channels" value="Two" />
<ctl name="RX INT1_2 MUX" value="RX5" />
<ctl name="RX INT2_2 MUX" value="RX6" />
RX5 and RX6 become RX2 and RX3.
Changing these settings on the Lineage mixer paths file has an effect on sound, but it isn't consistent. Sometimes, volume and noise is lower (what I wanted), but sometimes it isn't. This with Spotify.
Pausing and resuming playing a song sometimes results in louder and sometimes in lower volume, so it seems it is not reading the setting all the time or consistently...
Click to expand...
Click to collapse
But do you know which lines should change to make the speaker louder?
The <ctl name="HPHL Volume" value="11" /> only increase the headphones volume.
<ctl name="HPHR Volume" value="11" />
The difference is huge btw from Global to China rom.
Apexinioo said:
But do you know which lines should change to make the speaker louder?
The <ctl name="HPHL Volume" value="11" /> only increase the headphones volume.
<ctl name="HPHR Volume" value="11" />
The difference is huge btw from Global to China rom.
Click to expand...
Click to collapse
He simply compared the Global rom with the china ROM to spot the differences.
Can we use the files from the OP on the new Global Beta ROM, which is based on nougat? It's version 7.1.19
*KiD CuDi* said:
Can we use the files from the OP on the new Global Beta ROM, which is based on nougat? It's version 7.1.19
Click to expand...
Click to collapse
Try to compare the files first and see if there are any major differences.

[MOD] Swap audio channels in stock camera app, for right recording

All welcome!
If you notice, the stock camera in the Mi5 records video with the wrong audio channels. The top microphone is the right channel, and the main one is the left one.
This is noticeable when you record moving objects, for example from the left to the right. A sound on the video will be from right to left
To fix this developer error, we need to edit the file mixer_paths_tasha.xml
Looking for section:
Code:
<path name="camcorder-mic">
<path name="handset-mic" />
</path>
<path name="camcorder-dmic">
<ctl name="AIF1_CAP Mixer SLIM TX6" value="1"/>
<ctl name="AIF1_CAP Mixer SLIM TX5" value="1"/>
<ctl name="SLIM_0_TX Channels" value="Two" />
<ctl name="SLIM TX6 MUX" value="DEC6" />
<ctl name="ADC MUX6" value="AMIC" />
<ctl name="AMIC MUX6" value="ADC3" /> [COLOR="SeaGreen"]<-ADC3 change to ADC1[/COLOR]
<ctl name="SLIM TX5 MUX" value="DEC5" />
<ctl name="ADC MUX5" value="AMIC" />
<ctl name="AMIC MUX5" value="ADC1" /> [COLOR="seagreen"]<-ADC1 change to ADC3[/COLOR]
</path>
We need to swap the left and right microphones.
ADC1 - main mic near usb-c
ADC3 - top mic near IR
After editing the file, do not forget to set the permissions -rw-r--r--
After that we reboot the phone.
Now the stock camera records the sound correctly
Great find and solution. However, on my phone(global xiaomi.eu 9.2.1.0) the default settings were
AMIC MUX6...ADC1
AMIC MUX5...ADC3
Swapped values and works well.
More info:
1. mixer_paths_tasha.xml is in etc folder and the camcorder values are about 90% down the page, so there's a lot of scrolling.
2. front cam records audio channels well after changes, don't know if it was affected before.
3. just noticed that if you hold the phone upside down(with volume buttons on the bottom) the video comes completly upsidedown(image and sound) from both cameras. Thought it would automatically turn both so that they are viewed correctly however you hold the phone...

[FIX] In call echo and noise from top mic pocophone

If you are in a call and the other person hears himself or noises when the top mic is touched, by hair or hat..., you can try this:
[ROOT needed]
Edit this file:
\vendor\etc\mixer_paths_overlay_static.xml
find this sections:
<!-- Dual MIC devices -->
<path name="handset-dmic-endfire">
<ctl name="AIF1_CAP Mixer SLIM TX7" value="1" />
<ctl name="AIF1_CAP Mixer SLIM TX8" value="1" />
<ctl name="CDC_IF TX7 MUX" value="DEC7" />
<ctl name="ADC MUX7" value="AMIC" />
<ctl name="AMIC MUX7" value="ADC3" />
<ctl name="CDC_IF TX8 MUX" value="DEC8" />
<ctl name="ADC MUX8" value="AMIC" />
<ctl name="AMIC MUX8" value="ADC1" />
<ctl name="SLIM_0_TX Channels" value="Two" />
</path>
<path name="speaker-dmic-endfire">
<ctl name="AIF1_CAP Mixer SLIM TX7" value="1" />
<ctl name="AIF1_CAP Mixer SLIM TX8" value="1" />
<ctl name="CDC_IF TX7 MUX" value="DEC7" />
<ctl name="ADC MUX7" value="AMIC" />
<ctl name="AMIC MUX7" value="ADC3" />
<ctl name="CDC_IF TX8 MUX" value="DEC8" />
<ctl name="ADC MUX8" value="AMIC" />
<ctl name="AMIC MUX8" value="ADC1" />
<ctl name="SLIM_0_TX Channels" value="Two" />
</path>
and add this lines, so they look like this:
<!-- Dual MIC devices -->
<path name="handset-dmic-endfire">
<ctl name="DEC8 Volume" value="0" />
<ctl name="DEC7 Volume" value="92" />
<ctl name="AIF1_CAP Mixer SLIM TX7" value="1" />
<ctl name="AIF1_CAP Mixer SLIM TX8" value="1" />
<ctl name="CDC_IF TX7 MUX" value="DEC7" />
<ctl name="ADC MUX7" value="AMIC" />
<ctl name="AMIC MUX7" value="ADC3" />
<ctl name="CDC_IF TX8 MUX" value="DEC8" />
<ctl name="ADC MUX8" value="AMIC" />
<ctl name="AMIC MUX8" value="ADC1" />
<ctl name="SLIM_0_TX Channels" value="Two" />
</path>
<path name="speaker-dmic-endfire">
<ctl name="DEC8 Volume" value="84" />
<ctl name="AIF1_CAP Mixer SLIM TX7" value="1" />
<ctl name="AIF1_CAP Mixer SLIM TX8" value="1" />
<ctl name="CDC_IF TX7 MUX" value="DEC7" />
<ctl name="ADC MUX7" value="AMIC" />
<ctl name="AMIC MUX7" value="ADC3" />
<ctl name="CDC_IF TX8 MUX" value="DEC8" />
<ctl name="ADC MUX8" value="AMIC" />
<ctl name="AMIC MUX8" value="ADC1" />
<ctl name="SLIM_0_TX Channels" value="Two" />
</path>
This will set top mic sensitivity to 0, noise cancellation will not work but you can adjust "<ctl name="DEC8 Volume" value="0" />" as needed to have a little noise cancellation, default is 84. I've set it to 0 and i find it very good, no complains about the sound quality.
Also I've set 92 as the sensitivity for the lower mic, and it helps a little. Adjust <ctl name="DEC7 Volume" value="92" /> as you wish, default is 84.
I don't know if this is the best solution, but it helped me, so I share
* to make changes to this file, you need to mount vendor and system in twrp (in twrp>mount>check both)
** please report this bug using Settings > Feedback > and check "Issue" and describe the problem you are having, hopping that Poco devs will look into it.
*** I've built a magisk module to apply this fix, it makes it easier for those who flash roms frequently.
Heyy @wizard8400 i have one other problem, the mic doesn't work in calls on speakerphone but works well with normal. Do you know the fix for this?? I've tried both miui and other custom roms and have same issue.
@ayush.gl I don't think I can help, but for starts you can test if is a hardware problem: go to CIT (tap a few times on kernel version) and test main mic and top mic, I think you need headphones(simple ones, without mic on them) . From what I have tested it seems that on speaker it uses the top mic, in normal call it uses both mics, mainly the bottom one and the top one is for ANC.
wizard8400 said:
@ayush.gl I don't think I can help, but for starts you can test if is a hardware problem: go to CIT (tap a few times on kernel version) and test main mic and top mic, I think you need headphones(simple ones, without mic on them) . From what I have tested it seems that on speaker it uses the top mic, in normal call it uses both mics, mainly the bottom one and the top one is for ANC.
Click to expand...
Click to collapse
hi....thanks for the fix...was plagued with this issue for a while...quick question...this is safe correct? also if i still want noise cancellation instead of setting it to 0 i can set it to like 60 so it wouldn't be so sensitive? thanks
wizard8400 said:
@ayush.gl I don't think I can help, but for starts you can test if is a hardware problem: go to CIT (tap a few times on kernel version) and test main mic and top mic, I think you need headphones(simple ones, without mic on them) . From what I have tested it seems that on speaker it uses the top mic, in normal call it uses both mics, mainly the bottom one and the top one is for ANC.
Click to expand...
Click to collapse
I have tested the mic, it shows passed. Mic also works with recorder, cam, whatsapp calls. Only for calls on speakerphone it doesn't work. Any suggestions
ayush.gl said:
I have tested the mic, it shows passed. Mic also works with recorder, cam, whatsapp calls. Only for calls on speakerphone it doesn't work. Any suggestions
Click to expand...
Click to collapse
Same problem here
anil rajput said:
Same problem here
Click to expand...
Click to collapse
have you found any workaround?
ayush.gl said:
have you found any workaround?
Click to expand...
Click to collapse
No
Thanks will try this
Hey guys, i'm rooted and copied the overlay file to a different location and edited it with es datei explorer, but when i try to copy it back to vendor etc it always says vendor write only and i get a error. What to do to make it writeable. Permission is granted for the datei explorer.....dunno what to do. Have this echo and its really annoying for the peoe i call
Edit: solved it by mounting vendor in recovery and copying my modified file into vendor/etc folder
I'm having the same issue, even at low volume. But I can't find the file specified. Do I have another issue?
@Zundrium
I don't know what ROM you have, I'm on xiaomi.eu latest beta(weekly). You have root and mounted system and vendor in twrp, right?
Please help me I do not know how to do it please help me thanks
@calandula
what you don't know, how to edit the file, how to root? If one of those, then you need to search or open a topic about that operation, else will talk off topic and is not a good practice to be offtopic on a forum. ex.: I can't explain here how to root pocophone f1, there is already a topic about this.
@calandula
what you don't know, how to edit the file, how to root? If one of those, then you need to search or open a topic about that operation, else will talk off topic and is not a good practice to be offtopic on a forum. ex.: I can't explain here how to root pocophone f1, there is already a topic about this.
Hello in voip call like whatsapp work? Thanks
wizard8400 said:
@Zundrium
I don't know what ROM you have, I'm on xiaomi.eu latest beta(weekly). You have root and mounted system and vendor in twrp, right?
Click to expand...
Click to collapse
I used LineageOS and PixelExperience, both have the same issue, when rolling back to beryllium_global_images_V10.2.2.0.PEJMIXM I experience no issues.
I can also confirm that this isn't a firmware issue, I installed fw_beryllium_miui_POCOF1Global_V10.2.2.0.PEJMIXM in all cases.
Zundrium said:
I used LineageOS and PixelExperience, both have the same issue, when rolling back to beryllium_global_images_V10.2.2.0.PEJMIXM I experience no issues.
I can also confirm that this isn't a firmware issue, I installed fw_beryllium_miui_POCOF1Global_V10.2.2.0.PEJMIXM in all cases.
Click to expand...
Click to collapse
Have done the same tests and getting the same results. Seems to be OS related and not firmware.
Cool you made a magisk module! If install it is it permanent? Or when i remove it it gos back to normal?
@Mooatreides magisk module is systemless, you can enable / disable this fix to apply/revert the file. After flashing a new version of the ROM and magisk, this fix is applied, or not depending by the state of the module.

Categories

Resources