lkml.org 
[lkml]   [2023]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/6] ASoC: amd: yc: Add a module parameter to influence pdm_gain
On Fri, Jan 27, 2023 at 05:41:44PM +0100, Jaroslav Kysela wrote:
> On 27. 01. 23 17:25, Limonciello, Mario wrote:

> > > > pdm_ctrl = acp6x_readl(acp_base + ACP_WOV_MISC_CTRL);
> > > > - pdm_ctrl |= ACP_WOV_MISC_CTRL_MASK;
> > > > + pdm_ctrl |= FIELD_PREP(ACP_WOV_GAIN_CONTROL, pdm_gain);

> > > The bits should be zeroed (AND - &) before OR to make sure that the correct
> > > value is written to the register. More related patches are affected.

> > I had consider this, but the hardware default at reset is 0x0. Do you think it's
> > still necessary for posterity?

> You're using 0644 permissions for the module parameter, so the value can be
> changed by root using sysfs anytime (between SNDRV_PCM_TRIGGER calls).

Plus even if the value were never changed it just saves anyone
having to wonder if this has been taken care of, and means that
if there's any future hardware using this driver that uses a
different default (or a stale value in the hardware somehow) then
things will just work.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-03-26 23:58    [W:0.031 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site