Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bcbd1d59 authored by Asish Bhattacharya's avatar Asish Bhattacharya
Browse files

ASoC: msm8952: Change keycode mapping and linein_th



Change the key code mapping of buttons as below
according to Android spec. Report SW_LINEOUT_INSERT
if headset speaker impedance is larger than 5 Kohm

Button0 0-70 ohm - hook key
Button1 110-180 ohm - voice assist
Button2 210-290 ohm - volume up
Button3 360-680 ohm - volume down

CRs-Fixed: 924091
Change-Id: Ic4500c6ccbd1db7d6a6c2932f30ae00e7d61d062
Signed-off-by: default avatarAsish Bhattacharya <asishb@codeaurora.org>
parent a6b58f17
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -109,6 +109,15 @@ static struct wcd_mbhc_config wcd_mbhc_cfg = {
	.mono_stero_detection = false,
	.swap_gnd_mic = NULL,
	.hs_ext_micbias = true,
	.key_code[0] = KEY_MEDIA,
	.key_code[1] = KEY_VOICECOMMAND,
	.key_code[2] = KEY_VOLUMEUP,
	.key_code[3] = KEY_VOLUMEDOWN,
	.key_code[4] = 0,
	.key_code[5] = 0,
	.key_code[6] = 0,
	.key_code[7] = 0,
	.linein_th = 5000,
};

static struct wcd9xxx_mbhc_config wcd9xxx_mbhc_cfg = {
+9 −0
Original line number Diff line number Diff line
@@ -88,6 +88,15 @@ static struct wcd_mbhc_config mbhc_cfg = {
	.mono_stero_detection = false,
	.swap_gnd_mic = NULL,
	.hs_ext_micbias = false,
	.key_code[0] = KEY_MEDIA,
	.key_code[1] = KEY_VOICECOMMAND,
	.key_code[2] = KEY_VOLUMEUP,
	.key_code[3] = KEY_VOLUMEDOWN,
	.key_code[4] = 0,
	.key_code[5] = 0,
	.key_code[6] = 0,
	.key_code[7] = 0,
	.linein_th = 5000,
};

static struct afe_clk_set mi2s_tx_clk = {