Merge "asoc: update curr_micbias2 val with mb->micb2_mv"

This commit is contained in:
QCTECMDR Service
2024-07-24 00:59:52 -07:00
committed by Gerrit - the friendly Code Review server
melakukan beff0c7ec3
2 mengubah file dengan 5 tambahan dan 17 penghapusan

Melihat File

@@ -138,7 +138,6 @@ struct wcd9378_priv {
struct snd_info_entry *version_entry;
struct snd_info_entry *variant_entry;
int flyback_cur_det_disable;
bool dev_up;
u8 tx_master_ch_map[WCD9378_MAX_SLAVE_CH_TYPES];
bool usbc_hs_status;
/* wcd to swr dmic notification */

Melihat File

@@ -1982,7 +1982,6 @@ static int wcd9378_hph_sequencer_enable(struct snd_soc_dapm_widget *w,
snd_soc_component_update_bits(component, WCD9378_PDE47_REQ_PS,
WCD9378_PDE47_REQ_PS_PDE47_REQ_PS_MASK, 0x00);
/*TBD: SET SDCA GAIN, NEED CHECK THE LOGIC*/
wcd9378_hph_set_channel_volume(component);
if ((!wcd9378->comp1_enable) || (!wcd9378->comp2_enable))
@@ -2265,14 +2264,14 @@ int wcd9378_micbias_control(struct snd_soc_component *component,
snd_soc_component_update_bits(component, WCD9378_MB_PULLUP_EN,
pull_up_mask, pull_up_en);
snd_soc_component_update_bits(component,
micb_usage, micb_mask, 0x03);
micb_usage, micb_mask, micb_usage_val);
if (micb_num == MIC_BIAS_2) {
snd_soc_component_update_bits(component,
WCD9378_IT31_MICB,
WCD9378_IT31_MICB_IT31_MICB_MASK,
0x03);
wcd9378->curr_micbias2 = 1800;
micb_usage_val);
wcd9378->curr_micbias2 = mb->micb2_mv;
}
}
break;
@@ -2294,12 +2293,6 @@ int wcd9378_micbias_control(struct snd_soc_component *component,
}
break;
case MICB_ENABLE:
if (!wcd9378->dev_up) {
dev_dbg(component->dev, "%s: enable req %d wcd device down\n",
__func__, req);
ret = -ENODEV;
goto done;
}
wcd9378->micb_ref[micb_index]++;
if (wcd9378->micb_ref[micb_index] == 1) {
dev_dbg(component->dev, "%s: enable micbias, micb_usage:0x%0x, val:0x%0x\n",
@@ -2312,7 +2305,7 @@ int wcd9378_micbias_control(struct snd_soc_component *component,
WCD9378_IT31_MICB,
WCD9378_IT31_MICB_IT31_MICB_MASK,
micb_usage_val);
wcd9378->curr_micbias2 = 1800;
wcd9378->curr_micbias2 = mb->micb2_mv;
}
if (post_on_event)
blocking_notifier_call_chain(
@@ -2334,7 +2327,7 @@ int wcd9378_micbias_control(struct snd_soc_component *component,
pull_up_mask, pull_up_en);
if (micb_num == MIC_BIAS_2)
wcd9378->curr_micbias2 = 1800;
wcd9378->curr_micbias2 = mb->micb2_mv;
} else if ((wcd9378->micb_ref[micb_index] == 0) &&
(wcd9378->pullup_ref[micb_index] == 0)) {
if (pre_off_event && wcd9378->mbhc)
@@ -2373,7 +2366,6 @@ int wcd9378_micbias_control(struct snd_soc_component *component,
__func__, micb_num, wcd9378->micb_ref[micb_index],
wcd9378->pullup_ref[micb_index]);
done:
mutex_unlock(&wcd9378->micb_lock);
return ret;
}
@@ -2475,7 +2467,6 @@ static int wcd9378_event_notify(struct notifier_block *block,
0x80, 0x00);
break;
case BOLERO_SLV_EVT_SSR_DOWN:
wcd9378->dev_up = false;
if (wcd9378->notify_swr_dmic)
blocking_notifier_call_chain(&wcd9378->notifier,
WCD9378_EVT_SSR_DOWN,
@@ -2513,7 +2504,6 @@ static int wcd9378_event_notify(struct notifier_block *block,
wcd9378_mbhc_hs_detect(component, mbhc->mbhc_cfg);
}
wcd9378->mbhc->wcd_mbhc.deinit_in_progress = false;
wcd9378->dev_up = true;
if (wcd9378->notify_swr_dmic)
blocking_notifier_call_chain(&wcd9378->notifier,
WCD9378_EVT_SSR_UP,
@@ -4390,7 +4380,6 @@ static int wcd9378_bind(struct device *dev)
__func__);
goto err_irq;
}
wcd9378->dev_up = true;
return ret;
err_irq: