* [PATCH] ASoC: add SOC_VALUE_ENUM_EXT
@ 2014-07-07 12:16 Richard Fitzgerald
2014-07-07 14:37 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Richard Fitzgerald @ 2014-07-07 12:16 UTC (permalink / raw)
To: broonie, lgirdwood, perex, tiwai
Cc: alsa-devel, linux-kernel, patches, ckeepax
Adds an equivalent of SOC_ENUM_EXT for value enums
Strictly speaking SOC_ENUM_EXT can also be used to define
a value enum since the only difference is the get and set
functions. But this doesn't look good in code because it is
inconsistent with the normal control definitions. Adding a
specific SOC_VALUE_ENUM_EXT is better for code clarity.
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
---
include/sound/soc.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 9a5b4f6..1483920 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -248,6 +248,8 @@
.info = snd_soc_info_enum_double, \
.get = xhandler_get, .put = xhandler_put, \
.private_value = (unsigned long)&xenum }
+#define SOC_VALUE_ENUM_EXT(xname, xenum, xhandler_get, xhandler_put) \
+ SOC_ENUM_EXT(xname, xenum, xhandler_get, xhandler_put)
#define SND_SOC_BYTES(xname, xbase, xregs) \
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
--
1.7.2.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: add SOC_VALUE_ENUM_EXT
2014-07-07 12:16 [PATCH] ASoC: add SOC_VALUE_ENUM_EXT Richard Fitzgerald
@ 2014-07-07 14:37 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-07-07 14:37 UTC (permalink / raw)
To: Richard Fitzgerald
Cc: lgirdwood, perex, tiwai, alsa-devel, linux-kernel, patches,
ckeepax
[-- Attachment #1: Type: text/plain, Size: 139 bytes --]
On Mon, Jul 07, 2014 at 01:16:54PM +0100, Richard Fitzgerald wrote:
> Adds an equivalent of SOC_ENUM_EXT for value enums
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-07-07 14:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-07 12:16 [PATCH] ASoC: add SOC_VALUE_ENUM_EXT Richard Fitzgerald
2014-07-07 14:37 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox