On 7/5/26 10:06 PM, David Heidelberg via B4 Relay wrote:
> From: David Heidelberg <[email protected]>
> 
> Program ASP_RX1_SLOT with the first set bit of rx_mask so the
> amplifier listens on the correct TDM slot when configured by
> machine drivers.
> 
> Assisted-by: Claude:claude-4.6-opus
> Signed-off-by: David Heidelberg <[email protected]>
> ---
>  sound/soc/codecs/cs35l36.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/sound/soc/codecs/cs35l36.c b/sound/soc/codecs/cs35l36.c
> index 89645327945f1..944f4cb5763e4 100644
> --- a/sound/soc/codecs/cs35l36.c
> +++ b/sound/soc/codecs/cs35l36.c
> @@ -942,20 +942,36 @@ static const struct cs35l36_pll_config 
> *cs35l36_get_clk_config(
>       for (i = 0; i < ARRAY_SIZE(cs35l36_pll_sysclk); i++) {
>               if (cs35l36_pll_sysclk[i].freq == freq)
>                       return &cs35l36_pll_sysclk[i];
>       }
>  
>       return NULL;
>  }
>  
> +static int cs35l36_set_tdm_slot(struct snd_soc_dai *dai,
> +                                 unsigned int tx_mask, unsigned int rx_mask,
> +                                 int slots, int slot_width)
> +{
> +     struct cs35l36_private *cs35l36 =
> +                     snd_soc_component_get_drvdata(dai->component);
> +
> +     if (rx_mask)
> +             regmap_update_bits(cs35l36->regmap, CS35L36_ASP_RX1_SLOT,
> +                                CS35L36_ASP_RX1_SLOT_MASK,
> +                                ffs(rx_mask) - 1);

if (!rx_mask)
        return 0;

(or does the field need to be cleared?)

return regmap_update_bits

Konrad

Reply via email to