snd-usb-caiaq: Initial Work on NI Maschine Support
Subsystems (2)
cover snd-usb-caiaq: Initial Work on NI Maschine Support
These patches extend the existing snd-usb-caiaq driver to support the Native Instruments Maschine controller (http://native-instruments.com/maschine).
Future work will be on adding support for the LEDs and the two greyscale screens.
Thanks,
Will
PATCH 1/2 ALSA: snd-usb-caiaq: Fix NULL dereference in input.c
From: William Light <[email protected]>
There was a case where a newly-registered input device could be opened before a necessary variable in the device structure was set. When code tried to use the variable in the URB reply callback, it would cause an Oops.
This fix sets the aforementioned variable before calling input_register_device.
--- sound/usb/caiaq/input.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
sound/usb/caiaq/input.c +3 -1
@@ -664,15 +664,17 @@ int snd_usb_caiaq_input_init(struct snd_usb_caiaqdev *dev)for (i =0 ; i < input->keycodemax; i++)__set_bit (dev->keycode[i], input->keybit); + dev->input_dev = input; + ret =input_register_device (input);if (ret <0 ) goto exit_free_idev; - dev->input_dev = input;return 0 ; exit_free_idev:input_free_device (input); + dev->input_dev =NULL ;return ret; }
Signature · 1 line
1.7.6.1
PATCH 2/2 ALSA: snd-usb-caiaq: Add support for Maschine
In reply to William LightFrom: William Light <[email protected]>
This adds partial support for the Maschine controller by Native Instruments. Supported now are the 1x1 MIDI interface and the 41 buttons, 11 endless rotary encoders, and 16 pressure-sensitive drum pads. Still to work on are the dimmable LEDs and the two monochrome screens.
--- sound/usb/Kconfig | 2 + sound/usb/caiaq/device.c | 8 ++- sound/usb/caiaq/device.h | 1 + sound/usb/caiaq/input.c | 151 +++++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 160 insertions(+), 2 deletions(-)
sound/usb/Kconfig +2 -0
@@ -67,6 +67,7 @@ config SND_USB_CAIAQ * Native Instruments Guitar Rig mobile * Native Instruments Traktor Kontrol X1 * Native Instruments Traktor Kontrol S4 + * Native Instruments Maschine Controller To compile this driver as a module, choose M here: the module will be called snd-usb-caiaq.
@@ -85,6 +86,7 @@ config SND_USB_CAIAQ_INPUT * Native Instruments Kore Controller 2 * Native Instruments Audio Kontrol 1 * Native Instruments Traktor Kontrol S4 + * Native Instruments Maschine Controller config SND_USB_US122L tristate "Tascam US-122L USB driver"
sound/usb/caiaq/device.c +7 -1
@@ -50,7 +50,8 @@ MODULE_SUPPORTED_DEVICE("{{Native Instruments, RigKontrol2},""{Native Instruments, Session I/O}," "{Native Instruments, GuitarRig mobile}" "{Native Instruments, Traktor Kontrol X1}" - "{Native Instruments, Traktor Kontrol S4}"); +"{Native Instruments, Traktor Kontrol S4}" + "{Native Instruments, Maschine Controller}");static int index[SNDRV_CARDS ] =SNDRV_DEFAULT_IDX ;/* Index 0-max */ static char * id[SNDRV_CARDS ] =SNDRV_DEFAULT_STR ;/* Id for this card */
@@ -146,6 +147,11 @@ static struct usb_device_id snd_usb_id_table[] = { .idVendor = USB_VID_NATIVEINSTRUMENTS, .idProduct = USB_PID_TRAKTORAUDIO2 }, + { + .match_flags = USB_DEVICE_ID_MATCH_DEVICE, + .idVendor = USB_VID_NATIVEINSTRUMENTS, + .idProduct = USB_PID_MASCHINECONTROLLER + }, {/* terminator */ } };
sound/usb/caiaq/device.h +1 -0
@@ -18,6 +18,7 @@#define USB_PID_TRAKTORKONTROLX1 0x2305#define USB_PID_TRAKTORKONTROLS4 0xbaff#define USB_PID_TRAKTORAUDIO2 0x041d +#define USB_PID_MASCHINECONTROLLER 0x0808#define EP1_BUFSIZE 64#define EP4_BUFSIZE 512
sound/usb/caiaq/input.c +150 -1
196 lines not on this page · raw message
Signature · 1 line
1.7.6.1
Takashi Iwai
AppliedAt Mon, 10 Oct 2011 15:54:21 +0000,
Quoted 5 lines · William Light
These patches extend the existing snd-usb-caiaq driver to support the Native Instruments Maschine controller (http://native-instruments.com/maschine).
Future work will be on adding support for the LEDs and the two greyscale screens.
Thanks, applied both patches now.
Takashi
Quoted 8 lines
Thanks,
Will
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Daniel Mack
maintainerQuoted 4 lines · William Light
These patches extend the existing snd-usb-caiaq driver to support the Native Instruments Maschine controller (http://native-instruments.com/maschine).
Future work will be on adding support for the LEDs and the two greyscale screens.
Very nice work, thanks for contributing.
Looking forward to your other patches :)
Daniel