diff options
author | Daniel Mack <zonque@gmail.com> | 2011-05-25 09:09:01 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-05-25 09:36:20 +0200 |
commit | 9e38658f703732cb69936553cef4bdb4e5294f3f (patch) | |
tree | 8db752c56b8c5677c5ea215bf6b249f17844e4e6 /sound/usb | |
parent | ef9d59708949b2012b1b723a1eaec82981c40013 (diff) |
ALSA: usb-audio: export snd_usb_feature_unit_ctl
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>
Diffstat (limited to 'sound/usb')
-rw-r--r-- | sound/usb/card.c | 1 | ||||
-rw-r--r-- | sound/usb/mixer.c | 13 | ||||
-rw-r--r-- | sound/usb/mixer.h | 11 | ||||
-rw-r--r-- | sound/usb/quirks.c | 1 |
4 files changed, 15 insertions, 11 deletions
diff --git a/sound/usb/card.c b/sound/usb/card.c index 84a5ce70a2b..220c6167dd8 100644 --- a/sound/usb/card.c +++ b/sound/usb/card.c @@ -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> diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index ba19bfdfdc9..c22fa76e363 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c @@ -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 diff --git a/sound/usb/mixer.h b/sound/usb/mixer.h index 459551ac53a..ae1a14dcfe8 100644 --- a/sound/usb/mixer.h +++ b/sound/usb/mixer.h @@ -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; diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index bd13d725724..2546dc808e4 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c @@ -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> |