mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
Merge "asoc: codecs: wcd938x: Read and store mic bias value"
This commit is contained in:
commit
edae774372
1 changed files with 10 additions and 0 deletions
|
|
@ -1032,6 +1032,7 @@ int wcd938x_mbhc_init(struct wcd938x_mbhc **mbhc,
|
|||
struct wcd938x_mbhc *wcd938x_mbhc = NULL;
|
||||
struct wcd_mbhc *wcd_mbhc = NULL;
|
||||
int ret = 0;
|
||||
struct wcd938x_pdata *pdata;
|
||||
|
||||
if (!component) {
|
||||
pr_err("%s: component is NULL\n", __func__);
|
||||
|
|
@ -1055,6 +1056,15 @@ int wcd938x_mbhc_init(struct wcd938x_mbhc **mbhc,
|
|||
/* Setting default mbhc detection logic to ADC */
|
||||
wcd_mbhc->mbhc_detection_logic = WCD_DETECTION_ADC;
|
||||
|
||||
pdata = dev_get_platdata(component->dev);
|
||||
if (!pdata) {
|
||||
dev_err(component->dev, "%s: pdata pointer is NULL\n",
|
||||
__func__);
|
||||
ret = -EINVAL;
|
||||
goto err;
|
||||
}
|
||||
wcd_mbhc->micb_mv = pdata->micbias.micb2_mv;
|
||||
|
||||
ret = wcd_mbhc_init(wcd_mbhc, component, &mbhc_cb,
|
||||
&intr_ids, wcd_mbhc_registers,
|
||||
WCD938X_ZDET_SUPPORTED);
|
||||
|
|
|
|||
Loading…
Reference in a new issue