diff options
author | Daniel Mack <daniel@caiaq.de> | 2007-11-26 09:00:56 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-01-31 17:29:29 +0100 |
commit | 7829d0eccbddc7431cc9af662c7cd3442b5598bd (patch) | |
tree | 87ffa944084e528ecb643f5a96591a9b550c3f21 /sound/usb/caiaq/caiaq-input.c | |
parent | 389619f1063ed21cf237e2a8081be42e66d3c9a6 (diff) | |
download | blackbird-op-linux-7829d0eccbddc7431cc9af662c7cd3442b5598bd.tar.gz blackbird-op-linux-7829d0eccbddc7431cc9af662c7cd3442b5598bd.zip |
[ALSA] usb-caiaq - add support for Kore controller 2
Added support for Native Instrument's Kore controller 2. This device has
no audio but MIDI, input devices and ALSA controllers only.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/usb/caiaq/caiaq-input.c')
-rw-r--r-- | sound/usb/caiaq/caiaq-input.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/usb/caiaq/caiaq-input.c b/sound/usb/caiaq/caiaq-input.c index ded45e5a0b14..e6c410ab76f4 100644 --- a/sound/usb/caiaq/caiaq-input.c +++ b/sound/usb/caiaq/caiaq-input.c @@ -162,6 +162,7 @@ static void snd_caiaq_input_read_analog(struct snd_usb_caiaqdev *dev, input_sync(input_dev); break; case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER): + case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER2): input_report_abs(input_dev, ABS_X, (buf[0] << 8) | buf[1]); input_report_abs(input_dev, ABS_Y, (buf[2] << 8) | buf[3]); input_report_abs(input_dev, ABS_Z, (buf[4] << 8) | buf[5]); @@ -183,6 +184,7 @@ static void snd_caiaq_input_read_erp(struct snd_usb_caiaqdev *dev, input_sync(input_dev); break; case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER): + case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER2): i = decode_erp(buf[7], buf[5]); input_report_abs(input_dev, ABS_HAT0X, i); i = decode_erp(buf[12], buf[14]); @@ -223,7 +225,9 @@ static void snd_caiaq_input_read_io(struct snd_usb_caiaqdev *dev, buf[i / 8] & (1 << (i % 8))); if (dev->chip.usb_id == - USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER)) + USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER) || + dev->chip.usb_id == + USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER2)) input_report_abs(dev->input_dev, ABS_MISC, 255 - buf[4]); input_sync(input_dev); @@ -302,6 +306,7 @@ int snd_usb_caiaq_input_init(struct snd_usb_caiaqdev *dev) snd_usb_caiaq_set_auto_msg(dev, 1, 0, 5); break; case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER): + case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER2): input->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); input->absbit[0] = BIT_MASK(ABS_HAT0X) | BIT_MASK(ABS_HAT0Y) | BIT_MASK(ABS_HAT1X) | BIT_MASK(ABS_HAT1Y) | |