lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 25 Jan 2020 22:19:01 +0800
From:   Tzung-Bi Shih <tzungbi@...gle.com>
To:     Yu-Hsuan Hsu <yuhsuan@...omium.org>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Cheng-Yi Chiang <cychiang@...omium.org>,
        Tzung-Bi Shih <tzungbi@...omium.org>,
        Enric Balletbo i Serra <enric.balletbo@...labora.com>,
        Guenter Roeck <groeck@...omium.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>,
        Benson Leung <bleung@...omium.org>
Subject: Re: [PATCH] ASoC: cros_ec_codec: Support setting bclk ratio

On Sat, Jan 25, 2020 at 12:18 AM Yu-Hsuan Hsu <yuhsuan@...omium.org> wrote:
>
> Support setting bclk ratio from machine drivers.
>
> Signed-off-by: Yu-Hsuan Hsu <yuhsuan@...omium.org>

Please at least cc to <alsa-devel@...a-project.org> for ASoC-related patches.

> @@ -42,6 +42,8 @@ struct cros_ec_codec_priv {
>         uint64_t ap_shm_addr;
>         uint64_t ap_shm_last_alloc;
>
> +       uint32_t i2s_rx_bclk_ratio;
> +

To be consistent, move the variable after the "DMIC" part and add a /*
I2S_RX */ comment.

>         /* DMIC */
>         atomic_t dmic_probed;

>         if (params_rate(params) != 48000)
> @@ -284,15 +287,30 @@ static int i2s_rx_hw_params(struct snd_pcm_substream *substream,
>         if (ret < 0)
>                 return ret;
>
> -       dev_dbg(component->dev, "set bclk to %u\n",
> -               snd_soc_params_to_bclk(params));
> +       /* If the blck ratio is not set, get bclk from hw_params. */

A typo, s/blck/bclk/.  I don't think the comment is very necessary.
The code block is obvious.

> +       if (priv->i2s_rx_bclk_ratio)
> +               bclk = params_rate(params) * priv->i2s_rx_bclk_ratio;
> +       else
> +               bclk = snd_soc_params_to_bclk(params);
> +
> +       dev_dbg(component->dev, "set bclk to %u\n", bclk);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ