Still wont work, something very strange..
Visualizzazione stampabile
Still wont work, something very strange..
install quick reboot and reboot in recovery with this app
Nope still wont work.. gotta give it up for today.
Paolo, you can try to add support multibutton headsets?
There Headset Xiaomi Piston with three buttons.
This proprietary headset Xiaomi.
The type sine firmware 4.4 are two of the three buttons. On the CM12 operates only the center.
I use an application KeyTest that would determine which buttons sees the system.
Concludes that the problem of soft or in the kernel.
Have a nice day!:laughing:
if you use an app like jays headset control you can use all button or still only one ?
I will check...
Paolo view this please: https://github.com/M1cha/android_dev...mment-54744916
there's even a patch for a different device to Cm11: https://github.com/M1cha/android_dev...mment-54800092Quote:
I think I see why Xiaomi headset buttons don't work - they use different resistance values for buttons compared to what the kernel in @M1cha build expects.
I've compared "sound/soc/msm/apq8064.c" in kernel source between @M1cha version and official (at least that's what I found) version from Xiaomi (https://github.com/MiCode/mi2_kernel), and they differ in the function that I understand as setting button resistances: at
static void *def_tabla_mbhc_cal(void)
somewhere in its code there is this:
Xiaomi M1cha
btn_low[0] = -75; btn_low[0] = -50;
btn_high[0] = 150; btn_high[0] = 10;
btn_low[1] = 151; btn_low[1] = 11;
btn_high[1] = 330; btn_high[1] = 52;
btn_low[2] = 331; btn_low[2] = 53;
btn_high[2] = 655; btn_high[2] = 94;
btn_low[3] = 21; btn_low[3] = 95;
btn_high[3] = 62; btn_high[3] = 133;
btn_low[4] = 154; btn_low[4] = 134;
btn_high[4] = 181; btn_high[4] = 171;
btn_low[5] = 182; btn_low[5] = 172;
btn_high[5] = 218; btn_high[5] = 208;
btn_low[6] = 219; btn_low[6] = 209;
btn_high[6] = 254; btn_high[6] = 244;
btn_low[7] = 63; btn_low[7] = 245;
btn_high[7] = 104; btn_high[7] = 330;
I've fixed (at least on my device) both Xiaomi Pistons (gold, v.2) and MiKey with CM11 m8.
I had to re-compile the kernel (with some changes) and to change keylayout file.
Pull requests are:
https://github.com/M1cha/android_ker...i_aries/pull/2
Please, pls!!)
with the apk keytest you see the scancode of all button or only one ?