Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org,
	Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: [PATCH 02/17] ASoC: add SOC_DOUBLE_EXT macro
Date: Tue, 28 Apr 2009 16:23:27 +0100	[thread overview]
Message-ID: <1240932222-3718-2-git-send-email-broonie@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20090428152256.GB2244@rakim.wolfsonmicro.main>

From: Daniel Mack <daniel@caiaq.de>

Add a macro for double controls with special callback functions.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 include/sound/soc.h |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/include/sound/soc.h b/include/sound/soc.h
index b1f2f88..6ab80bf 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -118,6 +118,14 @@
 	.info = snd_soc_info_volsw, \
 	.get = xhandler_get, .put = xhandler_put, \
 	.private_value = SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert) }
+#define SOC_DOUBLE_EXT(xname, xreg, shift_left, shift_right, xmax, xinvert,\
+	 xhandler_get, xhandler_put) \
+{	.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
+	.info = snd_soc_info_volsw, \
+	.get = xhandler_get, .put = xhandler_put, \
+	.private_value = (unsigned long)&(struct soc_mixer_control) \
+		{.reg = xreg, .shift = shift_left, .rshift = shift_right, \
+		 .max = xmax, .invert = xinvert} }
 #define SOC_SINGLE_EXT_TLV(xname, xreg, xshift, xmax, xinvert,\
 	 xhandler_get, xhandler_put, tlv_array) \
 {	.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
-- 
1.6.2.4

  parent reply	other threads:[~2009-04-28 15:23 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-28 15:22 ASoC updates for 2.6.31 Mark Brown
2009-04-28 15:23 ` [PATCH 01/17] ASoC: Beagle: Add support for 4 channel Mark Brown
2009-04-28 15:23 ` Mark Brown [this message]
2009-04-28 15:23 ` [PATCH 03/17] ASoC: Fix S3C64xx IIS device registration and support both ports Mark Brown
2009-04-28 15:23 ` [PATCH 04/17] ASoC: S3C2412: Failing to get the I2S clock is an error Mark Brown
2009-04-28 15:23 ` [PATCH 05/17] ASoC: Enforce symmetric rates for S3C64xx I2S interface Mark Brown
2009-04-28 15:23 ` [PATCH 06/17] ASoC: Include WM8350 register definitions in CODEC header Mark Brown
2009-04-28 15:23 ` [PATCH 07/17] ASoC: s3c-i2s-v2 diagnostic improvements Mark Brown
2009-04-28 15:23 ` [PATCH 08/17] ASoC: Use our registration function for S3C64xx Mark Brown
2009-04-28 15:23 ` [PATCH 09/17] ASoC WM8940 Driver Mark Brown
2009-04-28 15:23 ` [PATCH 10/17] ASoC: cs4270: fix Master Capture Switch polarity Mark Brown
2009-04-28 15:23 ` [PATCH 11/17] ASoC: cs4270: add Master Playback Switch Mark Brown
2009-04-28 15:23 ` [PATCH 12/17] ASoC: Fix logic in WM8350 master clocking check Mark Brown
2009-04-28 15:23 ` [PATCH 13/17] ASoC: Set the MPC5200 i2s driver to BROKEN status Mark Brown
2009-04-28 15:23 ` [PATCH 14/17] ASoC: Staticise TLV values in WM8940 Mark Brown
2009-04-28 15:23 ` [PATCH 15/17] ASoC: TWL4030: Fix gain control for earpiece amplifier Mark Brown
2009-04-28 15:23 ` [PATCH 16/17] ASoC: Basic split of mpc5200 DMA code out from mpc5200_psc_i2s Mark Brown
2009-04-28 15:46   ` Takashi Iwai
2009-04-28 15:59     ` Jon Smirl
2009-04-28 16:51       ` Takashi Iwai
2009-04-28 16:55         ` Jon Smirl
2009-04-28 17:14           ` Jon Smirl
2009-04-28 19:37             ` Takashi Iwai
2009-04-28 19:53               ` Mark Brown
2009-04-28 19:59                 ` Jon Smirl
2009-04-28 20:16                   ` Jon Smirl
2009-04-28 21:01                   ` Mark Brown
2009-04-28 22:06                   ` Takashi Iwai
2009-04-28 21:59                 ` Takashi Iwai
2009-04-28 19:35           ` Takashi Iwai
2009-04-28 19:37           ` Mark Brown
2009-04-28 19:25     ` Mark Brown
2009-04-28 19:32       ` Jon Smirl
2009-04-28 19:50         ` Mark Brown
2009-04-28 21:52       ` Takashi Iwai
2009-04-28 15:23 ` [PATCH 17/17] ASoC: Rename the PSC functions to DMA 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=1240932222-3718-2-git-send-email-broonie@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /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