asoc: codecs: Add comparator autozeroing support for rouleur
When current source mode is enabled, comparator auto zeroing should be turned ON by HW. As rouleur codec HW doesn't do this automatically, add this support in SW to set the auto zero enable before FSM enable and reset to auto once FSM is enabled. Disable surge protection before ADC measurements and change HPHL and HPHR thresholds while identifying cross connection for proper accessory identification. Change-Id: Ib775de0f0bdb6c655a3c0eb4775276acfbca1e84 Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
This commit is contained in:

committed by
Akhil Karuturi

vanhempi
c3fd6cc305
commit
313aa17ac4
@@ -145,6 +145,8 @@ do { \
|
||||
#define FW_READ_ATTEMPTS 15
|
||||
#define FW_READ_TIMEOUT 4000000
|
||||
#define FAKE_REM_RETRY_ATTEMPTS 3
|
||||
#define HPHL_CROSS_CONN_THRESHOLD 100
|
||||
#define HPHR_CROSS_CONN_THRESHOLD 100
|
||||
|
||||
#define WCD_MBHC_BTN_PRESS_COMPL_TIMEOUT_MS 50
|
||||
#define ANC_DETECT_RETRY_CNT 7
|
||||
@@ -456,12 +458,14 @@ struct wcd_mbhc_register {
|
||||
};
|
||||
|
||||
struct wcd_mbhc_cb {
|
||||
void (*mbhc_micb_pullup_control)
|
||||
(struct snd_soc_component *component, bool enable);
|
||||
void (*update_cross_conn_thr)
|
||||
(struct wcd_mbhc *mbhc);
|
||||
void (*mbhc_surge_ctl)
|
||||
(struct wcd_mbhc *mbhc, bool surge_en);
|
||||
void (*mbhc_comp_autozero_control)
|
||||
(struct wcd_mbhc *mbhc, bool az_enable);
|
||||
void (*get_micbias_val)
|
||||
(struct wcd_mbhc *mbhc, int *mb);
|
||||
void (*hs_vref_max_update)
|
||||
(struct wcd_mbhc *mbhc);
|
||||
void (*bcs_enable)
|
||||
(struct wcd_mbhc *mbhc, bool bcs_enable);
|
||||
int (*enable_mb_source)(struct wcd_mbhc *mbhc, bool turn_on);
|
||||
@@ -557,6 +561,8 @@ struct wcd_mbhc {
|
||||
u32 moist_vref;
|
||||
u32 moist_iref;
|
||||
u32 moist_rref;
|
||||
u32 hphl_cross_conn_thr;
|
||||
u32 hphr_cross_conn_thr;
|
||||
u8 micbias1_cap_mode; /* track ext cap setting */
|
||||
u8 micbias2_cap_mode; /* track ext cap setting */
|
||||
bool hs_detect_work_stop;
|
||||
|
Viittaa uudesa ongelmassa
Block a user