[PATCH] ASoC: fsl_micfil: Correct the number of steps on SX controls

Shengjiu Wang shengjiu.wang at gmail.com
Thu Jan 5 20:49:37 AEDT 2023


On Wed, Jan 4, 2023 at 10:58 AM Chancel Liu <chancel.liu at nxp.com> wrote:

> The parameter "max" of SOC_SINGLE_SX_TLV() means the number of steps
> rather than maximum value. This patch corrects the minimum value to -8
> and the number of steps to 15.
>
> Signed-off-by: Chancel Liu <chancel.liu at nxp.com>
>

Acked-by: Shengjiu Wang <shengjiu.wang at gmail.com>

Best regards
Wang Shengjiu

> ---
>  sound/soc/fsl/fsl_micfil.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
> index d7e6fc996166..d4d3bc7ca87c 100644
> --- a/sound/soc/fsl/fsl_micfil.c
> +++ b/sound/soc/fsl/fsl_micfil.c
> @@ -325,21 +325,21 @@ static int hwvad_detected(struct snd_kcontrol
> *kcontrol,
>
>  static const struct snd_kcontrol_new fsl_micfil_snd_controls[] = {
>         SOC_SINGLE_SX_TLV("CH0 Volume", REG_MICFIL_OUT_CTRL,
> -                         MICFIL_OUTGAIN_CHX_SHIFT(0), 0xF, 0x7, gain_tlv),
> +                         MICFIL_OUTGAIN_CHX_SHIFT(0), 0x8, 0xF, gain_tlv),
>         SOC_SINGLE_SX_TLV("CH1 Volume", REG_MICFIL_OUT_CTRL,
> -                         MICFIL_OUTGAIN_CHX_SHIFT(1), 0xF, 0x7, gain_tlv),
> +                         MICFIL_OUTGAIN_CHX_SHIFT(1), 0x8, 0xF, gain_tlv),
>         SOC_SINGLE_SX_TLV("CH2 Volume", REG_MICFIL_OUT_CTRL,
> -                         MICFIL_OUTGAIN_CHX_SHIFT(2), 0xF, 0x7, gain_tlv),
> +                         MICFIL_OUTGAIN_CHX_SHIFT(2), 0x8, 0xF, gain_tlv),
>         SOC_SINGLE_SX_TLV("CH3 Volume", REG_MICFIL_OUT_CTRL,
> -                         MICFIL_OUTGAIN_CHX_SHIFT(3), 0xF, 0x7, gain_tlv),
> +                         MICFIL_OUTGAIN_CHX_SHIFT(3), 0x8, 0xF, gain_tlv),
>         SOC_SINGLE_SX_TLV("CH4 Volume", REG_MICFIL_OUT_CTRL,
> -                         MICFIL_OUTGAIN_CHX_SHIFT(4), 0xF, 0x7, gain_tlv),
> +                         MICFIL_OUTGAIN_CHX_SHIFT(4), 0x8, 0xF, gain_tlv),
>         SOC_SINGLE_SX_TLV("CH5 Volume", REG_MICFIL_OUT_CTRL,
> -                         MICFIL_OUTGAIN_CHX_SHIFT(5), 0xF, 0x7, gain_tlv),
> +                         MICFIL_OUTGAIN_CHX_SHIFT(5), 0x8, 0xF, gain_tlv),
>         SOC_SINGLE_SX_TLV("CH6 Volume", REG_MICFIL_OUT_CTRL,
> -                         MICFIL_OUTGAIN_CHX_SHIFT(6), 0xF, 0x7, gain_tlv),
> +                         MICFIL_OUTGAIN_CHX_SHIFT(6), 0x8, 0xF, gain_tlv),
>         SOC_SINGLE_SX_TLV("CH7 Volume", REG_MICFIL_OUT_CTRL,
> -                         MICFIL_OUTGAIN_CHX_SHIFT(7), 0xF, 0x7, gain_tlv),
> +                         MICFIL_OUTGAIN_CHX_SHIFT(7), 0x8, 0xF, gain_tlv),
>         SOC_ENUM_EXT("MICFIL Quality Select",
>                      fsl_micfil_quality_enum,
>                      micfil_quality_get, micfil_quality_set),
> --
> 2.25.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20230105/02041ff9/attachment.htm>


More information about the Linuxppc-dev mailing list