From 5e212332cc7eed0ffbf91fbe5bab6e2a44b83de6 Mon Sep 17 00:00:00 2001 From: Mark Hills Date: Sun, 17 Mar 2013 11:07:53 +0000 Subject: ALSA: usb-audio: Playback and MIDI support for Novation Twitch DJ controller The hardware also has a PCM capture device which is not implemented in this patch. It may be possible to generalise this to Saffire 6 USB support and some of the other Focusrite interfaces, but as I don't have access to these devices we should wait until capture support is working first. Capture support is not implemented because the code assumes the endpoint to have its own interface (instead, it shares the interface with playback) and some thought will be needed to lift this limitation. Signed-off-by: Mark Hills Signed-off-by: Takashi Iwai --- sound/usb/quirks-table.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'sound/usb/quirks-table.h') diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h index c39f898b15d..a620c239cae 100644 --- a/sound/usb/quirks-table.h +++ b/sound/usb/quirks-table.h @@ -2747,6 +2747,46 @@ YAMAHA_DEVICE(0x7010, "UB99"), .type = QUIRK_MIDI_RAW_BYTES } }, +{ + USB_DEVICE(0x1235, 0x0018), + .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { + .vendor_name = "Novation", + .product_name = "Twitch", + .ifnum = QUIRK_ANY_INTERFACE, + .type = QUIRK_COMPOSITE, + .data = (const struct snd_usb_audio_quirk[]) { + { + .ifnum = 0, + .type = QUIRK_AUDIO_FIXED_ENDPOINT, + .data = & (const struct audioformat) { + .formats = SNDRV_PCM_FMTBIT_S24_3LE, + .channels = 4, + .iface = 0, + .altsetting = 1, + .altset_idx = 1, + .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE, + .endpoint = 0x01, + .ep_attr = USB_ENDPOINT_XFER_ISOC, + .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 + }, + { + .ifnum = -1 + } + } + } +}, { USB_DEVICE_VENDOR_SPEC(0x1235, 0x4661), .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { -- cgit v1.2.3-18-g5258 From 59ea586f54f27fde1202214f1525713356a44918 Mon Sep 17 00:00:00 2001 From: Mark Hills Date: Sun, 17 Mar 2013 11:07:54 +0000 Subject: ALSA: usb-audio: Trust fields given in the quirk The maxpacksize field is given in some quirks, but it gets ignored (in favour of wMaxPacketSize from the first endpoint.) This patch favours the one in the quirk. Digidesign Mbox and Mbox 2 are the only affected quirks and the devices are assumed to be working without this patch. So for safety against the values in the quirk being incorrect, remove them. The datainterval is also ignored but there are not currently any quirks which choose to override this. Cc: Damien Zammit Cc: Chris J Arges Signed-off-by: Mark Hills Signed-off-by: Takashi Iwai --- sound/usb/quirks-table.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'sound/usb/quirks-table.h') diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h index a620c239cae..86e4b8c17da 100644 --- a/sound/usb/quirks-table.h +++ b/sound/usb/quirks-table.h @@ -3036,7 +3036,6 @@ YAMAHA_DEVICE(0x7010, "UB99"), .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE, .endpoint = 0x02, .ep_attr = 0x01, - .maxpacksize = 0x130, .rates = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000, .rate_min = 44100, @@ -3084,7 +3083,6 @@ YAMAHA_DEVICE(0x7010, "UB99"), .attributes = 0x00, .endpoint = 0x03, .ep_attr = USB_ENDPOINT_SYNC_ASYNC, - .maxpacksize = 0x128, .rates = SNDRV_PCM_RATE_48000, .rate_min = 48000, .rate_max = 48000, @@ -3110,7 +3108,6 @@ YAMAHA_DEVICE(0x7010, "UB99"), .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE, .endpoint = 0x85, .ep_attr = USB_ENDPOINT_SYNC_SYNC, - .maxpacksize = 0x128, .rates = SNDRV_PCM_RATE_48000, .rate_min = 48000, .rate_max = 48000, -- cgit v1.2.3-18-g5258 From ae3f0c267f045d875a898819538e0a58125d1737 Mon Sep 17 00:00:00 2001 From: Trulan Martin Date: Wed, 24 Apr 2013 21:19:19 -0400 Subject: ALSA: usb-audio: USB quirk for Yamaha THR10 This patch adds a USB quirk for the Yamaha THR10 amp. Signed-off-by: Trulan Martin Signed-off-by: Takashi Iwai --- sound/usb/quirks-table.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'sound/usb/quirks-table.h') diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h index 86e4b8c17da..0d422aab57d 100644 --- a/sound/usb/quirks-table.h +++ b/sound/usb/quirks-table.h @@ -353,6 +353,32 @@ YAMAHA_DEVICE(0x105d, NULL), } } }, +{ + USB_DEVICE(0x0499, 0x1507), + .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { + /* .vendor_name = "Yamaha", */ + /* .product_name = "THR10", */ + .ifnum = QUIRK_ANY_INTERFACE, + .type = QUIRK_COMPOSITE, + .data = (const struct snd_usb_audio_quirk[]) { + { + .ifnum = 1, + .type = QUIRK_AUDIO_STANDARD_INTERFACE + }, + { + .ifnum = 2, + .type = QUIRK_AUDIO_STANDARD_INTERFACE + }, + { + .ifnum = 3, + .type = QUIRK_MIDI_YAMAHA + }, + { + .ifnum = -1 + } + } + } +}, YAMAHA_DEVICE(0x2000, "DGP-7"), YAMAHA_DEVICE(0x2001, "DGP-5"), YAMAHA_DEVICE(0x2002, NULL), -- cgit v1.2.3-18-g5258 From 1b15362c742d183430ab60f2ca402a41c474240a Mon Sep 17 00:00:00 2001 From: Trulan Martin Date: Wed, 24 Apr 2013 21:19:20 -0400 Subject: ALSA: usb-audio: USB quirk for Yamaha THR5A This patch adds a USB quirk for the Yamaha THR5A amp. Signed-off-by: Trulan Martin Signed-off-by: Takashi Iwai --- sound/usb/quirks-table.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'sound/usb/quirks-table.h') diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h index 0d422aab57d..e90b27085b2 100644 --- a/sound/usb/quirks-table.h +++ b/sound/usb/quirks-table.h @@ -379,6 +379,32 @@ YAMAHA_DEVICE(0x105d, NULL), } } }, +{ + USB_DEVICE(0x0499, 0x150a), + .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { + /* .vendor_name = "Yamaha", */ + /* .product_name = "THR5A", */ + .ifnum = QUIRK_ANY_INTERFACE, + .type = QUIRK_COMPOSITE, + .data = (const struct snd_usb_audio_quirk[]) { + { + .ifnum = 1, + .type = QUIRK_AUDIO_STANDARD_INTERFACE + }, + { + .ifnum = 2, + .type = QUIRK_AUDIO_STANDARD_INTERFACE + }, + { + .ifnum = 3, + .type = QUIRK_MIDI_YAMAHA + }, + { + .ifnum = -1 + } + } + } +}, YAMAHA_DEVICE(0x2000, "DGP-7"), YAMAHA_DEVICE(0x2001, "DGP-5"), YAMAHA_DEVICE(0x2002, NULL), -- cgit v1.2.3-18-g5258 From 03e0221444b7833c9c938a9ca66167aa1d4b1305 Mon Sep 17 00:00:00 2001 From: Trulan Martin Date: Wed, 24 Apr 2013 21:19:21 -0400 Subject: ALSA: usb-audio: USB quirk for Yamaha THR10C This patch adds a USB quirk for the Yamaha THR10C amp. Signed-off-by: Trulan Martin Signed-off-by: Takashi Iwai --- sound/usb/quirks-table.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'sound/usb/quirks-table.h') diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h index e90b27085b2..7f1722f82c8 100644 --- a/sound/usb/quirks-table.h +++ b/sound/usb/quirks-table.h @@ -405,6 +405,32 @@ YAMAHA_DEVICE(0x105d, NULL), } } }, +{ + USB_DEVICE(0x0499, 0x150c), + .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { + /* .vendor_name = "Yamaha", */ + /* .product_name = "THR10C", */ + .ifnum = QUIRK_ANY_INTERFACE, + .type = QUIRK_COMPOSITE, + .data = (const struct snd_usb_audio_quirk[]) { + { + .ifnum = 1, + .type = QUIRK_AUDIO_STANDARD_INTERFACE + }, + { + .ifnum = 2, + .type = QUIRK_AUDIO_STANDARD_INTERFACE + }, + { + .ifnum = 3, + .type = QUIRK_MIDI_YAMAHA + }, + { + .ifnum = -1 + } + } + } +}, YAMAHA_DEVICE(0x2000, "DGP-7"), YAMAHA_DEVICE(0x2001, "DGP-5"), YAMAHA_DEVICE(0x2002, NULL), -- cgit v1.2.3-18-g5258