[guide][root] Tweaks Redmi 4x stock ROM

tweakradje

Senior Member
Mar 18, 2005
1,047
532
133
Android
sites.google.com
@tweakradje
Hi)
Many phones have already made a stereo sound (when the multimedia and spoken speakers sound together)
can you do also for redmi 4x? :)
@boom1982 Have no clue what you mean. voice and audio together at the same time from the speaker?
I heard of mixing microphone with audio on headphones for security when in traffic.

-In headset mode, added a little "ambient feedback" reproducing ambient sounds capturated by headset microphone on your ears (very low volume to don't affect music).
source: http://en.miui.com/forum.php?mod=viewthread&tid=772720


Try to add these 6 lines to /etc/mixer_paths_qrd_sku1.xml file:

Code:
    <path name="headphones">
        <ctl name="MI2S_RX Channels" value="Two" />
        <ctl name="RX1 MIX1 INP1" value="RX1" />
        <ctl name="RX2 MIX1 INP1" value="RX2" />
<!-- add mic input to stream with these 4 lines -->
<ctl name="IIR2 INP1 MUX" value="RX1" />
<ctl name="IIR3 INP1 MUX" value="RX2" />
<ctl name="RX1 MIX2 INP1" value="IIR2" />
<ctl name="RX2 MIX2 INP1" value="IIR3" />
        <ctl name="RDAC2 MUX" value="RX2" />
<!-- control volume of mic with these 2 lines-->
<ctl name="IIR2 INP1 Volume" value="92" />
<ctl name="IIR3 INP1 Volume" value="92" />
        <ctl name="HPHL" value="Switch" />
        <ctl name="HPHR" value="Switch" />
        <ctl name="headset amp" value="ENABLE"/>
    </path>
 
Last edited:
  • Like
Reactions: boom1982

tweakradje

Senior Member
Mar 18, 2005
1,047
532
133
Android
sites.google.com
@boom1982
Ah I see now. You want stereo output for both speakers!
I have not tried but if I compare stock and modded mixer_paths.xml in the link I see this:

Code:
    <path name="speaker">
        <ctl name="SLIM RX1 MUX" value="AIF1_PB" />
        <ctl name="SLIM RX2 MUX" value="AIF1_PB" />
        <ctl name="SLIM_0_RX Channels" value="Two" />
        <ctl name="RX1 MIX1 INP1" value="RX1" />
        <ctl name="RX1 MIX1 INP2" value="RX2" />
        <ctl name="RX7 MIX1 INP1" value="RX1" />
        <ctl name="RX7 MIX1 INP2" value="RX2" />
        <ctl name="RX1 Digital Volume" value="90" />
        <ctl name="RX7 Digital Volume" value="88" />
        <ctl name="SPK DRV Volume" value="6" />
        <ctl name="CLASS_H_DSM MUX" value="DSM_HPHL_RX1" />
        <ctl name="HPHL Volume" value="20" />
        <ctl name="HPHR Volume" value="20" />
        <ctl name="HPHL DAC Switch" value="1" />
        <ctl name="DAC1 Switch" value="1" />
    </path>
versus this in stock
Code:
    <path name="speaker">
        <ctl name="SLIM RX1 MUX" value="AIF1_PB" />
        <ctl name="SLIM_0_RX Channels" value="One" />
        <ctl name="RX7 MIX1 INP1" value="RX1" />
        <ctl name="RX7 Digital Volume" value="88" />
        <ctl name="SPK DRV Volume" value="6" />
    </path>
I don't have time now to translate this to Redmi 4X file. Maybe you can try.
Think you need to change /etc/mixer_paths_qrd_sku1.xml
 
  • Like
Reactions: boom1982
P

__PG__

Guest
tweaks for camera driver

Using your tweaks on Stock RR Camera does nil effects. And the picture quality is still the same. Also when turning off the denoise as mentioned in OP, The Noise is too much. After enabling it There is some improvements but Google camera Port is much better than your this Camera MOD. The settings are saved in Build.Prop already maybe that may have enhanced Google Camera Settings :p

Also, your HD audio Is working... But still my PowerAMP app is failing to Turn on that High-res Audio output :( lets see if you could help me with this too:highfive:
 

steford

Senior Member
Apr 29, 2006
166
26
48
Do you have any further info on the default CPU frequency settings? The minimum seems incredibly high at 960MHz. I use Kernel Adiutor (root) on my RN3 and I get a minimum option of 400Mhz which I choose. Is there any way to change the script to add the lower values or is it simply the app reporting the wrong values?

I will add your script to at least kill the 3 cores not required.

Thanks for any help.
 

Te$la

Senior Member
Oct 3, 2012
56
24
0
Thanks a lot for these mods OP.
I was using the Alternative CPU core control in my redmi 4 running global 8.5.2. I used the one u provided. It worked fine but as a result i lost volte! So i manually added only those quoted lines of code to the original init file and now everything is working fine and dandy :)

I would like to do the same thing to my redmi note 4 as all its 8 cores are online all the time. Can u tell me what to do?
Thanks...
 

peron

Senior Member
May 17, 2008
234
25
28
Thanks for these tweaks! I use fingerprint reader to function as a back button, very useful when browsing the net one handed.
 

Te$la

Senior Member
Oct 3, 2012
56
24
0
@Te$la is it qualcomm version? Then it will have the same kind of script. Find your board and soc id and look in the script if you see similar lines to change. Always keep a copy of the original.
Yes its snapdragon 625 4gb/64gb version.
I noticed that in global miui 8, redmi 4 switches some cores on/off depending on the load. But redmi note 4 doesnt switch cores on/off. All cores are online when the phone is awake, maybe stock kernel (global miui 8) doesnt support that(?). Didn't find any mod like this in RN4 forum.
I think I also need to change some other lines apart from the ones u said to enable the core on/off function... What do u think?
Anyways I'll try and see what happens...
 

doqipob

Member
Oct 13, 2013
24
6
0
Bournemouth
Hi guys !

Anyone of you know maybe where can i find the device feature file in 8.5.2 Official global rom? can't find the path in ect forder, so i can't change any values to mod LED notification color etc.

anyone knows?
 

tweakradje

Senior Member
Mar 18, 2005
1,047
532
133
Android
sites.google.com
Updated OP with latest (v5) of init.qcom.post_boot.sh for Resurrection Remix.

Maybe this is final. CPU cores behave now like I want. Small and background tasks on little cluster and foreground (starting apps) on big cluster. minimal big cores now 0 for optimal battery usage.

Please leave feedback if something needs to be improved/corrected.

Cheers
 

Kajuru

Senior Member
Sep 17, 2017
193
81
0
Updated OP with latest (v5) of init.qcom.post_boot.sh for Resurrection Remix.

Maybe this is final. CPU cores behave now like I want. Small and background tasks on little cluster and foreground (starting apps) on big cluster. minimal big cores now 0 for optimal battery usage.

Please leave feedback if something needs to be improved/corrected.

Cheers
I wrote a better reply but had some issues while updating the edit, so I'll keep it short this time:
Tested v3,v4 and v5 on RR latest, they all work, but v5 is much better written than the others(I have read all the in-file changes, btw). Good job.
Most of the time theres 0 Perf core and 1 Powersave core active(sometimes 2, for a few secs). Wattage at idle sitting at around 511-525mW, tested with HWMonitor.
Charging was floating around 0.4-1.1mW on stock file. I replaced the file mid-charge, but I noticed it was around 1.48-1.5 more consistently, maybe thanks to the Constant variable(since the system is using the other 0.5mW from stock charger). It just dropped late in the process for safety. Gotta watch better next charge. Temps ok, around the usual 42-43ºC I normally get. Used the SThermal Fastcharge instead of your thermal file, tho, since I didnt understand your changes at first and this one looks much simpler. Im willing to test yours again if its as good as RR v5 file.