summaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 1e16d6e..3e9cae0 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -185,6 +185,12 @@
.rreg = xreg_right, .shift = xshift, \
.min = xmin, .max = xmax} }
+#define SND_SOC_BYTES(xname, xbase, xregs) \
+{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
+ .info = snd_soc_bytes_info, .get = snd_soc_bytes_get, \
+ .put = snd_soc_bytes_put, .private_value = \
+ ((unsigned long)&(struct soc_bytes) \
+ {.base = xbase, .num_regs = xregs }) }
/*
* Simplified versions of above macros, declaring a struct and calculating
@@ -413,6 +419,13 @@ int snd_soc_get_volsw_2r_sx(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol);
int snd_soc_put_volsw_2r_sx(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol);
+int snd_soc_bytes_info(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_info *uinfo);
+int snd_soc_bytes_get(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol);
+int snd_soc_bytes_put(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol);
+
/**
* struct snd_soc_reg_access - Describes whether a given register is
@@ -888,6 +901,11 @@ struct soc_mixer_control {
unsigned int reg, rreg, shift, rshift, invert;
};
+struct soc_bytes {
+ int base;
+ int num_regs;
+};
+
/* enumerated kcontrol */
struct soc_enum {
unsigned short reg;
OpenPOWER on IntegriCloud