aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/line6
AgeCommit message (Collapse)Author
2013-12-21staging: line6: Add support for POD HD400 to line6usb driverChris Bajumpaa
This patch adds support for the Line 6 POD HD400 to the line6usb driver. Signed-off-by: Chris Bajumpaa <cbajumpa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27Staging:line6: fix line over 80 charactersEbru Akagunduz
Fix checkpatch.pl issues with line over 80 characters in playback.c Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com> Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27Staging: line6: Fix Sparse Warning of incorrect typeRashika Kheria
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 <rashika.kheria@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27Staging: line6: Fix Sparse Warning of restricted __le16 degrades to integerRashika Kheria
This patch fixes the following sparse warning in toneport.c- warning: restricted __le16 degrades to integer Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27Staging: line6: Fix Sparse warning of restricted __le16 degrades to integerRashika Kheria
This patch fixes the following sparse warning in driver.c- warning: restricted __le16 degrades to integer Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19Staging: line6: replacing -EINVAL with retval in driver.cAshvini Varatharaj
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 <ashvinivaratharaj@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19Staging: line6: replacing -EINVAL with retvalAshvini Varatharaj
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 <ashvinivaratharaj@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11staging: line6: midi: Use NULL instead of 0 for pointersSachin Kamat
Use NULL instead of 0 for pointers. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: line6: add bounds check in snd_toneport_source_put()Dan Carpenter
"source" comes from the user in snd_ctl_elem_write() so it needs to be checked. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-24staging: line6: use default sysfs attribute macrosGreg Kroah-Hartman
Move to use the DEVICE_ATTR_RW/RO macros, making it easier to audit the sysfs file permissions, and get rid of the "empty" callback for read-only files, saving lines of code. Cc: Stefan Hajnoczi <stefanha@gmail.com> Cc: Laurent Navet <laurent.navet@gmail.com> Cc: Johannes Thumshirn <morbidrsa@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-15staging: line6: Fix unlocked snd_pcm_stop() callTakashi Iwai
snd_pcm_stop() must be called in the PCM substream lock context. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-06-24staging: line6: avoid __sync_fetch_and_{and,or}Arnd Bergmann
__sync_fetch_and_and and __sync_fetch_and_or are functions that are provided by gcc and depending on the target architecture may be implemented in libgcc, which is not always available in the kernel. This leads to a build failure on ARMv5: drivers/built-in.o: In function `line6_pcm_release': :(.text+0x3bfe80): undefined reference to `__sync_fetch_and_and_4' drivers/built-in.o: In function `line6_pcm_acquire': :(.text+0x3bff30): undefined reference to `__sync_fetch_and_or_4' To work around this, we can use the kernel-provided cmpxchg macro. Build-tested only. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Markus Grabner <grabner@icg.tugraz.at> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-11staging: line6: pod.c: fix checkpatch warningLaurent Navet
- WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Laurent Navet <laurent.navet@gmail.com> Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-11staging: Remove unnecessary OOM messagesJoe Perches
alloc failures already get standardized OOM messages and a dump_stack. For the affected mallocs around these OOM messages: Converted kzallocs with multiplies to kcalloc. Converted kmallocs with multiplies to kmalloc_array. Converted a kmalloc/strlen/strncpy to kstrdup. Moved a spin_lock below a removed OOM message and removed a now unnecessary spin_unlock. Neatened alignment and whitespace. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-20staging: line6: clean up line6_variax_process_message()Stefan Hajnoczi
Previous versions of the line6 driver snooped MIDI traffic in order to make device state accessible via sysfs attributes. This involved a lot of logic in line6_variax_process_message() that has since been removed. Drop unused conditionals in line6_variax_process_message(). Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-20staging: line6: clean up line6_pod_process_message()Stefan Hajnoczi
Previous versions of the line6 driver snooped MIDI traffic in order to make device state accessible via sysfs attributes. This involved a lot of logic in line6_pod_process_message() that has since been removed. Drop unused conditionals in line6_pod_process_message() and reduce the levels of indentation. Only two MIDI messages are still tracked: the POD version message on startup and monitor level changes originating from the device. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-20staging: line6: drop CONFIG_LINE6_USB_DUMP_PCMStefan Hajnoczi
The CONFIG_LINE6_USB_DUMP_PCM config option prints a hexdump of PCM audio data as URBs are sent and received. The usbmon feature should be used instead of manually dumping PCM URBs. There are a few advantages to using usbmon: * Can be turned on/off at runtime * Provides full USB-level traffic * tcpdump and wireshark support for powerful analysis * No driver-specific code is required This is the last user of line6_write_hexdump() so we drop it too. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-11staging: line6: avoid CamelCase POD_* enums in pod.cStefan Hajnoczi
Fix the following checkpatch.pl warnings: WARNING: Avoid CamelCase: <POD_monitor_level> #4512: FILE: staging/line6/pod.c:41: + POD_monitor_level = 0x04, WARNING: Avoid CamelCase: <POD_system_invalid> #4513: FILE: staging/line6/pod.c:42: + POD_system_invalid = 0x10000 Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-11staging: line6: rename MidiBuffer to avoid CamelCaseStefan Hajnoczi
Fix checkpatch.pl warnings related to MidiBuffer: WARNING: Avoid CamelCase: <MidiBuffer> #947: FILE: staging/line6/driver.c:363: + struct MidiBuffer *mb = &line6->line6midi->midibuf_in; Rename MidiBuffer to midi_buffer. Note that "midibuf" would be another good name but sound/oss/midibuf.c already uses it for a different concept. Avoid possible confusion by using "midi_buffer" instead. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-11staging: line6: use pr_err() instead of printk(KERN_ERR, ...)Stefan Hajnoczi
Fix the following checkpatch.pl warning: WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... #1861: FILE: staging/line6/driver.h:56: + printk(KERN_ERR "line6usb driver bug: missing case in %s:%d\n", \ Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-11staging: line6: wrap comment to 80 chars in driver.cStefan Hajnoczi
Fix the following checkpatch.pl warning: WARNING: line over 80 characters #1107: FILE: staging/line6/driver.c:523: + /* Wait for data length. We'll get a couple of 0xff until length arrives. */ Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-11staging: line6: wrap lines to 80 chars in pod.cStefan Hajnoczi
Fix the following checkpatch.pl warnings: WARNING: line over 80 characters #4508: FILE: staging/line6/pod.c:37: + /* POD_SYSEX_DUMPMEM2 = 0x76 */ /* dumps entire internal memory of PODxt Pro */ WARNING: line over 80 characters #4630: FILE: staging/line6/pod.c:159: + if (memcmp(buf + 1, line6_midi_id, sizeof(line6_midi_id)) == 0) { Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-11staging: line6: drop ToneportSourceInfo CamelCase nameStefan Hajnoczi
Fix the following checkpatch.pl warning: WARNING: Avoid CamelCase: <ToneportSourceInfo> #5383: FILE: staging/line6/toneport.c:90: +struct ToneportSourceInfo { Since the struct is only used to define the global toneport_source_info[] table, I have chosen to make the struct anonymous and part of the table definition. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07staging: line6: delete an unused functionDan Carpenter
line6_send_sysex_message_async() isn't called from anywhere. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com> Reviewed-by: Johannes Thumshirn <morbidrsa@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07staging: line6: Use kmemdup rather than duplicating its implementationLaurent Navet
staging: line6: driver.c The semantic patch that makes this output is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Laurent Navet <laurent.navet@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07staging: line6: pcm.c fix checkpatch issuesLaurent Navet
fix those checkpatch issues drivers/staging/line6/pcm.c:84: WARNING: simple_strtoul is obsolete, use kstrtoul instead call to obsolete simple_strtoul() replaced by kstrtoint() drivers/staging/line6/pcm.c:423: ERROR: switch and case should be at the same indent realigns comments Signed-off-by: Laurent Navet <laurent.navet@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop unused dumprequest codeStefan Hajnoczi
The line6 drive no longer requests MIDI dumps from the device so dumprequest.c is not needed. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop dump requests from pod startupStefan Hajnoczi
The pod startup procedure dumps model data. This is no longer useful since the sysfs attrs which expose this information to userspace have been removed. The dump request wasn't been processed anymore. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop dump requests from variax startupStefan Hajnoczi
The variax startup procedure dumps model data. This is no longer useful since the sysfs attrs which expose this information to userspace have been removed. The dump request wasn't been processed anymore. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop variax model_data fieldStefan Hajnoczi
The sysfs attrs to access the model dump have been removed so it's safe to drop the model_data field. The next step will be to simplify the startup process since we no longer need to fetch this data via dump requests, but that will be done in a later patch. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop unused pod atomic_flags fieldStefan Hajnoczi
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop pod prog_data buffersStefan Hajnoczi
The driver no longer keeps state of MIDI-accessible device parameters. Drop the buffers but be careful to keep the device startup procedure working even though we no longer store the contents of the dump request. The startup procedure will be simplified in a later patch. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop MIDI parameter sysfs attrsStefan Hajnoczi
Both pod.c and variax.c expose the device's MIDI parameters as sysfs attrs. Knowledge of MIDI constants should be in userspace, not in the driver. Drop the sysfs attrs and let userspace interpret parameters it cares about instead. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop amp/effects dump request triggersStefan Hajnoczi
Since the driver no longer needs to keep state of device parameters it is no longer necessary to refresh state when messages that affect other parameters are sent. Drop the code to trigger a dump when amp/effects are changed. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop CONFIG_LINE6_USB_RAWStefan Hajnoczi
Now that both pod.c and variax.c have removed their raw sysfs attrs, the CONFIG_LINE6_USB_RAW config option can be dropped. The drivers are being stripped down to just PCM and MIDI I/O so there is less state and filtering. Therefore it's no longer necessary to have a special sysfs attr to bypass the filtering ("raw"). Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop variax raw sysfs attrsStefan Hajnoczi
Note that VARIAX_SYSEX_ACTIVATE was never used so drop it along with the other VARIAX_SYSEX_* constants which are now unused. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop variax guitar sysfs attrStefan Hajnoczi
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop variax active sysfs attrStefan Hajnoczi
The get_string() function has no other callers so remove it too. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop variax dump sysfs attrStefan Hajnoczi
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop variax bank sysfs attrStefan Hajnoczi
The get_string() function is no longer used so drop it too. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop variax name sysfs attrStefan Hajnoczi
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop variax tone sysfs attrStefan Hajnoczi
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop variax volume sysfs attrStefan Hajnoczi
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop variax model sysfs attrStefan Hajnoczi
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop tuner param filteringStefan Hajnoczi
The pod_set_system_param_int() helper function is only used to set the monitor level. Previously it was also used to control the tuner and has special checks. These checks can now be dropped, along with the tuner constants. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop pod.c raw sysfs attrStefan Hajnoczi
The raw sysfs attr transmits MIDI messages with less filtering. This was a useful debugging tool while the staging driver still had a lot of state and filtering. It is not useful anymore since the filtering is being dropped. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop midi_postprocess flagStefan Hajnoczi
It is no longer necessary to trigger on MIDI transmit messages that will change the state of the device since: 1. We've dropped the midi_postprocess sysfs attr in a previous commit so it is not possible to activate this feature anymore. 2. The other sysfs attrs that could inspect the state after a dump request have been dropped. Therefore we can safely remove this dead code. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop midi_mask_transmitStefan Hajnoczi
The midi_mask_transmit sysfs attribute selects the MIDI channels on which to transmit messages. If ALSA wants to transmit a message that does not match an allowed channel, the message will be dropped. This driver feature is not really used and applications don't know how to take advantage of it. Therefore we drop it and rely on applications or MIDI sequencers to select the channels used for communication. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop midi_mask_receiveStefan Hajnoczi
The midi_mask_receive sysfs attribute selects the MIDI channels on which to receive messages. There is no need to do this at the driver level, instead the MIDI application endpoints decide which channels to use. Other drivers don't implement midi_mask_receive so applications cannot make use of this feature. Therefore we drop it as part of the effort to clean up the staging driver. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26staging: line6: drop midi_postprocess sysfs attrStefan Hajnoczi
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>