From: Mark Hills <mark@xwax.org>
To: alsa-devel@alsa-project.org
Subject: [PATCH RFC 4/4] snd-usb-audio: Prototype capture support for Novation Twitch
Date: Sun, 3 Mar 2013 17:57:37 +0000 [thread overview]
Message-ID: <1362333457-23895-4-git-send-email-mark@xwax.org> (raw)
In-Reply-To: <1362333457-23895-1-git-send-email-mark@xwax.org>
*** This patch is incomplete, as the device re-initialises
*** if playback and capture is attempted at the same time.
The capture endpoint shares the same interface as the playback
endpoint, and it seems that this is the first quirk to do this.
We must override the maxpacksize (which is not done in the
playback interface) because create_fixed_stream_quirk() takes the
wMaxPacketSize from the first endpoint by default.
---
sound/usb/quirks-table.h | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
index 3614e9b..c62f2a3 100644
--- a/sound/usb/quirks-table.h
+++ b/sound/usb/quirks-table.h
@@ -2707,6 +2707,29 @@ YAMAHA_DEVICE(0x7010, "UB99"),
}
},
{
+ .ifnum = 0,
+ .type = QUIRK_AUDIO_FIXED_ENDPOINT,
+ .data = & (const struct audioformat) {
+ .formats = SNDRV_PCM_FMTBIT_S24_3LE,
+ .channels = 2,
+ .iface = 0,
+ .altsetting = 1,
+ .altset_idx = 1,
+ .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
+ .endpoint = 0x82,
+ .ep_attr = USB_ENDPOINT_XFER_ISOC,
+ .maxpacksize = 0x126,
+ .rates = SNDRV_PCM_RATE_44100 |
+ SNDRV_PCM_RATE_48000,
+ .rate_min = 44100,
+ .rate_max = 48000,
+ .nr_rates = 2,
+ .rate_table = (unsigned int[]) {
+ 44100, 48000
+ }
+ }
+ },
+ {
.ifnum = 1,
.type = QUIRK_MIDI_RAW_BYTES
},
--
1.7.12.1
prev parent reply other threads:[~2013-03-03 17:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-03 17:53 usb: Endpoints sharing the same interface Mark Hills
2013-03-03 17:57 ` [PATCH RFC 1/4] snd-usb-audio: Playback and MIDI support for Novation Twitch DJ controller Mark Hills
2013-03-03 17:57 ` [PATCH RFC 2/4] usb: Allow us to distinguish between different returns of EMSGSIZE Mark Hills
2013-03-03 17:57 ` [PATCH RFC 3/4] snd-usb-audio: Trust fields given in the quirk Mark Hills
2013-03-03 17:57 ` Mark Hills [this message]
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=1362333457-23895-4-git-send-email-mark@xwax.org \
--to=mark@xwax.org \
--cc=alsa-devel@alsa-project.org \
/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).