aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/line6
AgeCommit message (Collapse)AuthorFilesLines
2015-01-12ALSA: move line6 usb driver into sound/usbTakashi Iwai26-5776/+0
Promote line6 driver from staging to sound/usb/line6 directory, and maintain through sound subsystem tree. This commit just moves the code and adapts Makefile / Kconfig. The further renames and misc cleanups will follow. Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Make *_disconnect() functions staticChris Rorvick8-96/+94
Remove declarations from the header and move the definitions up in the source so they need not be forward declared. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Call *_disconnect() via pointerChris Rorvick6-42/+8
Which *_disconnect() to call on disconnect is known at initialization. Add a function pointer to the `usb_line6' struct and use to call into the appropriate logic instead of evaluating the conditional logic. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Call *_process_message() via pointerChris Rorvick6-35/+10
Which *_process_message() function (if any) to call when data is received is known at initialization. Add a function pointer to the `usb_line6' struct and use to call into the appropriate logic instead of evaluating the conditional logic for each message. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Pass *_process_message() `usb_line6' pointersChris Rorvick5-13/+10
Casting the `struct usb_line6' pointer at the call point makes the code difficult to read. This is substantially cleaned up by moving the cast into the callees. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Pass *_init() `usb_line6' pointersChris Rorvick9-33/+24
Casting the `struct usb_line6' pointer at the call point makes the code difficult to read. This is substantially cleaned up by moving the cast into the callees. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Move audio endpoints to propertiesChris Rorvick6-64/+52
The device type can now be used to determine the addresses of the audio endpoints for the interface. Drop the conditional logic and make these values properties. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Remove stale Pocket POD PCM endpointsChris Rorvick1-5/+0
Commit 1027f476f507 (staging: line6: sync with upstream) removed PCM from the Pocket POD capabilities but left the endpoint configuration. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Move control endpoints to propertiesChris Rorvick3-40/+48
The device type can now be used to determine the addresses of the control endpoints for the interface. Drop the conditional logic and make these values properties. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Move altsetting to propertiesChris Rorvick2-51/+25
The device type can now be used to determine the altsetting for the interface. Drop the conditional logic and make this value a property. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Filter on UX2 interfacesChris Rorvick1-16/+4
The driver only supports interface 0 of the TonePort UX2 and POD Studio UX2 devices. Use the device table to filter on this. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Filter on Pocket POD interfaceChris Rorvick1-10/+2
The driver only supports interface 1 of the Pocket POD. Use the device table to filter on this. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Split out POD HD500 interfacesChris Rorvick3-19/+28
The driver uses a different altsetting depending on the interface. Add device type entries for each of these. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Split out PODxt Live interfacesChris Rorvick4-81/+48
The PODxt Live device has both a POD and a Variax interface. Add device type entries for each of these. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: List out capabilities individuallyChris Rorvick2-22/+36
The `LINE6_CAP_CTRL_PCM_HW' macro combines three capabilities to save horizontal space when defining the properties entries. Now that these are no longer limited to single lines this is not such a concern. Specify capabilities individually when defining each property for better clarity. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Use explicit indexes when defining propertiesChris Rorvick1-22/+90
Specify the index of the properties entry explicitly to define this structure more robustly. Also, drop the `L6PROP' macro in favor of initializing each member explicitly on its own line since horizontal space is limited and more attributes will be added later. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Rename capability macrosChris Rorvick6-14/+14
Including "BIT" in the macro name is pointless. Replace with "CAP" to provide some context for what its value represents. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Remove useless commentsChris Rorvick1-2/+0
Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Remove idVendor and idProduct macrosChris Rorvick2-61/+19
These are now only used to build the device table. Each entry in this table is already clearly documented as to what device it maps to so the macros become unnecessary indirection. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Key off of device typeChris Rorvick4-143/+144
The driver currently uses the device's idProduct as input to several switch statements. In some cases this is not sufficiently granular and the interface number must be taken into account. Store the device type in `usb_line6' and key off of it instead. New types can then be added that map to specific interfaces on the device so that this conditional logic can be flattened out. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Index properties array with device typeChris Rorvick1-15/+2
The current logic uses the index of the matched entry from the device table as an offset to the corresponding properties entry. The values of the new `line6_device_type' enum are ordered such that they can be used as an index into either of these arrays. Drop the device entry lookup logic and use the device type (via the .driver_info member) instead. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Define a device type enumChris Rorvick2-18/+57
Define an enum containing the supported devices and associate each entry in the device table to the respective value. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Cleanup device tableChris Rorvick1-19/+21
Wrap USB_DEVICE to avoid repeating the Line 6 vendor ID. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Remove unsupported X3 devicesChris Rorvick3-30/+0
Support for these devices appears to have never been completed. Remove them from the device table along with a minimal amount of supporting code. Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Remove line6_pod_transmit_paramter()Chris Rorvick2-11/+0
This function was no longer used as of commit 2807904441d4 (staging: line6: drop MIDI parameter sysfs attrs). Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: Remove `device_bit' from propertiesChris Rorvick4-86/+24
The `device_bit' member was no longer used as of commit 2807904441d4 (staging: line6: drop MIDI parameter sysfs attrs). Signed-off-by: Chris Rorvick <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12Staging: line6: remove spaces before commas.Jonas Lundqvist1-3/+3
Fix three space prohibited errors in pcm.h found by checkpatch.pl. Signed-off-by: Jonas Lundqvist <[email protected]> Reviewed-by: Jeremiah Mahler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2015-01-12staging: line6: toneport.c: Fix for possible null pointer dereferenceRickard Strandqvist1-7/+8
The NULL check was done to late, and there it was a risk of a possible null pointer dereference. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2014-09-23staging: line6: fix midibuf.c coding style issueDomagoj Trsan1-3/+8
Fix the following checkpatch.pl warning: - else is not generally useful after a break or return Signed-off-by: Domagoj Trsan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-06-19staging: line6: do not return 0 from probe if no initialization doneAlexey Khoroshilov1-1/+1
There is a strange "return 0" in line6_probe() before any initialization of the module is done. It can lead to NULL pointer dereference in other functions. The patch proposes to return -ENODEV in this case. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-05-15staging/line6: blank line after declaration cleanupJerry Snitselaar6-1/+19
Fix coding style warnings reported by checkpath. Signed-off-by: Jerry Snitselaar <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16staging/line6: Fix kzalloc coding style issueL. Alberto Giménez1-1/+1
Pass the actual variable to sizeof instead of a type definition. Signed-off-by: L. Alberto Giménez <[email protected]> Acked-by: Takashi Iwai <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16staging: line6: Add blank lines after declarationsFabian Mewes3-0/+7
Use the more common kernel coding style. Signed-off-by: Fabian Mewes <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-01Merge tag 'staging-3.15-rc1' of ↵Linus Torvalds5-33/+39
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver updates from Greg KH: "Here's the huge drivers/staging/ update for 3.15-rc1. Loads of cleanup fixes, a few drivers removed, and some new ones added. All have been in linux-next for a while" * tag 'staging-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1375 commits) staging: xillybus: XILLYBUS_PCIE depends on PCI_MSI staging: xillybus: Added "select CRC32" for XILLYBUS in Kconfig staging: comedi: poc: remove obsolete driver staging: unisys: replace kzalloc/kfree with UISMALLOC/UISFREE staging: octeon-usb: prevent memory corruption staging: usbip: fix line over 80 characters staging: usbip: fix quoted string split across lines Staging: unisys: Remove RETINT macro Staging: unisys: Remove FAIL macro Staging: unisys: Remove RETVOID macro Staging: unisys: Remove RETPTR macro Staging: unisys: Remove RETBOOL macro Staging: unisys: Remove FAIL_WPOSTCODE_1 macro Staging: unisys: Cleanup macros to get rid of goto statements Staging: unisys: include: Remove unused macros from timskmod.h staging: dgap: fix the rest of the checkpatch warnings in dgap.c Staging: bcm: Remove unnecessary parentheses staging: wlags49_h2: Delete unnecessary braces staging: wlags49_h2: Do not use assignment in if condition staging: wlags49_h2: Enclose macro in a do-while loop ...
2014-03-18staging: line6: Fix coding style problemMikhail Boiko1-0/+1
Fix style issue for eudyptula challenge Signed-off-by: Mikhail Boiko <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-03-17staging: line6: long line fixesDavide Berardi2-26/+30
Fixed some line over 80 characters. Signed-off-by: Davide Berardi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-03-16staging: line6: Fix line over 80 charactersGulsah Kose1-1/+2
Fix checkpatch.pl issue with line over 80 characters in midi.c Signed-off-by: Gulsah Kose <[email protected]> Signed-off-by: Peter P Waskiewicz Jr <[email protected]>
2014-03-08staging:line6: Fix use of variable length arraysHimangi Saraogi1-2/+2
This patch fixes the sparse warning: drivers/staging/line6/midi.c:50:34: warning: Variable length array is used. The size is same as the variable LINE6_FALLBACK_MAXPACKETSIZE, so use that. Signed-off-by: Himangi Saraogi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-27Staging: line6: Fix no space before tabs in usbdefs.hMonam Agarwal1-3/+3
This patch fixes the following checkpatch.pl issues in usbdefs.h: WARNING: no space before tabs Signed-off-by: Monam Agarwal <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-27Staging: line6: Fix unnecessary space after function pointer in driver.hMonam Agarwal1-1/+1
This patch fixes the following checkpatch.pl issues in driver.h: WARNING: unnecessary space after function pointer in driver.h Signed-off-by: Monam Agarwal <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-27Staging: line6: Fix unnecessary space after function pointer in driver.cMonam Agarwal1-1/+1
This patch fixes the following checkpatch.pl issues in driver.c: WARNING: unnecessary space after function pointer in driver.c Signed-off-by: Monam Agarwal <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-14staging/line6: Convert to snd_card_new() with a device pointerTakashi Iwai3-6/+3
Also remove superfluous snd_card_set_dev() calls. Signed-off-by: Takashi Iwai <[email protected]>
2013-12-21staging: line6: Add support for POD HD400 to line6usb driverChris Bajumpaa3-1/+14
This patch adds support for the Line 6 POD HD400 to the line6usb driver. Signed-off-by: Chris Bajumpaa <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-10-27Staging:line6: fix line over 80 charactersEbru Akagunduz1-2/+3
Fix checkpatch.pl issues with line over 80 characters in playback.c Signed-off-by: Ebru Akagunduz <[email protected]> Reviewed-by: Lisa Nguyen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-10-27Staging: line6: Fix Sparse Warning of incorrect typeRashika Kheria1-3/+7
This patch fixes the following sparse warnings in toneport.c- drivers/staging/line6/toneport.c:329:48: warning: incorrect type in argument 1 (different base types) drivers/staging/line6/toneport.c:329:48: expected short [signed] product drivers/staging/line6/toneport.c:329:48: got restricted __le16 [usertype] idProduct drivers/staging/line6/toneport.c:385:48: warning: incorrect type in argument 1 (different base types) drivers/staging/line6/toneport.c:385:48: expected short [signed] product drivers/staging/line6/toneport.c:385:48: got restricted __le16 [usertype] idProduct drivers/staging/line6/toneport.c:438:64: warning: incorrect type in argument 1 (different base types) drivers/staging/line6/toneport.c:438:64: expected short [signed] product drivers/staging/line6/toneport.c:438:64: got restricted __le16 [usertype] idProduct Signed-off-by: Rashika Kheria <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-10-27Staging: line6: Fix Sparse Warning of restricted __le16 degrades to integerRashika Kheria1-2/+2
This patch fixes the following sparse warning in toneport.c- warning: restricted __le16 degrades to integer Signed-off-by: Rashika Kheria <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-10-27Staging: line6: Fix Sparse warning of restricted __le16 degrades to integerRashika Kheria1-3/+3
This patch fixes the following sparse warning in driver.c- warning: restricted __le16 degrades to integer Signed-off-by: Rashika Kheria <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-10-19Staging: line6: replacing -EINVAL with retval in driver.cAshvini Varatharaj1-1/+1
drivers/staging/line6/driver.c:208 line6_send_raw_message_async_part() info: why not propagate 'retval' from usb_submit_urb() instead of (-22)? Signed-off-by: Ashvini Varatharaj <[email protected]> Reviewed-by: Josh Triplett <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-10-19Staging: line6: replacing -EINVAL with retvalAshvini Varatharaj1-1/+1
drivers/staging/line6/midi.c:147 send_midi_async() info: why not propagate 'retval' from usb_submit_urb() instead of (-22)? Signed-off-by: Ashvini Varatharaj <[email protected]> Reviewed-by: Josh Triplett <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-10-11staging: line6: midi: Use NULL instead of 0 for pointersSachin Kamat1-1/+1
Use NULL instead of 0 for pointers. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>