[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <85fe1be4-7b67-da99-06a5-28089f662a1d@nvidia.com>
Date: Thu, 1 Oct 2020 20:44:44 +0100
From: Jon Hunter <jonathanh@...dia.com>
To: Michał Mirosław <mirq-linux@...e.qmqm.pl>,
"Sameer Pujar" <spujar@...dia.com>
CC: <broonie@...nel.org>, <lgirdwood@...il.com>, <robh+dt@...nel.org>,
<kuninori.morimoto.gx@...esas.com>,
<pierre-louis.bossart@...ux.intel.com>, <perex@...ex.cz>,
<tiwai@...e.com>, <thierry.reding@...il.com>,
<alsa-devel@...a-project.org>, <devicetree@...r.kernel.org>,
<linux-tegra@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<sharadg@...dia.com>, <mkumard@...dia.com>,
<viswanathl@...dia.com>, <rlokhande@...dia.com>,
<dramesh@...dia.com>, <atalambedu@...dia.com>,
<nwartikar@...dia.com>, <swarren@...dia.com>,
<nicoleotsuka@...il.com>
Subject: Re: [PATCH v3 10/13] ASoC: tegra: Add audio graph based card driver
On 01/10/2020 20:07, Michał Mirosław wrote:
> On Thu, Oct 01, 2020 at 11:03:04PM +0530, Sameer Pujar wrote:
>> Add Tegra audio machine driver which is based on generic audio graph card
>> driver. It re-uses most of the common stuff from audio graph driver and
>> uses the same DT binding. Required Tegra specific customizations are done
>> in the driver.
> [...]
>> + switch (srate) {
>> + case 11025:
>> + case 22050:
>> + case 44100:
>> + case 88200:
>> + case 176400:
>> + plla_out0_rate = chip_data->plla_out0_rates[x11_RATE];
>> + plla_rate = chip_data->plla_rates[x11_RATE];
>> + break;
>> + case 8000:
>> + case 16000:
>> + case 32000:
>> + case 48000:
>> + case 96000:
>> + case 192000:
> [...]
>
> Do you really need to enumerate the frequencies? Wouldn't just checking
> srate % 11025 be enough to divide the set in two? Or just calculating
> the PLLA base rate by multiplying?
This is quite common among other ASoC drivers from what I can see. The
PLL rate does not scale with the srate, we just use a different PLL rate
depending on if the srate is 11025 Hz or 8000 Hz based. I don't see any
need to change the above.
Cheers
Jon
--
nvpublic
Powered by blists - more mailing lists