Skip to content

Commit fca041a

Browse files
Srinivas-Kandagatlabroonie
authored andcommitted
ASoC: codecs: lpass-rx-macro: fix sidetone register offsets
For some reason we ended up with incorrect register offfset calcuations for sidetone. regmap clearly throw errors when accessing these incorrect registers as these do not belong to any read/write ranges. so fix them to point to correct register offsets. Fixes: f3ce6f3 ("ASoC: codecs: lpass-rx-macro: add iir widgets") Signed-off-by: Srinivas Kandagatla <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent c5c1546 commit fca041a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sound/soc/codecs/lpass-rx-macro.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2688,8 +2688,8 @@ static uint32_t get_iir_band_coeff(struct snd_soc_component *component,
26882688
int reg, b2_reg;
26892689

26902690
/* Address does not automatically update if reading */
2691-
reg = CDC_RX_SIDETONE_IIR0_IIR_COEF_B1_CTL + 16 * iir_idx;
2692-
b2_reg = CDC_RX_SIDETONE_IIR0_IIR_COEF_B2_CTL + 16 * iir_idx;
2691+
reg = CDC_RX_SIDETONE_IIR0_IIR_COEF_B1_CTL + 0x80 * iir_idx;
2692+
b2_reg = CDC_RX_SIDETONE_IIR0_IIR_COEF_B2_CTL + 0x80 * iir_idx;
26932693

26942694
snd_soc_component_write(component, reg,
26952695
((band_idx * BAND_MAX + coeff_idx) *
@@ -2718,7 +2718,7 @@ static uint32_t get_iir_band_coeff(struct snd_soc_component *component,
27182718
static void set_iir_band_coeff(struct snd_soc_component *component,
27192719
int iir_idx, int band_idx, uint32_t value)
27202720
{
2721-
int reg = CDC_RX_SIDETONE_IIR0_IIR_COEF_B2_CTL + 16 * iir_idx;
2721+
int reg = CDC_RX_SIDETONE_IIR0_IIR_COEF_B2_CTL + 0x80 * iir_idx;
27222722

27232723
snd_soc_component_write(component, reg, (value & 0xFF));
27242724
snd_soc_component_write(component, reg, (value >> 8) & 0xFF);
@@ -2739,7 +2739,7 @@ static int rx_macro_put_iir_band_audio_mixer(
27392739
int iir_idx = ctl->iir_idx;
27402740
int band_idx = ctl->band_idx;
27412741
u32 coeff[BAND_MAX];
2742-
int reg = CDC_RX_SIDETONE_IIR0_IIR_COEF_B1_CTL + 16 * iir_idx;
2742+
int reg = CDC_RX_SIDETONE_IIR0_IIR_COEF_B1_CTL + 0x80 * iir_idx;
27432743

27442744
memcpy(&coeff[0], ucontrol->value.bytes.data, params->max);
27452745

0 commit comments

Comments
 (0)