[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z35bnu/50njj9qFE@opensource.cirrus.com>
Date: Wed, 8 Jan 2025 11:07:52 +0000
From: Charles Keepax <ckeepax@...nsource.cirrus.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@...ux.dev>
CC: <broonie@...nel.org>, <vkoul@...nel.org>, <oder_chiou@...ltek.com>,
<jack.yu@...ltek.com>, <shumingf@...ltek.com>, <lgirdwood@...il.com>,
<peter.ujfalusi@...ux.intel.com>, <yung-chuan.liao@...ux.intel.com>,
<sanyog.r.kale@...el.com>, <linux-sound@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <patches@...nsource.cirrus.com>
Subject: Re: [PATCH v2 5/6] ASoC: rt722-sdca: Add some missing readable
registers
On Tue, Jan 07, 2025 at 02:00:11PM -0600, Pierre-Louis Bossart wrote:
> > + case SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC, RT722_SDCA_ENT_USER_FU05,
> > + RT722_SDCA_CTL_FU_MUTE, CH_L) ...
> > + SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC, RT722_SDCA_ENT_USER_FU05,
> > + RT722_SDCA_CTL_FU_MUTE, CH_R):
> > + case SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC, RT722_SDCA_ENT_XU0D,
> > + RT722_SDCA_CTL_SELECTED_MODE, 0):
>
> nit-pick: maybe we should have a shorter macro when the
> Channel Number is not used? Using zero here means there
> is no channel-specific control, not an explicit intent to
> program ch0 and ignore chN with N>0.
>
Yeah the current macros are a bit hard to parse, I would
probably even suggest a little string pasting too so one
could do something more like:
RT722_SDCA_CTL(CODEC, FU05, FU_MUTE, CH_L)
But this is all clearly a separate improvement. The purpose
here is just to demonstrate using the new regmap features,
not to improve the coding style of the rt722 driver.
Thanks,
Charles
Powered by blists - more mailing lists