aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2011-05-25 03:09:01 -0400
committerTakashi Iwai <tiwai@suse.de>2011-05-25 03:36:20 -0400
commit9e38658f703732cb69936553cef4bdb4e5294f3f (patch)
tree8db752c56b8c5677c5ea215bf6b249f17844e4e6 /sound/usb
parentef9d59708949b2012b1b723a1eaec82981c40013 (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.c1
-rw-r--r--sound/usb/mixer.c13
-rw-r--r--sound/usb/mixer.h11
-rw-r--r--sound/usb/quirks.c1
4 files changed, 15 insertions, 11 deletions
diff --git a/sound/usb/card.c b/sound/usb/card.c
index 84a5ce70a2b0..220c6167dd86 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -48,6 +48,7 @@
48#include <linux/usb/audio.h> 48#include <linux/usb/audio.h>
49#include <linux/usb/audio-v2.h> 49#include <linux/usb/audio-v2.h>
50 50
51#include <sound/control.h>
51#include <sound/core.h> 52#include <sound/core.h>
52#include <sound/info.h> 53#include <sound/info.h>
53#include <sound/pcm.h> 54#include <sound/pcm.h>
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index ba19bfdfdc9e..c22fa76e363a 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -86,16 +86,6 @@ struct mixer_build {
86 const struct usbmix_selector_map *selector_map; 86 const struct usbmix_selector_map *selector_map;
87}; 87};
88 88
89enum {
90 USB_MIXER_BOOLEAN,
91 USB_MIXER_INV_BOOLEAN,
92 USB_MIXER_S8,
93 USB_MIXER_U8,
94 USB_MIXER_S16,
95 USB_MIXER_U16,
96};
97
98
99/*E-mu 0202/0404/0204 eXtension Unit(XU) control*/ 89/*E-mu 0202/0404/0204 eXtension Unit(XU) control*/
100enum { 90enum {
101 USB_XU_CLOCK_RATE = 0xe301, 91 USB_XU_CLOCK_RATE = 0xe301,
@@ -985,6 +975,9 @@ static struct snd_kcontrol_new usb_feature_unit_ctl_ro = {
985 .put = NULL, 975 .put = NULL,
986}; 976};
987 977
978/* This symbol is exported in order to allow the mixer quirks to
979 * hook up to the standard feature unit control mechanism */
980struct snd_kcontrol_new *snd_usb_feature_unit_ctl = &usb_feature_unit_ctl;
988 981
989/* 982/*
990 * build a feature control 983 * build a feature control
diff --git a/sound/usb/mixer.h b/sound/usb/mixer.h
index 459551ac53ae..ae1a14dcfe82 100644
--- a/sound/usb/mixer.h
+++ b/sound/usb/mixer.h
@@ -24,7 +24,16 @@ struct usb_mixer_interface {
24 u8 xonar_u1_status; 24 u8 xonar_u1_status;
25}; 25};
26 26
27#define MAX_CHANNELS 10 /* max logical channels */ 27#define MAX_CHANNELS 16 /* max logical channels */
28
29enum {
30 USB_MIXER_BOOLEAN,
31 USB_MIXER_INV_BOOLEAN,
32 USB_MIXER_S8,
33 USB_MIXER_U8,
34 USB_MIXER_S16,
35 USB_MIXER_U16,
36};
28 37
29struct usb_mixer_elem_info { 38struct usb_mixer_elem_info {
30 struct usb_mixer_interface *mixer; 39 struct usb_mixer_interface *mixer;
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index bd13d7257240..2546dc808e43 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -19,6 +19,7 @@
19#include <linux/usb.h> 19#include <linux/usb.h>
20#include <linux/usb/audio.h> 20#include <linux/usb/audio.h>
21 21
22#include <sound/control.h>
22#include <sound/core.h> 23#include <sound/core.h>
23#include <sound/info.h> 24#include <sound/info.h>
24#include <sound/pcm.h> 25#include <sound/pcm.h>