[Android Software/Hacking General [Developers Only]] LuizPauloDamaceno:
Hello folks, i'm a developer of Simple Kernel for santoni... And i have some "Unsolved questions" that i'm gonna ask here... First: Earpiece as speaker. I know I should modify mixer paths to use earpiece as another speaker, i have "Stealth Player" that allows sound only coming from earpiece,i see PMIC heats up a little bit when using earpiece, i think earpiece doesn't have an single external amplifier for it, but i want to listen through earpiece and speaker. I already try somethings for example doing this:

- On mixer paths original file, i have these ones:

Speaker:

<path name="speaker">
<ctl name="MI2S_RX Channels" value="One" />
<ctl name="RX2 MIX1 INP1" value="RX2" />
<ctl name="RDAC2 MUX" value="RX2" />
<ctl name="RX2 Digital Volume" value="89" />
<ctl name="Boost Output Voltage" value="9V" />
<ctl name="SpkrMono BOOST Switch" value="1" />
<ctl name="SpkrMono VISENSE Switch" value="1" />
<ctl name="Speaker Boost" value="ENABLE" />
<ctl name="Lineout_1 amp" value="ENABLE"/>
<ctl name="HPHR" value="Switch" />
</path>

Earpiece:

<path name="handset">
<ctl name="RX1 MIX1 INP1" value="RX1" />
<ctl name="RDAC2 MUX" value="RX1" />
<ctl name="RX1 Digital Volume" value="91" />
<ctl name="EAR PA Gain" value="POS_6_DB" />
<ctl name="EAR PA Boost" value="ENABLE" />
<ctl name="EAR_S" value="Switch" />
</path>

I already try to do this:

<path name="speaker">
<ctl name="MI2S_RX Channels" value="One" />
<ctl name="RX2 MIX1 INP1" value="RX2" />
<ctl name="RDAC2 MUX" value="RX2" />
<ctl name="RX2 Digital Volume" value="89" />
<ctl name="Boost Output Voltage" value="9V" />
<ctl name="SpkrMono BOOST Switch" value="1" />
<ctl name="SpkrMono VISENSE Switch" value="1" />
<ctl name="Speaker Boost" value="ENABLE" />
<ctl name="Lineout_1 amp" value="ENABLE"/>
<ctl name="HPHR" value="Switch" />
<ctl name="EAR PA Gain" value="POS_6_DB" />
<ctl name="EAR PA Boost" value="ENABLE" />

-> Added some earpiece paths to speaker configuration, but i cant listen anything coming from speaker, just from earpiece. I also tried to change "RDAC2" RX path too, but samething. Anything i've done the result is the same: sound comming only from earpiece. I was thinking... Speaker and Handset, both shares RDAC2 but with different Inputs / Outputs? I can't find any documentation about this, just for "MSM8916", mine is MSM8937, doesn't help much.

Second: GPU Overclocking.

In my kernel i had overclocked with success and effectively Adreno 505 (no placebo), we should unlock PLL's to oveclocking works great. But i know i can go more than 125MHz from stock configuration addying some voltage. I know, its dangerous, but i can see performance incrase doing this. But i have a problem... MSM8937 dtsi files (that ones what have regulator configs) only have corners that is something like this:

/* VDD_CX supply */
rpm-regulator-smpa2 {
status = "okay";
qcom,gx-retention; //Enable regulator retention level for IDLE modes
qcom,soft-start-enable = <0x1>; //enable soft start to start without current peaks that can damage device
qcom,hpm-enable = <0x1>; //enable high power mode
qcom,boost-current-limit = <14>; //3200mA maximum
qcom,ocp-enable = <1>; //enables over current protection
pm8937_s2_level: regulator-s2-level {
compatible = "qcom,rpm-smd-regulator";
regulator-name = "pm8937_s2_level";
qcom,set = <3>;
regulator-min-microvolt =
<RPM_SMD_REGULATOR_LEVEL_RETENTION>;
regulator-max-microvolt =
<RPM_SMD_REGULATOR_LEVEL_BINNING>;
qcom,use-voltage-level;
};

pm8937_s2_floor_level: regulator-s2-floor-level {
compatible = "qcom,rpm-smd-regulator";
regulator-name = "pm8937_s2_floor_level";
qcom,set = <3>;
regulator-min-microvolt =
<RPM_SMD_REGULATOR_LEVEL_RETENTION>;
regulator-max-microvolt =
<RPM_SMD_REGULATOR_LEVEL_BINNING>;
qcom,use-voltage-floor-level;
qcom,always-send-voltage;
};

pm8937_s2_level_ao: regulator-s2-level-ao {
compatible = "qcom,rpm-smd-regulator";
regulator-name = "pm8937_s2_level_ao";
qcom,set = <1>;
regulator-min-microvolt =
<RPM_SMD_REGULATOR_LEVEL_RETENTION>;
regulator-max-microvolt =
<RPM_SMD_REGULATOR_LEVEL_BINNING>;
qcom,use-voltage-level;
};
};

VDD_CX is the regulator for GPU. But we only have "RPM_SMD_REGULATOR_LEVEL", dont voltage "in millivolts"... I was researching on some documentations and see the RPM (Resource Power Manager) translate these levels (that goes from RETENTION to BINNING, 16 to 512) in voltages, but... Its possible to change this? I can do any voltage change on my GPU regulator?