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 4/5] ALSA: usb-audio: add new quirk type QUIRK_AUDIO_STANDARD_MIXER
Date: Wed, 25 May 2011 09:09:02 +0200 [thread overview]
Message-ID: <1306307343-3247-5-git-send-email-zonque@gmail.com> (raw)
In-Reply-To: <1306307343-3247-1-git-send-email-zonque@gmail.com>
This quirk type will let the driver assume that there is a standard
mixer on a given interface, or that a specific mixer quirks will handle
the device.
Signed-off-by: Daniel Mack <zonque@gmail.com>
---
sound/usb/quirks.c | 17 ++++++++++++++++-
sound/usb/usbaudio.h | 1 +
2 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index 2546dc8..2e969cb 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -264,6 +264,20 @@ static int create_uaxx_quirk(struct snd_usb_audio *chip,
}
/*
+ * Create a standard mixer for the specified interface.
+ */
+static int create_standard_mixer_quirk(struct snd_usb_audio *chip,
+ struct usb_interface *iface,
+ struct usb_driver *driver,
+ const struct snd_usb_audio_quirk *quirk)
+{
+ if (quirk->ifnum < 0)
+ return 0;
+
+ return snd_usb_create_mixer(chip, quirk->ifnum, 0);
+}
+
+/*
* audio-interface quirks
*
* returns zero if no standard audio/MIDI parsing is needed.
@@ -295,7 +309,8 @@ int snd_usb_create_quirk(struct snd_usb_audio *chip,
[QUIRK_AUDIO_STANDARD_INTERFACE] = create_standard_audio_quirk,
[QUIRK_AUDIO_FIXED_ENDPOINT] = create_fixed_stream_quirk,
[QUIRK_AUDIO_EDIROL_UAXX] = create_uaxx_quirk,
- [QUIRK_AUDIO_ALIGN_TRANSFER] = create_align_transfer_quirk
+ [QUIRK_AUDIO_ALIGN_TRANSFER] = create_align_transfer_quirk,
+ [QUIRK_AUDIO_STANDARD_MIXER] = create_standard_mixer_quirk,
};
if (quirk->type < QUIRK_TYPE_COUNT) {
diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h
index 32f2a97..1e79986 100644
--- a/sound/usb/usbaudio.h
+++ b/sound/usb/usbaudio.h
@@ -84,6 +84,7 @@ enum quirk_type {
QUIRK_AUDIO_FIXED_ENDPOINT,
QUIRK_AUDIO_EDIROL_UAXX,
QUIRK_AUDIO_ALIGN_TRANSFER,
+ QUIRK_AUDIO_STANDARD_MIXER,
QUIRK_TYPE_COUNT
};
--
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 ` [PATCH 3/5] ALSA: usb-audio: export snd_usb_feature_unit_ctl Daniel Mack
2011-05-25 7:09 ` Daniel Mack [this message]
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-5-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.