[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPVz0n1kkXQDNhzFoa8xwqaFErNDTHSaqM07TDUHRPSnH+PvkQ@mail.gmail.com>
Date: Wed, 22 Feb 2023 10:00:58 +0200
From: Svyatoslav Ryhel <clamor95@...il.com>
To: Mark Brown <broonie@...nel.org>
Cc: Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Liam Girdwood <lgirdwood@...il.com>,
Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Maxim Schwalm <maxim.schwalm@...il.com>,
Dmitry Osipenko <digetx@...il.com>, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, alsa-devel@...a-project.org,
linux-tegra@...r.kernel.org, linux-staging@...ts.linux.dev
Subject: Re: [PATCH v1 04/10] ASoC: tegra: Support RT5631 by machine driver
ср, 22 лют. 2023 р. о 00:23 Mark Brown <broonie@...nel.org> пише:
>
> On Tue, Feb 21, 2023 at 08:32:05PM +0200, Svyatoslav Ryhel wrote:
>
> > Add Realtek ALC5631/RT5631 codec support to the Tegra ASoC machine driver.
> > The RT5631 codec is found on devices like ASUS Transformer TF201, TF700T
> > and other Tegra-based Android tablets.
> >
> > Signed-off-by: Svyatoslav Ryhel <clamor95@...il.com>
> > Signed-off-by: Ion Agorria <ion@...rria.com>
>
> Your signoff should be last if you're the one sending this.
Thanks
> > +static unsigned int tegra_machine_mclk_rate_6mhz(unsigned int srate)
> > +{
> > + unsigned int mclk;
> > +
> > + switch (srate) {
> > + case 64000:
> > + case 88200:
> > + case 96000:
> > + mclk = 128 * srate;
> > + break;
> > + default:
> > + mclk = 256 * srate;
> > + break;
> > + }
> > + /* FIXME: Codec only requires >= 3MHz if OSR==0 */
> > + while (mclk < 6000000)
> > + mclk *= 2;
>
> It feels like this is complicated enough and looks like the
> clocking is flexible enough that it might be easier to just have
> a table of values or otherwise enumerate standard rates, seeing
> the code I feel like I need to worry about what happens if we
> pick a clock rate over 6MHz (the loop could give a value over
> that), and it's not clear why we have the switch statement rather
> than just starting at a multiple of 128 and looping an extra time.
>
> I suspect there's going to be no meaningful downside for having
> the clock held at over 3MHz on a tablet form factor, the usual
> issue would be power consumption but between the larger battery
> size you tend to have on a tablet and the power draw of the
> screen if that's on it's likely to be into the noise practially
> speaking.
This is how downstream handled mclk rate for RT5631.
Powered by blists - more mailing lists