mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
extcon-madera: delay to enable mic bias
there is obvious noise can be heared when heaset plug in. if we enable micbias when the headset has not been inserted totally. the noise can be transfered to HPHL/HPHR Propagated from: (CR) Change-Id: I9afc1cb0c7a5bad1381ac448774131d4b56a645c Signed-off-by: huangys <huangys@motorola.com> Reviewed-on: https://gerrit.mot.com/1216722 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Guobin Zhang <zhanggb@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
6c77815498
commit
de2eeab0f0
3 changed files with 12 additions and 0 deletions
|
|
@ -29,6 +29,9 @@ Child node mandatory properties:
|
|||
- reg : output number this configuration applies to, must be 1
|
||||
|
||||
Child node optional properties:
|
||||
- cirrus,init-mic-delay-ms : Additional delay to wait headset plug in totally
|
||||
delay specified in milliseconds
|
||||
|
||||
- cirrus,micd-detect-debounce-ms : Additional software microphone detection
|
||||
debounce specified in milliseconds
|
||||
|
||||
|
|
|
|||
|
|
@ -2223,6 +2223,9 @@ static irqreturn_t madera_jackdet(int irq, void *data)
|
|||
info->have_mic = false;
|
||||
info->jack_flips = 0;
|
||||
|
||||
if (info->pdata->init_mic_delay_ms)
|
||||
msleep(info->pdata->init_mic_delay_ms);
|
||||
|
||||
if (info->pdata->custom_jd)
|
||||
madera_jds_set_state(info, info->pdata->custom_jd);
|
||||
else if (info->pdata->micd_software_compare)
|
||||
|
|
@ -2450,6 +2453,9 @@ static void madera_extcon_process_accdet_node(struct madera_extcon *info,
|
|||
pdata->enabled = true; /* implied by presence of properties node */
|
||||
pdata->output = out_num;
|
||||
|
||||
fwnode_property_read_u32(node, "cirrus,init-mic-delay-ms",
|
||||
&pdata->init_mic_delay_ms);
|
||||
|
||||
fwnode_property_read_u32(node, "cirrus,micd-detect-debounce-ms",
|
||||
&pdata->micd_detect_debounce_ms);
|
||||
|
||||
|
|
|
|||
|
|
@ -92,6 +92,9 @@ struct madera_accdet_pdata {
|
|||
*/
|
||||
u32 hpdet_channel;
|
||||
|
||||
/* Extra delay time to wait the headset plug in totally (milliseconds) */
|
||||
u32 init_mic_delay_ms;
|
||||
|
||||
/** Extra debounce timeout during initial mic detect (milliseconds) */
|
||||
u32 micd_detect_debounce_ms;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue