Re: [PATCH v3 07/25] ASoC: renesas: rz-ssi: Use only the proper amount of dividers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi Claudiu,

On Wed, Nov 13, 2024 at 2:36 PM Claudiu <claudiu.beznea@xxxxxxxxx> wrote:
> From: Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx>
>
> There is no need to populate the ckdv[] with invalid dividers as that
> part will not be indexed anyway. The ssi->audio_mck/bclk_rate should
> always be >= 0.
>
> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx>

Thanks for your patch!

> --- a/sound/soc/renesas/rz-ssi.c
> +++ b/sound/soc/renesas/rz-ssi.c
> @@ -258,8 +258,7 @@ static void rz_ssi_stream_quit(struct rz_ssi_priv *ssi,
>  static int rz_ssi_clk_setup(struct rz_ssi_priv *ssi, unsigned int rate,
>                             unsigned int channels)
>  {
> -       static s8 ckdv[16] = { 1,  2,  4,  8, 16, 32, 64, 128,
> -                              6, 12, 24, 48, 96, -1, -1, -1 };
> +       static s8 ckdv[] = { 1,  2,  4,  8, 16, 32, 64, 128, 6, 12, 24, 48, 96 };

"u8", as 128 doesn't fit in s8 (why doesn't the compiler complain?).

>         unsigned int channel_bits = 32; /* System Word Length */
>         unsigned long bclk_rate = rate * channels * channel_bits;
>         unsigned int div;

The rest LGTM.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds





[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux