asoc: lpass-cdc: update correct offset to set IIR1 registers
Update correct offset to set IIR1 registers to make sidetone work. Change-Id: I94cc7f54c5d68954565d683aee0d3e887eebedb3 Signed-off-by: Meng Wang <mengw@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

vanhempi
d7a73f35b7
commit
d5cfb617e3
@@ -1,5 +1,5 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
/* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/regmap.h>
|
#include <linux/regmap.h>
|
||||||
@@ -854,6 +854,10 @@ static bool bolero_is_volatile_register(struct device *dev,
|
|||||||
case BOLERO_CDC_RX_EC_ASRC2_STATUS_FMAX_CNTR_LSB:
|
case BOLERO_CDC_RX_EC_ASRC2_STATUS_FMAX_CNTR_LSB:
|
||||||
case BOLERO_CDC_RX_EC_ASRC2_STATUS_FMAX_CNTR_MSB:
|
case BOLERO_CDC_RX_EC_ASRC2_STATUS_FMAX_CNTR_MSB:
|
||||||
case BOLERO_CDC_RX_EC_ASRC2_STATUS_FIFO:
|
case BOLERO_CDC_RX_EC_ASRC2_STATUS_FIFO:
|
||||||
|
case BOLERO_CDC_RX_SIDETONE_IIR0_IIR_COEF_B1_CTL:
|
||||||
|
case BOLERO_CDC_RX_SIDETONE_IIR0_IIR_COEF_B2_CTL:
|
||||||
|
case BOLERO_CDC_RX_SIDETONE_IIR1_IIR_COEF_B1_CTL:
|
||||||
|
case BOLERO_CDC_RX_SIDETONE_IIR1_IIR_COEF_B2_CTL:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@@ -2901,7 +2901,7 @@ static uint32_t get_iir_band_coeff(struct snd_soc_component *component,
|
|||||||
/* Mask bits top 2 bits since they are reserved */
|
/* Mask bits top 2 bits since they are reserved */
|
||||||
value |= ((snd_soc_component_read(component,
|
value |= ((snd_soc_component_read(component,
|
||||||
(BOLERO_CDC_RX_SIDETONE_IIR0_IIR_COEF_B2_CTL +
|
(BOLERO_CDC_RX_SIDETONE_IIR0_IIR_COEF_B2_CTL +
|
||||||
16 * iir_idx)) & 0x3F) << 24);
|
0x80 * iir_idx)) & 0x3F) << 24);
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
@@ -2988,7 +2988,7 @@ static int rx_macro_iir_band_audio_mixer_put(struct snd_kcontrol *kcontrol,
|
|||||||
* Updates addr automatically for each B2 write
|
* Updates addr automatically for each B2 write
|
||||||
*/
|
*/
|
||||||
snd_soc_component_write(component,
|
snd_soc_component_write(component,
|
||||||
(BOLERO_CDC_RX_SIDETONE_IIR0_IIR_COEF_B1_CTL + 16 * iir_idx),
|
(BOLERO_CDC_RX_SIDETONE_IIR0_IIR_COEF_B1_CTL + 0x80 * iir_idx),
|
||||||
(band_idx * BAND_MAX * sizeof(uint32_t)) & 0x7F);
|
(band_idx * BAND_MAX * sizeof(uint32_t)) & 0x7F);
|
||||||
|
|
||||||
/* Store the coefficients in sidetone coeff array */
|
/* Store the coefficients in sidetone coeff array */
|
||||||
|
@@ -2931,7 +2931,7 @@ static uint32_t get_iir_band_coeff(struct snd_soc_component *component,
|
|||||||
/* Mask bits top 2 bits since they are reserved */
|
/* Mask bits top 2 bits since they are reserved */
|
||||||
value |= ((snd_soc_component_read(component,
|
value |= ((snd_soc_component_read(component,
|
||||||
(LPASS_CDC_RX_SIDETONE_IIR0_IIR_COEF_B2_CTL +
|
(LPASS_CDC_RX_SIDETONE_IIR0_IIR_COEF_B2_CTL +
|
||||||
16 * iir_idx)) & 0x3F) << 24);
|
0x80 * iir_idx)) & 0x3F) << 24);
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
@@ -3029,7 +3029,7 @@ static int lpass_cdc_rx_macro_iir_band_audio_mixer_put(struct snd_kcontrol *kcon
|
|||||||
* Updates addr automatically for each B2 write
|
* Updates addr automatically for each B2 write
|
||||||
*/
|
*/
|
||||||
snd_soc_component_write(component,
|
snd_soc_component_write(component,
|
||||||
(LPASS_CDC_RX_SIDETONE_IIR0_IIR_COEF_B1_CTL + 16 * iir_idx),
|
(LPASS_CDC_RX_SIDETONE_IIR0_IIR_COEF_B1_CTL + 0x80 * iir_idx),
|
||||||
(band_idx * BAND_MAX * sizeof(uint32_t)) & 0x7F);
|
(band_idx * BAND_MAX * sizeof(uint32_t)) & 0x7F);
|
||||||
|
|
||||||
/* Store the coefficients in sidetone coeff array */
|
/* Store the coefficients in sidetone coeff array */
|
||||||
|
Viittaa uudesa ongelmassa
Block a user