]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ALSA: usb-audio: export snd_usb_feature_unit_ctl
authorDaniel Mack <zonque@gmail.com>
Wed, 25 May 2011 07:09:01 +0000 (09:09 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 25 May 2011 07:36:20 +0000 (09:36 +0200)
In order to allow quirks functions to hook up to the standard feature
unit op tables, this patch exports a pointer to the struct that is used
internally.

That way, all the code handling the control can be kept private, and
external code can reference the symbol to re-use it.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/card.c
sound/usb/mixer.c
sound/usb/mixer.h
sound/usb/quirks.c

index 84a5ce70a2b0fda6ee2cca45b23475e34f00bb6d..220c6167dd86d5ed2164db0c73b97afac1ba6ec5 100644 (file)
@@ -48,6 +48,7 @@
 #include <linux/usb/audio.h>
 #include <linux/usb/audio-v2.h>
 
+#include <sound/control.h>
 #include <sound/core.h>
 #include <sound/info.h>
 #include <sound/pcm.h>
index ba19bfdfdc9e9e09d8243cced170fd7d8155b8a4..c22fa76e363ae5699e9885cc548fdc28d25607b3 100644 (file)
@@ -86,16 +86,6 @@ struct mixer_build {
        const struct usbmix_selector_map *selector_map;
 };
 
-enum {
-       USB_MIXER_BOOLEAN,
-       USB_MIXER_INV_BOOLEAN,
-       USB_MIXER_S8,
-       USB_MIXER_U8,
-       USB_MIXER_S16,
-       USB_MIXER_U16,
-};
-
-
 /*E-mu 0202/0404/0204 eXtension Unit(XU) control*/
 enum {
        USB_XU_CLOCK_RATE               = 0xe301,
@@ -985,6 +975,9 @@ static struct snd_kcontrol_new usb_feature_unit_ctl_ro = {
        .put = NULL,
 };
 
+/* This symbol is exported in order to allow the mixer quirks to
+ * hook up to the standard feature unit control mechanism */
+struct snd_kcontrol_new *snd_usb_feature_unit_ctl = &usb_feature_unit_ctl;
 
 /*
  * build a feature control
index 459551ac53ae3b132c239b5df0fe6b72a3916732..ae1a14dcfe82cf51753da7265bcdaf6ce95969f4 100644 (file)
@@ -24,7 +24,16 @@ struct usb_mixer_interface {
        u8 xonar_u1_status;
 };
 
-#define MAX_CHANNELS   10      /* max logical channels */
+#define MAX_CHANNELS   16      /* max logical channels */
+
+enum {
+       USB_MIXER_BOOLEAN,
+       USB_MIXER_INV_BOOLEAN,
+       USB_MIXER_S8,
+       USB_MIXER_U8,
+       USB_MIXER_S16,
+       USB_MIXER_U16,
+};
 
 struct usb_mixer_elem_info {
        struct usb_mixer_interface *mixer;
index bd13d7257240528f97cc2a0caf5b134a0b9d58ac..2546dc808e43b0e4ca682b46b96145c1c7952c84 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/usb.h>
 #include <linux/usb/audio.h>
 
+#include <sound/control.h>
 #include <sound/core.h>
 #include <sound/info.h>
 #include <sound/pcm.h>