ASoC: arizona: add defines for single-input gain control
authorRichard Fitzgerald <rf@opensource.wolfsonmicro.com>
Mon, 28 Sep 2015 13:01:08 +0000 (14:01 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 2 Oct 2015 16:51:33 +0000 (17:51 +0100)
Adds convenience defines for declaring a gain control that
has an input mux. These blocks are functionally equivalent to
the existing mixer blocks but can only have a single input
active at once.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/arizona.h

index 7b68d05a0939049efec30f58aafb5aa673df20f3..b73920ab86503dafa54e2b4bdf39b77bc0e97d92 100644 (file)
@@ -99,6 +99,11 @@ extern const unsigned int arizona_mixer_tlv[];
 extern const char *arizona_mixer_texts[ARIZONA_NUM_MIXER_INPUTS];
 extern int arizona_mixer_values[ARIZONA_NUM_MIXER_INPUTS];
 
+#define ARIZONA_GAINMUX_CONTROLS(name, base) \
+       SOC_SINGLE_RANGE_TLV(name " Input Volume", base + 1,            \
+                            ARIZONA_MIXER_VOL_SHIFT, 0x20, 0x50, 0,    \
+                            arizona_mixer_tlv)
+
 #define ARIZONA_MIXER_CONTROLS(name, base) \
        SOC_SINGLE_RANGE_TLV(name " Input 1 Volume", base + 1,          \
                             ARIZONA_MIXER_VOL_SHIFT, 0x20, 0x50, 0,    \