asoc: lpass-cdc: Enable compile lpass-cdc
Update lpass-cdc to compile on 5.10 kernel Change-Id: I0782c2f80531aa798794a8a4140a0b77bca7c9b1 Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
e3ab630202
commit
9e61f25f98
@@ -493,12 +493,12 @@ static bool is_amic_enabled(struct snd_soc_component *component, int decimator)
|
||||
|
||||
adc_mux_reg = LPASS_CDC_TX_INP_MUX_ADC_MUX0_CFG1 +
|
||||
LPASS_CDC_TX_MACRO_ADC_MUX_CFG_OFFSET * decimator;
|
||||
if (snd_soc_component_read32(component, adc_mux_reg) & SWR_MIC) {
|
||||
if (snd_soc_component_read(component, adc_mux_reg) & SWR_MIC) {
|
||||
if (tx_priv->version == LPASS_CDC_VERSION_2_1)
|
||||
return true;
|
||||
adc_reg = LPASS_CDC_TX_INP_MUX_ADC_MUX0_CFG0 +
|
||||
LPASS_CDC_TX_MACRO_ADC_MUX_CFG_OFFSET * decimator;
|
||||
adc_n = snd_soc_component_read32(component, adc_reg) &
|
||||
adc_n = snd_soc_component_read(component, adc_reg) &
|
||||
LPASS_CDC_TX_MACRO_SWR_MIC_MUX_SEL_MASK;
|
||||
if (adc_n < LPASS_CDC_ADC_MAX)
|
||||
return true;
|
||||
@@ -534,7 +534,7 @@ static void lpass_cdc_tx_macro_tx_hpf_corner_freq_callback(struct work_struct *w
|
||||
if (is_amic_enabled(component, hpf_work->decimator)) {
|
||||
adc_reg = LPASS_CDC_TX_INP_MUX_ADC_MUX0_CFG0 +
|
||||
LPASS_CDC_TX_MACRO_ADC_MUX_CFG_OFFSET * hpf_work->decimator;
|
||||
adc_n = snd_soc_component_read32(component, adc_reg) &
|
||||
adc_n = snd_soc_component_read(component, adc_reg) &
|
||||
LPASS_CDC_TX_MACRO_SWR_MIC_MUX_SEL_MASK;
|
||||
/* analog mic clear TX hold */
|
||||
lpass_cdc_clear_amic_tx_hold(component->dev, adc_n);
|
||||
@@ -949,10 +949,10 @@ static int lpass_cdc_tx_macro_get_bcs_ch_sel(struct snd_kcontrol *kcontrol,
|
||||
return -EINVAL;
|
||||
|
||||
if (tx_priv->version == LPASS_CDC_VERSION_2_1)
|
||||
value = (snd_soc_component_read32(component,
|
||||
value = (snd_soc_component_read(component,
|
||||
LPASS_CDC_VA_TOP_CSR_SWR_CTRL)) & 0x0F;
|
||||
else if (tx_priv->version == LPASS_CDC_VERSION_2_0)
|
||||
value = (snd_soc_component_read32(component,
|
||||
value = (snd_soc_component_read(component,
|
||||
LPASS_CDC_TX_TOP_CSR_SWR_CTRL)) & 0x0F;
|
||||
|
||||
ucontrol->value.integer.value[0] = value;
|
||||
@@ -1062,7 +1062,7 @@ static int lpass_cdc_tx_macro_enable_dec(struct snd_soc_dapm_widget *w,
|
||||
tx_fs_reg = LPASS_CDC_TX0_TX_PATH_CTL +
|
||||
LPASS_CDC_TX_MACRO_TX_PATH_OFFSET * decimator;
|
||||
|
||||
tx_priv->amic_sample_rate = (snd_soc_component_read32(component,
|
||||
tx_priv->amic_sample_rate = (snd_soc_component_read(component,
|
||||
tx_fs_reg) & 0x0F);
|
||||
|
||||
switch (event) {
|
||||
@@ -1086,7 +1086,7 @@ static int lpass_cdc_tx_macro_enable_dec(struct snd_soc_dapm_widget *w,
|
||||
usleep_range(1000, 1010);
|
||||
}
|
||||
hpf_cut_off_freq = (
|
||||
snd_soc_component_read32(component, dec_cfg_reg) &
|
||||
snd_soc_component_read(component, dec_cfg_reg) &
|
||||
TX_HPF_CUT_OFF_FREQ_MASK) >> 5;
|
||||
|
||||
tx_priv->tx_hpf_work[decimator].hpf_cut_off_freq =
|
||||
@@ -1126,7 +1126,7 @@ static int lpass_cdc_tx_macro_enable_dec(struct snd_soc_dapm_widget *w,
|
||||
}
|
||||
/* apply gain after decimator is enabled */
|
||||
snd_soc_component_write(component, tx_gain_ctl_reg,
|
||||
snd_soc_component_read32(component,
|
||||
snd_soc_component_read(component,
|
||||
tx_gain_ctl_reg));
|
||||
if (tx_priv->bcs_enable) {
|
||||
if (tx_priv->version == LPASS_CDC_VERSION_2_1)
|
||||
@@ -1147,7 +1147,7 @@ static int lpass_cdc_tx_macro_enable_dec(struct snd_soc_dapm_widget *w,
|
||||
0x40);
|
||||
}
|
||||
if (tx_priv->version == LPASS_CDC_VERSION_2_0) {
|
||||
if (snd_soc_component_read32(component, adc_mux_reg)
|
||||
if (snd_soc_component_read(component, adc_mux_reg)
|
||||
& SWR_MIC) {
|
||||
snd_soc_component_update_bits(component,
|
||||
LPASS_CDC_TX_TOP_CSR_SWR_CTRL,
|
||||
@@ -1208,7 +1208,7 @@ static int lpass_cdc_tx_macro_enable_dec(struct snd_soc_dapm_widget *w,
|
||||
&tx_priv->tx_mute_dwork[decimator].dwork);
|
||||
|
||||
if (tx_priv->version == LPASS_CDC_VERSION_2_0) {
|
||||
if (snd_soc_component_read32(component, adc_mux_reg)
|
||||
if (snd_soc_component_read(component, adc_mux_reg)
|
||||
& SWR_MIC)
|
||||
snd_soc_component_update_bits(component,
|
||||
LPASS_CDC_TX_TOP_CSR_SWR_CTRL,
|
||||
|
Reference in New Issue
Block a user