[alsa-devel] [PATCH RFC 4/4] snd-usb-audio: Prototype capture support for Novation Twitch
Mark Hills
mark at xwax.org
Sun Mar 3 18:57:37 CET 2013
*** 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
More information about the Alsa-devel
mailing list