diff options
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, | |||
162 | input_sync(input_dev); | 162 | input_sync(input_dev); |
163 | break; | 163 | break; |
164 | case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER): | 164 | case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER): |
165 | case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER2): | ||
165 | input_report_abs(input_dev, ABS_X, (buf[0] << 8) | buf[1]); | 166 | input_report_abs(input_dev, ABS_X, (buf[0] << 8) | buf[1]); |
166 | input_report_abs(input_dev, ABS_Y, (buf[2] << 8) | buf[3]); | 167 | input_report_abs(input_dev, ABS_Y, (buf[2] << 8) | buf[3]); |
167 | input_report_abs(input_dev, ABS_Z, (buf[4] << 8) | buf[5]); | 168 | 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, | |||
183 | input_sync(input_dev); | 184 | input_sync(input_dev); |
184 | break; | 185 | break; |
185 | case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER): | 186 | case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER): |
187 | case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER2): | ||
186 | i = decode_erp(buf[7], buf[5]); | 188 | i = decode_erp(buf[7], buf[5]); |
187 | input_report_abs(input_dev, ABS_HAT0X, i); | 189 | input_report_abs(input_dev, ABS_HAT0X, i); |
188 | i = decode_erp(buf[12], buf[14]); | 190 | i = decode_erp(buf[12], buf[14]); |
@@ -223,7 +225,9 @@ static void snd_caiaq_input_read_io(struct snd_usb_caiaqdev *dev, | |||
223 | buf[i / 8] & (1 << (i % 8))); | 225 | buf[i / 8] & (1 << (i % 8))); |
224 | 226 | ||
225 | if (dev->chip.usb_id == | 227 | if (dev->chip.usb_id == |
226 | USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER)) | 228 | USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER) || |
229 | dev->chip.usb_id == | ||
230 | USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER2)) | ||
227 | input_report_abs(dev->input_dev, ABS_MISC, 255 - buf[4]); | 231 | input_report_abs(dev->input_dev, ABS_MISC, 255 - buf[4]); |
228 | 232 | ||
229 | input_sync(input_dev); | 233 | input_sync(input_dev); |
@@ -302,6 +306,7 @@ int snd_usb_caiaq_input_init(struct snd_usb_caiaqdev *dev) | |||
302 | snd_usb_caiaq_set_auto_msg(dev, 1, 0, 5); | 306 | snd_usb_caiaq_set_auto_msg(dev, 1, 0, 5); |
303 | break; | 307 | break; |
304 | case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER): | 308 | case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER): |
309 | case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER2): | ||
305 | input->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); | 310 | input->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); |
306 | input->absbit[0] = BIT_MASK(ABS_HAT0X) | BIT_MASK(ABS_HAT0Y) | | 311 | input->absbit[0] = BIT_MASK(ABS_HAT0X) | BIT_MASK(ABS_HAT0Y) | |
307 | BIT_MASK(ABS_HAT1X) | BIT_MASK(ABS_HAT1Y) | | 312 | BIT_MASK(ABS_HAT1X) | BIT_MASK(ABS_HAT1Y) | |