[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87zg2ax6h4.fsf@mutex.one>
Date: Mon, 28 Aug 2023 23:22:15 +0300
From: Marian Postevca <posteuca@...ex.one>
To: Mark Brown <broonie@...nel.org>
Cc: Takashi Iwai <tiwai@...e.com>, Liam Girdwood <lgirdwood@...il.com>,
Jaroslav Kysela <perex@...ex.cz>, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/4] ASoC: es8316: Enable support for MCLK div by 2
Mark Brown <broonie@...nel.org> writes:
>
> In general a MCLK that allows you to configure the dividers in the CODEC
> appropriately for use. So long as it works your change looks fine I
> think modulo.
Sorry, maybe this question is dumb, but I am not familiar with this
expression. What do you mean by "your change looks fine I think modulo"?
>> + do {
>> + /* Validate supported sample rates that are autodetected from MCLK */
>> + for (i = 0; i < NR_SUPPORTED_MCLK_LRCK_RATIOS; i++) {
>> + const unsigned int ratio = supported_mclk_lrck_ratios[i];
>> +
>> + if (clk % ratio != 0)
>> + continue;
>> + if (clk / ratio == params_rate(params))
>> + break;
>> + }
>
> Use ARRAY_SIZE()
>
Do you mean instead of all instances of NR_SUPPORTED_MCLK_LRCK_RATIOS?
If so, it's already defined as:
#define NR_SUPPORTED_MCLK_LRCK_RATIOS ARRAY_SIZE(supported_mclk_lrck_ratios)
If not, then I don't see where else I could use it.
Powered by blists - more mailing lists