summaryrefslogtreecommitdiffstats
path: root/sound/usb/caiaq/input.c
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: caiaq: Add yet more sanity checks for invalid EPsTakashi Iwai2017-10-111-0/+9
| | | | | | | | | A few other places in caiaq driver have the URB handling with the fixed endpoints without checking the validity, too. Add the sanity check with the new helper function at each appropriate place for avoiding the spurious kernel warnings due to invalid EPs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: caiaq: fix endianness bug in snd_usb_caiaq_maschine_dispatchEldad Zack2013-04-301-5/+5
| | | | | | | | | | | | | | | | | | | | | | | Current code does this: be16_to_cpu(buf[i * 2] << 8 | buf[(i * 2) + 1]) Which is effectively (neglecting the index): be16_to_cpu(be16_to_cpu(*((u16 *) buf))) This means the int16 in the buffer is not converted at all. Daniel Mack confirmed that the driver works on little endian CPUs, leading to the conclusion that the device-side structure is actually little endian. This changes the code to use le16_to_cpu(). Caught by sparse. Acked-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: snd-usb-caiaq: fix smatch warningsDaniel Mack2013-03-071-1/+1
| | | | | | | | | | | | | | | Fix three smatch warnings recently introduced: sound/usb/caiaq/device.c:166 usb_ep1_command_reply_dispatch() warn: variable dereferenced before check 'cdev' (see line 163) sound/usb/caiaq/device.c:517 snd_disconnect() warn: variable dereferenced before check 'card' (see line 514) sound/usb/caiaq/input.c:510 snd_usb_caiaq_ep4_reply_dispatch() warn: variable dereferenced before check 'cdev' (see line 506) Signed-off-by: Daniel Mack <zonque@gmail.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: snd-usb-caiaq: switch to dev_*() loggingDaniel Mack2013-03-041-2/+6
| | | | | | | | | Get rid of the proprietary functions log() and debug() and use the generic dev_*() approach. A macro is needed to cast a cdev to a struct device *. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: snd-usb-caiaq: rename 'dev' to 'cdev'Daniel Mack2013-03-041-160/+160
| | | | | | | | This is needed in order to make the device namespace cleaner, and will help when moving this driver over to dev_*() logging. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: snd-usb-caiaq: Add support for MaschineWilliam Light2011-10-131-1/+150
| | | | | | | | | | 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. Signed-off-by: William Light <wrl@illest.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: snd-usb-caiaq: Fix NULL dereference in input.cWilliam Light2011-10-131-1/+3
| | | | | | | | | | | 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. Signed-off-by: William Light <wrl@illest.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: snd-usb-caiaq: Fix keymap for RigKontrol3Daniel Mack2011-08-061-1/+1
| | | | | | | Signed-off-by: Daniel Mack <zonque@gmail.com> Reported-by: Renato <naretobh@gmail.com> Cc: stable@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: snd-usb-caiaq: Add support for Traktor Kontrol S4Daniel Mack2010-09-101-26/+222
| | | | | | | | | | | | | | This patch adds support for the new Traktor Kontrol S4 by Native Instruments. It features a new audio data streaming model, MIDI in and out ports, a huge number of 174 dimmable LEDs, 96 buttons and 46 absolute encoder axis, including some rotary encoders. All features are supported by the driver now. Did some code refactoring along the way. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb/caiaq: fix Traktor Kontrol X1 ABS_HAT2X axisDaniel Mack2010-05-251-1/+1
| | | | | Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb - update gfp/slab.h includesTejun Heo2010-03-291-0/+1
| | | | | | | | Implicit slab.h inclusion via percpu.h is about to go away. Make sure gfp.h or slab.h is included as necessary. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb/caiaq: Add support for Traktor Kontrol X1Daniel Mack2010-03-221-13/+149
| | | | | | | | | | | This device does not have audio controllers and backlit buttons only. Input data is handled over a dedicated USB endpoint. All functions are supported by the driver now. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: snd-usb-caiaq: rename files to remove redundant information in file pathesDaniel Mack2009-04-141-0/+358
Cleanup only, no functional change. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
OpenPOWER on IntegriCloud