public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Mark Brown <broonie@kernel.org>
Cc: <lgirdwood@gmail.com>, <peda@axentia.se>,
	<andrei.simion@microchip.com>, <nuno.sa@analog.com>,
	<paul@crapouillou.net>, <oder_chiou@realtek.com>,
	<kiseok.jo@irondevice.com>, <shenghao-ding@ti.com>,
	<kevin-lu@ti.com>, <baojun.xu@ti.com>,
	<srinivas.kandagatla@linaro.org>, <linux-sound@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <patches@opensource.cirrus.com>
Subject: Re: [PATCH v2 13/13] ASoC: Tidy up SOC_DOUBLE_* and SOC_SINGLE_* helpers
Date: Tue, 4 Mar 2025 09:19:47 +0000	[thread overview]
Message-ID: <Z8bFs5xPjVzbLJoa@opensource.cirrus.com> (raw)
In-Reply-To: <4db99187-63f9-41cc-966b-0c77ba86e390@sirena.org.uk>

On Mon, Mar 03, 2025 at 06:53:08PM +0000, Mark Brown wrote:
> On Mon, Mar 03, 2025 at 05:14:24PM +0000, Charles Keepax wrote:
> > Re-implement SOC_DOUBLE_VALUE() in terms of SOC_DOUBLE_S_VALUE().
> > SOC_DOUBLE_S_VALUE() already had a minimum value so add this to
> > SOC_DOUBLE_VALUE as well, this allows replacement of several hard coded
> > value entries. Likewise update SOC_SINGLE_VALUE to match, which allows
> > replacement of even more hard coded values.
> 
> This breaks an arm64 defconfig build:
> 
> In file included from /build/stage/linux/sound/soc/codecs/rk3308_codec.c:24:
> /build/stage/linux/include/sound/soc.h:150:49: error: ‘shift_left’ undeclared here (not in a function)
>   150 |         .private_value = SOC_DOUBLE_VALUE(xreg, shift_left, shift_right, \
>       |                                                 ^~~~~~~~~~
> /build/stage/linux/include/sound/soc.h:45:46: note: in definition of macro ‘SOC_DOUBLE_S_VALUE’
>    45 |         {.reg = xreg, .rreg = xreg, .shift = shift_left, \
>       |                                              ^~~~~~~~~~
> /build/stage/linux/include/sound/soc.h:150:26: note: in expansion of macro ‘SOC_DOUBLE_VALUE’
>   150 |         .private_value = SOC_DOUBLE_VALUE(xreg, shift_left, shift_right, \
>       |                          ^~~~~~~~~~~~~~~~
> /build/stage/linux/sound/soc/codecs/rk3308_codec.c:171:9: note: in expansion of macro ‘SOC_DOUBLE_RANGE_TLV’
>   171 |         SOC_DOUBLE_RANGE_TLV("DAC HPMIX Playback Volume",
>       |         ^~~~~~~~~~~~~~~~~~~~
> /build/stage/linux/include/sound/soc.h:150:61: error: ‘shift_right’ undeclared here (not in a function)
>   150 |         .private_value = SOC_DOUBLE_VALUE(xreg, shift_left, shift_right, \
>       |                                                             ^~~~~~~~~~~
> /build/stage/linux/include/sound/soc.h:46:19: note: in definition of macro ‘SOC_DOUBLE_S_VALUE’
>    46 |         .rshift = shift_right, .min = xmin, .max = xmax, \
>       |                   ^~~~~~~~~~~
> /build/stage/linux/include/sound/soc.h:150:26: note: in expansion of macro ‘SOC_DOUBLE_VALUE’
>   150 |         .private_value = SOC_DOUBLE_VALUE(xreg, shift_left, shift_right, \
>       |                          ^~~~~~~~~~~~~~~~
> /build/stage/linux/sound/soc/codecs/rk3308_codec.c:171:9: note: in expansion of macro ‘SOC_DOUBLE_RANGE_TLV’
>   171 |         SOC_DOUBLE_RANGE_TLV("DAC HPMIX Playback Volume",
>       |         ^~~~~~~~~~~~~~~~~~~~
> 

Apologies I will check that out and resend.

Thanks,
Charles

  reply	other threads:[~2025-03-04  9:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-03 17:14 [PATCH v2 00/13] Tidy up ASoC VALUE control macros Charles Keepax
2025-03-03 17:14 ` [PATCH v2 01/13] ASoC: Remove unused helper macro Charles Keepax
2025-03-03 17:14 ` [PATCH v2 02/13] ASoC: rt715: Remove duplicate SOC_DOUBLE_R_EXT() " Charles Keepax
2025-03-03 17:14 ` [PATCH v2 03/13] ASoC: sma1307: Use SOC_SINGLE_EXT() " Charles Keepax
2025-03-03 17:14 ` [PATCH v2 04/13] ASoC: tas2562: Use SOC_SINGLE_EXT_TLV() " Charles Keepax
2025-03-03 17:14 ` [PATCH v2 05/13] ASoC: wcd938x: " Charles Keepax
2025-03-03 17:14 ` [PATCH v2 06/13] ASoC: wm9712: Use SOC_SINGLE_EXT() " Charles Keepax
2025-03-03 17:14 ` [PATCH v2 07/13] ASoC: wm9713: Use SOC_DOUBLE_EXT() " Charles Keepax
2025-03-03 17:14 ` [PATCH v2 08/13] ASoC: wsa881x: Use SOC_SINGLE_EXT_TLV() " Charles Keepax
2025-03-03 17:14 ` [PATCH v2 09/13] ASoC: atmel: tse850-pcm5142: Use SOC_SINGLE_EXT() " Charles Keepax
2025-03-03 17:14 ` [PATCH v2 10/13] ASoC: dapm: Add missing SOC_DAPM_DOUBLE_R_TLV() helper Charles Keepax
2025-03-03 17:14 ` [PATCH v2 11/13] ASoC: dapm: Use ASoC control macros where possible Charles Keepax
2025-03-03 17:14 ` [PATCH v2 12/13] ASoC: Tidy up SOC_DOUBLE_R_* helpers Charles Keepax
2025-03-03 17:14 ` [PATCH v2 13/13] ASoC: Tidy up SOC_DOUBLE_* and SOC_SINGLE_* helpers Charles Keepax
2025-03-03 18:53   ` Mark Brown
2025-03-04  9:19     ` Charles Keepax [this message]
2025-03-04 16:53 ` [PATCH v2 00/13] Tidy up ASoC VALUE control macros Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z8bFs5xPjVzbLJoa@opensource.cirrus.com \
    --to=ckeepax@opensource.cirrus.com \
    --cc=andrei.simion@microchip.com \
    --cc=baojun.xu@ti.com \
    --cc=broonie@kernel.org \
    --cc=kevin-lu@ti.com \
    --cc=kiseok.jo@irondevice.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=oder_chiou@realtek.com \
    --cc=patches@opensource.cirrus.com \
    --cc=paul@crapouillou.net \
    --cc=peda@axentia.se \
    --cc=shenghao-ding@ti.com \
    --cc=srinivas.kandagatla@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox