Skip to contentSkip to conversation

ASoC: add SOC_VALUE_ENUM_EXT

PATCH Applied Richard Fitzgerald 2 participants 2 messages Jul 7, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: add SOC_VALUE_ENUM_EXT

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.

---
 include/sound/soc.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
include/sound/soc.h +2 -0
index 9a5b4f6..1483920 100644
@@ -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,   \
Signature · 1 line
1.7.2.5
maintainer Applied
#1 lore raw
Quoted 1 line · Richard Fitzgerald

Adds an equivalent of SOC_ENUM_EXT for value enums

Applied, thanks.