aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/line6/toneport.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-01-11staging: line6: drop ToneportSourceInfo CamelCase nameStefan Hajnoczi1-4/+2
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>
2012-11-13staging: line6: replace deprecated strict_strtol() in toneport.cStefan Hajnoczi1-6/+2
The LED value is an int, so replace strict_strtol() with kstrtoint(). It's safe to pass in the actual variable instead of a local temporary because strto*() doesn't write to the result unless the function returns success. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-20USB: toneport.c: remove err() usageGreg Kroah-Hartman1-1/+1
err() was a very old USB-specific macro that I thought had gone away. This patch removes it from being used in the driver and uses dev_err() instead. CC: Markus Grabner <grabner@icg.tugraz.at> CC: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09staging: line6: separate handling of buffer allocation and stream startupMarkus Grabner1-4/+4
There are several features of the Line6 USB driver which require PCM data to be exchanged with the device: *) PCM playback and capture via ALSA *) software monitoring (for devices without hardware monitoring) *) optional impulse response measurement However, from the device's point of view, there is just a single capture and playback stream, which must be shared between these subsystems. It is therefore necessary to maintain the state of the subsystems with respect to PCM usage. We define several constants of the form LINE6_BIT_PCM_<subsystem>_<direction>_<resource> with the following meanings: *) <subsystem> is one of -) ALSA: PCM playback and capture via ALSA -) MONITOR: software monitoring -) IMPULSE: optional impulse response measurement *) <direction> is one of -) PLAYBACK: audio output (from host to device) -) CAPTURE: audio input (from device to host) *) <resource> is one of -) BUFFER: buffer required by PCM data stream -) STREAM: actual PCM data stream The subsystems call line6_pcm_acquire() to acquire the (shared) resources needed for a particular operation (e.g., allocate the buffer for ALSA playback or start the capture stream for software monitoring). When a resource is no longer needed, it is released by calling line6_pcm_release(). Buffer allocation and stream startup are handled separately to allow the ALSA kernel driver to perform them at appropriate places (since the callback which starts a PCM stream is not allowed to sleep). Signed-off-by: Markus Grabner <grabner@icg.tugraz.at> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09staging: line6: use source select control for UX2 devicesMarkus Grabner1-0/+4
Signed-off-by: Markus Grabner <grabner@icg.tugraz.at> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2011-12-09staging: line6: eliminate useless NULL checksStefan Hajnoczi1-5/+1
The line6 driver checks struct field addresses for NULL where it does not make sense to do so. The struct has already been checked for NULL and there is no value in checking the first field's address too. Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Markus Grabner <grabner@icg.tugraz.at> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-18Staging: line6: fix up my fixup for some sysfs attribute permissionsGreg Kroah-Hartman1-2/+2
They should be writable by root, not readable. Doh, stupid me with the wrong flags. Reported-by: Jonathan Cameron <jic23@cam.ac.uk> Cc: Markus Grabner <grabner@icg.tugraz.at> Cc: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-16Staging: line6: fix up some sysfs attribute permissionsGreg Kroah-Hartman1-2/+2
They should not be writable by any user Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Markus Grabner <grabner@icg.tugraz.at> Cc: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-21Staging: line6: minor coding style cleanupsGreg Kroah-Hartman1-16/+9
This fixes up all of the remaining coding style issues that make any sense to make in the line6 driver. Cc: Markus Grabner <grabner@icg.tugraz.at> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31Staging: line6: another upstream syncMarkus Grabner1-66/+77
Everything should be in sync now. Signed-off-by: Markus Grabner <grabner@icg.tugraz.at> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31staging: line6: sync with upstreamMarkus Grabner1-69/+268
Big upstream sync. Signed-off-by: Markus Grabner <grabner@icg.tugraz.at> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11staging: line6: Convert simple_strtol to strict_strtol in toneport.cShawn Bohrer1-4/+16
Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11staging: line6: Lindent and fix some checkpatch warnings in toneport.cShawn Bohrer1-50/+49
Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03Staging: line6: fix checkpatch errors in toneport.cGreg Kroah-Hartman1-31/+49
Lots of warnings also fixed up. Cc: Markus Grabner <grabner@icg.tugraz.at> Cc: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03Staging: line6: fix up NULL assignment mistakesGreg Kroah-Hartman1-1/+1
Should use NULL for a pointer, not 0, otherwise sparse complains. Cc: Markus Grabner <grabner@icg.tugraz.at> Cc: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03Staging: line6: remove DEVICE_ATTRIBUTEGreg Kroah-Hartman1-2/+6
As the code is in the kernel tree, it's no longer needed. Cc: Markus Grabner <grabner@icg.tugraz.at> Cc: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03Staging: add line6 usb driverMarkus Grabner1-0/+219
This is an experimental Linux driver for the guitar amp, cab, and effects modeller PODxt Pro by Line6 (and similar devices), supporting the following features: - Reading/writing individual parameters - Reading/writing complete channel, effects setup, and amp setup data - Channel switching - Virtual MIDI interface - Tuner access - Playback/capture/mixer device for any ALSA-compatible PCM audio application - Signal routing (record clean/processed guitar signal, re-amping) Moreover, preliminary support for the Variax Workbench is included. From: Markus Grabner <grabner@icg.tugraz.at> Cc: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>