[alsa-devel] [PATCH v3 2/4] ALSA: usb-audio: Add usb_mixer_elem_enum_info

Chris J Arges chris.j.arges at canonical.com
Wed Oct 29 21:56:01 CET 2014


Add structure to hold enumeration control information and in addition add it
to the usb_mixer_elem_info structure. This allows this structure to be more
easily reused.

Signed-off-by: Chris J Arges <chris.j.arges at canonical.com>
---
 sound/usb/mixer.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sound/usb/mixer.h b/sound/usb/mixer.h
index 73b1f64..cf3967a4 100644
--- a/sound/usb/mixer.h
+++ b/sound/usb/mixer.h
@@ -36,10 +36,17 @@ enum {
 	USB_MIXER_U16,
 };
 
+struct usb_mixer_elem_enum_info {
+	int start;
+	int len;
+	const char * const *names;
+};
+
 struct usb_mixer_elem_info {
 	struct usb_mixer_interface *mixer;
 	struct usb_mixer_elem_info *next_id_elem; /* list of controls with same id */
 	struct snd_ctl_elem_id *elem_id;
+	const struct usb_mixer_elem_enum_info *opt; /* enum control info */
 	unsigned int id;
 	unsigned int control;	/* CS or ICN (high byte) */
 	unsigned int cmask; /* channel mask bitmap: 0 = master */
-- 
2.1.0



More information about the Alsa-devel mailing list