From: Daniel Mack <zonque@gmail.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, gdiffey@gmail.com, clemens@ladisch.de,
linuxaudio@showlabor.de, Daniel Mack <zonque@gmail.com>
Subject: [PATCH 3/5] ALSA: usb-audio: export snd_usb_feature_unit_ctl
Date: Wed, 25 May 2011 09:09:01 +0200 [thread overview]
Message-ID: <1306307343-3247-4-git-send-email-zonque@gmail.com> (raw)
In-Reply-To: <1306307343-3247-1-git-send-email-zonque@gmail.com>
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>
---
sound/usb/card.c | 1 +
sound/usb/mixer.c | 13 +++----------
sound/usb/mixer.h | 11 ++++++++++-
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 84a5ce7..220c616 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 ba19bfd..c22fa76 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 459551a..ae1a14d 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 bd13d72..2546dc8 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>
--
1.7.5.1
next prev parent reply other threads:[~2011-05-25 7:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-25 7:08 Patch series for Fast Track Ultra mixer quirks Daniel Mack
2011-05-25 7:08 ` [PATCH 1/5] ALSA: usb-audio: move assignment of chip->ctrl_intf Daniel Mack
2011-05-25 7:09 ` [PATCH 2/5] ALSA: usb-audio: rework add_control_to_empty() Daniel Mack
2011-05-25 7:09 ` Daniel Mack [this message]
2011-05-25 7:09 ` [PATCH 4/5] ALSA: usb-audio: add new quirk type QUIRK_AUDIO_STANDARD_MIXER Daniel Mack
2011-05-25 7:09 ` [PATCH 5/5] ALSA: usb-audio: more control quirks for M-Audio FastTrack devices Daniel Mack
2011-05-25 7:33 ` Patch series for Fast Track Ultra mixer quirks Felix Homann
2011-05-25 7:41 ` Takashi Iwai
2011-05-25 7:46 ` Daniel Mack
2011-05-26 1:08 ` Grant Diffey
2011-05-26 6:17 ` Takashi Iwai
2011-05-26 7:11 ` Felix Homann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1306307343-3247-4-git-send-email-zonque@gmail.com \
--to=zonque@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=clemens@ladisch.de \
--cc=gdiffey@gmail.com \
--cc=linuxaudio@showlabor.de \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).