diff mbox

[1/3] ASoC: Add SND_SOC_BYTES_EXT control type

Message ID 1402058000-5357-1-git-send-email-ckeepax@opensource.wolfsonmicro.com (mailing list archive)
State New, archived
Headers show

Commit Message

Charles Keepax June 6, 2014, 12:33 p.m. UTC
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 include/sound/soc.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

Comments

Lars-Peter Clausen June 6, 2014, 12:48 p.m. UTC | #1
On 06/06/2014 02:33 PM, Charles Keepax wrote:
> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

Vinod did beat you on this one:

http://mailman.alsa-project.org/pipermail/alsa-devel/2014-May/076155.html

Although that version of the macro looks slightly different.

> ---
>   include/sound/soc.h |    7 +++++++
>   1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/include/sound/soc.h b/include/sound/soc.h
> index ed9e2d7..92c1b99 100644
> --- a/include/sound/soc.h
> +++ b/include/sound/soc.h
> @@ -256,6 +256,13 @@
>   		((unsigned long)&(struct soc_bytes)           \
>   		{.base = xbase, .num_regs = xregs }) }
>
> +#define SND_SOC_BYTES_EXT(xname, xbase, xregs, xhandler_get, xhandler_put) \
> +{	.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname,		   \
> +	.info = snd_soc_bytes_info, .get = xhandler_get,		   \
> +	.put = xhandler_put, .private_value =				   \
> +		((unsigned long)&(struct soc_bytes)			   \
> +		{.base = xbase, .num_regs = xregs }) }
> +
>   #define SND_SOC_BYTES_MASK(xname, xbase, xregs, xmask)	      \
>   {	.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname,   \
>   	.info = snd_soc_bytes_info, .get = snd_soc_bytes_get, \
>
Charles Keepax June 6, 2014, 12:53 p.m. UTC | #2
On Fri, Jun 06, 2014 at 02:48:28PM +0200, Lars-Peter Clausen wrote:
> On 06/06/2014 02:33 PM, Charles Keepax wrote:
>> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
>
> Vinod did beat you on this one:
>
> http://mailman.alsa-project.org/pipermail/alsa-devel/2014-May/076155.html
>
> Although that version of the macro looks slightly different.

Ooops.. not sure how I missed that, will rebase my stuff on top
of that.

Thanks,
Charles
diff mbox

Patch

diff --git a/include/sound/soc.h b/include/sound/soc.h
index ed9e2d7..92c1b99 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -256,6 +256,13 @@ 
 		((unsigned long)&(struct soc_bytes)           \
 		{.base = xbase, .num_regs = xregs }) }
 
+#define SND_SOC_BYTES_EXT(xname, xbase, xregs, xhandler_get, xhandler_put) \
+{	.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname,		   \
+	.info = snd_soc_bytes_info, .get = xhandler_get,		   \
+	.put = xhandler_put, .private_value =				   \
+		((unsigned long)&(struct soc_bytes)			   \
+		{.base = xbase, .num_regs = xregs }) }
+
 #define SND_SOC_BYTES_MASK(xname, xbase, xregs, xmask)	      \
 {	.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname,   \
 	.info = snd_soc_bytes_info, .get = snd_soc_bytes_get, \