line6linux-devel Mailing List for Line6 Linux software (Page 8)
Status: Pre-Alpha
Brought to you by:
mgrabner
You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(5) |
Nov
(1) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(3) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
(31) |
2012 |
Jan
(6) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(133) |
Dec
(11) |
2013 |
Jan
(22) |
Feb
|
Mar
|
Apr
(2) |
May
(10) |
Jun
(1) |
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
(1) |
Dec
(2) |
2014 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(18) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: Stefan H. <ste...@gm...> - 2012-11-14 07:51:07
|
CONFIG_LINE6_USB_DUMP_CTRL is no longer used by the code and therefore no longer plays a role in CONFIG_LINE6_USB_DUMP_ANY. Signed-off-by: Stefan Hajnoczi <ste...@gm...> --- drivers/staging/line6/driver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/line6/driver.h b/drivers/staging/line6/driver.h index 9dd8ff4..7770635 100644 --- a/drivers/staging/line6/driver.h +++ b/drivers/staging/line6/driver.h @@ -20,7 +20,7 @@ #define DRIVER_NAME "line6usb" -#if defined(CONFIG_LINE6_USB_DUMP_CTRL) || defined(CONFIG_LINE6_USB_DUMP_MIDI) || defined(CONFIG_LINE6_USB_DUMP_PCM) +#if defined(CONFIG_LINE6_USB_DUMP_MIDI) || defined(CONFIG_LINE6_USB_DUMP_PCM) #define CONFIG_LINE6_USB_DUMP_ANY #endif -- 1.8.0 |
From: Stefan H. <ste...@gm...> - 2012-11-14 07:51:06
|
CONFIG_LINE6_USB_DUMP_MIDI is no longer used by the code and therefore no longer plays a role in CONFIG_LINE6_USB_DUMP_ANY. Signed-off-by: Stefan Hajnoczi <ste...@gm...> --- drivers/staging/line6/driver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/line6/driver.h b/drivers/staging/line6/driver.h index 7770635..f0be5a2 100644 --- a/drivers/staging/line6/driver.h +++ b/drivers/staging/line6/driver.h @@ -20,7 +20,7 @@ #define DRIVER_NAME "line6usb" -#if defined(CONFIG_LINE6_USB_DUMP_MIDI) || defined(CONFIG_LINE6_USB_DUMP_PCM) +#if defined(CONFIG_LINE6_USB_DUMP_PCM) #define CONFIG_LINE6_USB_DUMP_ANY #endif -- 1.8.0 |
From: Stefan H. <ste...@gm...> - 2012-11-14 07:51:03
|
The line6 driver has compile-time options for dumping USB and MIDI data. This functionality has been superceded by usbmon and amidi/aseqdump. These mechanisms can be enabled at run-time and have other features not in the line6 dumping code. Therefore it's time to drop the driver-specific dumping code as part of the effort to clean up the driver and get it out of staging. Stefan Hajnoczi (6): staging: line6: drop control URB dumping code staging: line6: drop CONTROL from CONFIG_LINE6_USB_DUMP_ANY staging: line6: drop unused CONFIG_LINE6_USB_DUMP_CTRL staging: line6: drop MIDI dumping code staging: line6: drop MIDI from CONFIG_LINE6_USB_DUMP_ANY staging: line6: drop unused CONFIG_LINE6_USB_DUMP_MIDI drivers/staging/line6/Kconfig | 18 ------------------ drivers/staging/line6/driver.c | 39 --------------------------------------- drivers/staging/line6/driver.h | 2 +- drivers/staging/line6/midi.c | 6 ------ 4 files changed, 1 insertion(+), 64 deletions(-) -- 1.8.0 |
From: Stefan H. <ste...@gm...> - 2012-11-14 07:45:37
|
I have begun cleaning up the staging driver so it can be merged by the ALSA maintainers. The first level of cleanups is to satisfy checkpatch.pl. These are mostly trivial changes and don't require much discussion. Next I've begun trimming redundant code. Some of the debugging Kconfig options appear to be superceded by generic dumping tools like dyndbg, usbmon, amidi/aseqdump so I am sending patches to drop them. If you feel they should be kept please respond to the patches. The real issue is what to do with all the sysfs attributes. They cannot be merged without further work, but I feel it is a mistake to have them in the first place: The sysfs attributes involve MIDI commands and some state. If we leave this to userspace then the kernel driver can focus on PCM and MIDI I/O. The code will become much smaller and simpler because we can drop all the peeking into MIDI buffers and the housekeeping that goes along with that. Letting userspace handle MIDI means that line6linux development becomes accessible to a wider group of developers - people not comfortable with C or driver hacking. It encourages people to explore their devices and contribute code. That said, I don't want to break the userspace tools that you have written. Can you point me to userspace tools that would need to be fixed before we drop sysfs attributes? Stefan |
From: Stefan H. <ste...@gm...> - 2012-11-14 07:31:19
|
The purpose of CONFIG_LINE6_USB_RAW is not clear to me: Say Y here to create special files which allow to send raw data to the device. This bypasses any sanity checks, so if you discover the code to erase the firmware, feel free to render your device useless, but only after reading the GPL section "NO WARRANTY" In practice the only sanity checks we seem to bypass are the transfer mask (which MIDI channel to transmit on). If this is the only difference then I think we should drop this sysfs attribute. Users can set midi_mask_transmit to 0xf if they want "raw" access. Did I miss something? Stefan |
From: Markus G. <gr...@ic...> - 2012-11-11 20:17:06
|
On Wednesday 07 November 2012 17:00:33 L. Alberto Giménez wrote: > El 07/11/2012 10:17, Stefan Hajnoczi escribió: > > Let's not get sidetracked worrying about svn/git etc. This hopefully > > won't be a long effort involving patches from a lot of people - and no > > need for a public repo. > > Totally agree. But just one question: how do you coordinante changes and > patches between your linux.git clone and Markus' svn repository? Do you > just trade patches between them? I'm just being curious. There is a subversion branch which is automatically synchronized with linux- next once a day, and occasionally I review the changes and merge them into the subversion trunk. Since both versions are basically identical, this is not much work. Kind regards, Markus -- Markus Grabner Institute for Computer Graphics and Vision Graz University of Technology, Inffeldgasse 16a/II, 8010 Graz, Austria WWW: http://www.icg.tugraz.at/Members/grabner |
From: Markus G. <gr...@ic...> - 2012-11-11 20:14:35
|
On Wednesday 07 November 2012 09:23:29 L. Alberto Giménez wrote: > El 07/11/2012 9:03, Stefan Hajnoczi escribió: > > On Tue, Nov 6, 2012 at 10:10 PM, Markus Grabner <gr...@ic...> wrote: > >> Am Samstag, 3. November 2012, 00:06:56 schrieb Stefan Hajnoczi: > >> > >> Since I'm quite busy at the moment, it's absoutely fine for me if you > >> make the request. I reviewed and applied your latest changes to my > >> working copy and didn't notice any problem. As far as stability is > >> concerned, I think the driver is ready to enter the kernel main line. I > >> can't contribute much to a cleanup, though, since I'm not too familiar > >> with kernel policies (everything which compiles & works is fine for me > >> :-). > > Well, usually the people that know about the particular subsystem (ALSA, > USB, ...) will point on the right direction regarding APIs or policies. > > >> Since there are already several branches in the subversion repository > >> https://line6linux.svn.sourceforge.net/svnroot/line6linux/driver, I > >> suggest to create a cleanup branch there if necessary before moving the > >> driver to the main line (I am aware that many people prefer git, but > >> using too many repositories for the same piece of software is getting > >> tedious). What do you think? > > It's OK for me, but I would suggest to use git, since it will be easier > for us to contribute, and easier to interact with the kernel guys. If the cleanup can be done in linux-next, that's also fine for, I just don't want to open a third repository for the same thing. Kind regards, Markus -- Markus Grabner Institute for Computer Graphics and Vision Graz University of Technology, Inffeldgasse 16a/II, 8010 Graz, Austria WWW: http://www.icg.tugraz.at/Members/grabner |
From: Markus G. <gr...@ic...> - 2012-11-11 20:11:47
|
On Wednesday 07 November 2012 09:03:41 you wrote: > On Tue, Nov 6, 2012 at 10:10 PM, Markus Grabner <gr...@ic...> wrote: > > Since there are already several branches in the subversion repository > > https://line6linux.svn.sourceforge.net/svnroot/line6linux/driver, I > > suggest to create a cleanup branch there if necessary before moving the > > driver to the main line (I am aware that many people prefer git, but > > using too many repositories for the same piece of software is getting > > tedious). What do you think? > > Is there any code in svn which needs to get into linux.git? No, besides the actual driver, whcih is identical with the linux-next version, there is only experimental driver code in several branches, and (also experimental) user-space code, none of which is relevant for linux.git. Kind regards, Markus -- Markus Grabner Institute for Computer Graphics and Vision Graz University of Technology, Inffeldgasse 16a/II, 8010 Graz, Austria WWW: http://www.icg.tugraz.at/Members/grabner |
From: Stefan H. <ste...@gm...> - 2012-11-11 12:54:20
|
On Sun, Nov 11, 2012 at 1:52 PM, Stefan Hajnoczi <ste...@gm...> wrote: > Daniel Mack <zo...@gm...> suggested the dyndbg mechanism which allows > dev_dbg() messages to be enabled/disabled at run-time. This is more powerful > than the compile-time CONFIG_LINE6_USB_DEBUG option. > > This patch series converts debug messages to dev_dbg() and drops the obsolete > CONFIG_LINE6_USB_DEBUG option. > > Stefan Hajnoczi (3): > staging: line6: replace DEBUG_MESSAGES() with dev_dbg() > staging: line6: drop unused DEBUG_MESSAGES() macro > staging: line6: drop unused CONFIG_LINE6_USB_DEBUG > > drivers/staging/line6/Kconfig | 8 ------ > drivers/staging/line6/driver.c | 6 ++--- > drivers/staging/line6/driver.h | 6 ----- > drivers/staging/line6/pod.c | 57 ++++++++++++++++-------------------------- > drivers/staging/line6/variax.c | 12 ++++----- > 5 files changed, 28 insertions(+), 61 deletions(-) I forgot to mention these patches apply on top of the "staging: line6: checkpatch.pl cleanups" series I sent earlier today. Stefan |
From: Stefan H. <ste...@gm...> - 2012-11-11 12:52:55
|
The CONFIG_LINE6_USB_DEBUG option is no longer relevant since dyndbg dev_dbg() is now used instead of a compile-time decision whether to enable debug messages or not. Signed-off-by: Stefan Hajnoczi <ste...@gm...> --- drivers/staging/line6/Kconfig | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/staging/line6/Kconfig b/drivers/staging/line6/Kconfig index 43120ff..a5ded12 100644 --- a/drivers/staging/line6/Kconfig +++ b/drivers/staging/line6/Kconfig @@ -23,14 +23,6 @@ menuconfig LINE6_USB if LINE6_USB -config LINE6_USB_DEBUG - bool "print debug messages" - default n - help - Say Y here to write debug messages to the syslog. - - If unsure, say N. - config LINE6_USB_DUMP_CTRL bool "dump control messages" default n -- 1.7.12.1 |
From: Stefan H. <ste...@gm...> - 2012-11-11 12:52:54
|
The DEBUG_MESSAGES() macro is no longer needed since dev_dbg() is now used for debug messages. Signed-off-by: Stefan Hajnoczi <ste...@gm...> --- drivers/staging/line6/driver.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/staging/line6/driver.h b/drivers/staging/line6/driver.h index 35246cf..9dd8ff4 100644 --- a/drivers/staging/line6/driver.h +++ b/drivers/staging/line6/driver.h @@ -52,12 +52,6 @@ #define LINE6_CHANNEL_MASK 0x0f -#ifdef CONFIG_LINE6_USB_DEBUG -#define DEBUG_MESSAGES(x) (x) -#else -#define DEBUG_MESSAGES(x) -#endif - #define MISSING_CASE \ printk(KERN_ERR "line6usb driver bug: missing case in %s:%d\n", \ __FILE__, __LINE__) -- 1.7.12.1 |
From: Stefan H. <ste...@gm...> - 2012-11-11 12:52:52
|
The dyndbg feature allows dev_dbg() calls to be enabled/disabled at runtime and is therefore more convenient than static debug log messages. Use dev_dbg() instead of the line6-specific DEBUG_MESSAGES() macro. Signed-off-by: Stefan Hajnoczi <ste...@gm...> --- drivers/staging/line6/driver.c | 6 ++--- drivers/staging/line6/pod.c | 57 ++++++++++++++++-------------------------- drivers/staging/line6/variax.c | 12 ++++----- 3 files changed, 28 insertions(+), 47 deletions(-) diff --git a/drivers/staging/line6/driver.c b/drivers/staging/line6/driver.c index ac11a3b..571f2ce 100644 --- a/drivers/staging/line6/driver.c +++ b/drivers/staging/line6/driver.c @@ -412,10 +412,8 @@ static void line6_data_received(struct urb *urb) if (done < urb->actual_length) { line6_midibuf_ignore(mb, done); - DEBUG_MESSAGES(dev_err - (line6->ifcdev, - "%d %d buffer overflow - message skipped\n", - done, urb->actual_length)); + dev_dbg(line6->ifcdev, "%d %d buffer overflow - message skipped\n", + done, urb->actual_length); } for (;;) { diff --git a/drivers/staging/line6/pod.c b/drivers/staging/line6/pod.c index 9edd053..4a86f7a 100644 --- a/drivers/staging/line6/pod.c +++ b/drivers/staging/line6/pod.c @@ -252,25 +252,19 @@ void line6_pod_process_message(struct usb_line6_pod *pod) break; default: - DEBUG_MESSAGES(dev_err - (pod-> - line6.ifcdev, - "unknown dump code %02X\n", - pod-> - dumpreq.in_progress)); + dev_dbg(pod->line6.ifcdev, + "unknown dump code %02X\n", + pod->dumpreq.in_progress); } line6_dump_finished(&pod->dumpreq); pod_startup3(pod); } else - DEBUG_MESSAGES(dev_err - (pod->line6.ifcdev, - "wrong size of channel dump message (%d instead of %d)\n", - pod-> - line6.message_length, - (int) - sizeof(pod->prog_data) + - 7)); + dev_dbg(pod->line6.ifcdev, + "wrong size of channel dump message (%d instead of %d)\n", + pod->line6.message_length, + (int)sizeof(pod->prog_data) + + 7); break; @@ -302,11 +296,9 @@ void line6_pod_process_message(struct usb_line6_pod *pod) #undef PROCESS_SYSTEM_PARAM default: - DEBUG_MESSAGES(dev_err - (pod-> - line6.ifcdev, - "unknown tuner/system response %02X\n", - buf[6])); + dev_dbg(pod->line6.ifcdev, + "unknown tuner/system response %02X\n", + buf[6]); } break; @@ -321,25 +313,21 @@ void line6_pod_process_message(struct usb_line6_pod *pod) break; case POD_SYSEX_CLIP: - DEBUG_MESSAGES(dev_err - (pod->line6.ifcdev, - "audio clipped\n")); + dev_dbg(pod->line6.ifcdev, "audio clipped\n"); pod->clipping.value = 1; wake_up(&pod->clipping.wait); break; case POD_SYSEX_STORE: - DEBUG_MESSAGES(dev_err - (pod->line6.ifcdev, - "message %02X not yet implemented\n", - buf[5])); + dev_dbg(pod->line6.ifcdev, + "message %02X not yet implemented\n", + buf[5]); break; default: - DEBUG_MESSAGES(dev_err - (pod->line6.ifcdev, - "unknown sysex message %02X\n", - buf[5])); + dev_dbg(pod->line6.ifcdev, + "unknown sysex message %02X\n", + buf[5]); } } else if (memcmp @@ -352,9 +340,7 @@ void line6_pod_process_message(struct usb_line6_pod *pod) buf[10]; pod_startup4(pod); } else - DEBUG_MESSAGES(dev_err - (pod->line6.ifcdev, - "unknown sysex header\n")); + dev_dbg(pod->line6.ifcdev, "unknown sysex header\n"); break; @@ -362,9 +348,8 @@ void line6_pod_process_message(struct usb_line6_pod *pod) break; default: - DEBUG_MESSAGES(dev_err - (pod->line6.ifcdev, - "POD: unknown message %02X\n", buf[0])); + dev_dbg(pod->line6.ifcdev, "POD: unknown message %02X\n", + buf[0]); } } diff --git a/drivers/staging/line6/variax.c b/drivers/staging/line6/variax.c index 1b85ecc..8df529f 100644 --- a/drivers/staging/line6/variax.c +++ b/drivers/staging/line6/variax.c @@ -262,10 +262,9 @@ void line6_variax_process_message(struct usb_line6_variax *variax) 2, VARIAX_DUMP_PASS3); } } else { - DEBUG_MESSAGES(dev_err - (variax->line6.ifcdev, - "illegal length %d of model data\n", - variax->line6.message_length)); + dev_dbg(variax->line6.ifcdev, + "illegal length %d of model data\n", + variax->line6.message_length); line6_dump_finished(&variax->dumpreq); } } else if (memcmp(buf + 1, variax_request_bank + 1, @@ -295,9 +294,8 @@ void line6_variax_process_message(struct usb_line6_variax *variax) break; default: - DEBUG_MESSAGES(dev_err - (variax->line6.ifcdev, - "Variax: unknown message %02X\n", buf[0])); + dev_dbg(variax->line6.ifcdev, + "Variax: unknown message %02X\n", buf[0]); } } -- 1.7.12.1 |
From: Stefan H. <ste...@gm...> - 2012-11-11 12:52:50
|
Daniel Mack <zo...@gm...> suggested the dyndbg mechanism which allows dev_dbg() messages to be enabled/disabled at run-time. This is more powerful than the compile-time CONFIG_LINE6_USB_DEBUG option. This patch series converts debug messages to dev_dbg() and drops the obsolete CONFIG_LINE6_USB_DEBUG option. Stefan Hajnoczi (3): staging: line6: replace DEBUG_MESSAGES() with dev_dbg() staging: line6: drop unused DEBUG_MESSAGES() macro staging: line6: drop unused CONFIG_LINE6_USB_DEBUG drivers/staging/line6/Kconfig | 8 ------ drivers/staging/line6/driver.c | 6 ++--- drivers/staging/line6/driver.h | 6 ----- drivers/staging/line6/pod.c | 57 ++++++++++++++++-------------------------- drivers/staging/line6/variax.c | 12 ++++----- 5 files changed, 28 insertions(+), 61 deletions(-) -- 1.7.12.1 |
From: Stefan H. <ste...@gm...> - 2012-11-11 12:25:14
|
Signed-off-by: Stefan Hajnoczi <ste...@gm...> --- drivers/staging/line6/variax.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/line6/variax.c b/drivers/staging/line6/variax.c index f97416b..1b85ecc 100644 --- a/drivers/staging/line6/variax.c +++ b/drivers/staging/line6/variax.c @@ -160,7 +160,9 @@ static void variax_startup5(unsigned long data) /* current model dump: */ line6_dump_request_async(&variax->dumpreq, &variax->line6, 0, VARIAX_DUMP_PASS1); - /* passes 2 and 3 are performed implicitly before entering variax_startup6 */ + /* passes 2 and 3 are performed implicitly before entering + * variax_startup6. + */ } static void variax_startup6(struct usb_line6_variax *variax) -- 1.7.12.1 |
From: Stefan H. <ste...@gm...> - 2012-11-11 12:25:12
|
Signed-off-by: Stefan Hajnoczi <ste...@gm...> --- drivers/staging/line6/usbdefs.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/staging/line6/usbdefs.h b/drivers/staging/line6/usbdefs.h index 353d59d..43eb540 100644 --- a/drivers/staging/line6/usbdefs.h +++ b/drivers/staging/line6/usbdefs.h @@ -83,11 +83,15 @@ enum { LINE6_BIT(VARIAX), LINE6_BITS_PRO = LINE6_BIT_BASSPODXTPRO | LINE6_BIT_PODXTPRO, - LINE6_BITS_LIVE = LINE6_BIT_BASSPODXTLIVE | LINE6_BIT_PODXTLIVE | LINE6_BIT_PODX3LIVE, - LINE6_BITS_PODXTALL = LINE6_BIT_PODXT | LINE6_BIT_PODXTLIVE | LINE6_BIT_PODXTPRO, + LINE6_BITS_LIVE = LINE6_BIT_BASSPODXTLIVE | LINE6_BIT_PODXTLIVE | + LINE6_BIT_PODX3LIVE, + LINE6_BITS_PODXTALL = LINE6_BIT_PODXT | LINE6_BIT_PODXTLIVE | + LINE6_BIT_PODXTPRO, LINE6_BITS_PODX3ALL = LINE6_BIT_PODX3 | LINE6_BIT_PODX3LIVE, LINE6_BITS_PODHDALL = LINE6_BIT_PODHD300 | LINE6_BIT_PODHD500, - LINE6_BITS_BASSPODXTALL = LINE6_BIT_BASSPODXT | LINE6_BIT_BASSPODXTLIVE | LINE6_BIT_BASSPODXTPRO + LINE6_BITS_BASSPODXTALL = LINE6_BIT_BASSPODXT | + LINE6_BIT_BASSPODXTLIVE | + LINE6_BIT_BASSPODXTPRO }; /* device supports settings parameter via USB */ -- 1.7.12.1 |
From: Stefan H. <ste...@gm...> - 2012-11-11 12:25:10
|
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 <ste...@gm...> --- drivers/staging/line6/toneport.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/line6/toneport.c b/drivers/staging/line6/toneport.c index 31b624b..a529dd3 100644 --- a/drivers/staging/line6/toneport.c +++ b/drivers/staging/line6/toneport.c @@ -127,13 +127,11 @@ static ssize_t toneport_set_led_red(struct device *dev, const char *buf, size_t count) { int retval; - long value; - retval = strict_strtol(buf, 10, &value); + retval = kstrtoint(buf, 10, &led_red); if (retval) return retval; - led_red = value; toneport_update_led(dev); return count; } @@ -143,13 +141,11 @@ static ssize_t toneport_set_led_green(struct device *dev, const char *buf, size_t count) { int retval; - long value; - retval = strict_strtol(buf, 10, &value); + retval = kstrtoint(buf, 10, &led_green); if (retval) return retval; - led_green = value; toneport_update_led(dev); return count; } -- 1.7.12.1 |
From: Stefan H. <ste...@gm...> - 2012-11-11 12:25:10
|
Checkpatch warns when quoted strings are split across lines. The rationale is that quoted strings should be left on a single line so that grep works. (The 80 character line limit does not apply to quoted strings.) Signed-off-by: Stefan Hajnoczi <ste...@gm...> --- drivers/staging/line6/midibuf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/line6/midibuf.c b/drivers/staging/line6/midibuf.c index 836e8c8..968e0de 100644 --- a/drivers/staging/line6/midibuf.c +++ b/drivers/staging/line6/midibuf.c @@ -64,9 +64,9 @@ int line6_midibuf_init(struct MidiBuffer *this, int size, int split) void line6_midibuf_status(struct MidiBuffer *this) { - pr_debug("midibuf size=%d split=%d pos_read=%d pos_write=%d " - "full=%d command_prev=%02x\n", this->size, this->split, - this->pos_read, this->pos_write, this->full, this->command_prev); + pr_debug("midibuf size=%d split=%d pos_read=%d pos_write=%d full=%d command_prev=%02x\n", + this->size, this->split, this->pos_read, this->pos_write, + this->full, this->command_prev); } int line6_midibuf_bytes_free(struct MidiBuffer *this) -- 1.7.12.1 |
From: Stefan H. <ste...@gm...> - 2012-11-11 12:25:09
|
There are a few instances of 80+ character lines in playback.c. Two instances are just because of a useless comment "this is somewhat paranoid", so drop the comment. Other instances are straightforward line wrapping. Signed-off-by: Stefan Hajnoczi <ste...@gm...> --- drivers/staging/line6/playback.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/staging/line6/playback.c b/drivers/staging/line6/playback.c index a0ab9d0..4cf23af 100644 --- a/drivers/staging/line6/playback.c +++ b/drivers/staging/line6/playback.c @@ -185,7 +185,7 @@ static int submit_audio_out_urb(struct snd_line6_pcm *line6pcm) if (urb_size == 0) { /* can't determine URB size */ spin_unlock_irqrestore(&line6pcm->lock_audio_out, flags); - dev_err(line6pcm->line6->ifcdev, "driver bug: urb_size = 0\n"); /* this is somewhat paranoid */ + dev_err(line6pcm->line6->ifcdev, "driver bug: urb_size = 0\n"); return -EINVAL; } @@ -218,7 +218,8 @@ static int submit_audio_out_urb(struct snd_line6_pcm *line6pcm) len * bytes_per_frame, runtime->dma_area, (urb_frames - len) * bytes_per_frame); } else - dev_err(line6pcm->line6->ifcdev, "driver bug: len = %d\n", len); /* this is somewhat paranoid */ + dev_err(line6pcm->line6->ifcdev, "driver bug: len = %d\n", + len); } else { memcpy(urb_out->transfer_buffer, runtime->dma_area + @@ -319,7 +320,8 @@ void line6_unlink_audio_out_urbs(struct snd_line6_pcm *line6pcm) } /* - Wait until unlinking of all currently active playback URBs has been finished. + Wait until unlinking of all currently active playback URBs has been + finished. */ void line6_wait_clear_audio_out_urbs(struct snd_line6_pcm *line6pcm) { @@ -413,7 +415,8 @@ static void audio_out_callback(struct urb *urb) if (!shutdown) { submit_audio_out_urb(line6pcm); - if (test_bit(LINE6_INDEX_PCM_ALSA_PLAYBACK_STREAM, &line6pcm->flags)) { + if (test_bit(LINE6_INDEX_PCM_ALSA_PLAYBACK_STREAM, + &line6pcm->flags)) { line6pcm->bytes_out += length; if (line6pcm->bytes_out >= line6pcm->period_out) { line6pcm->bytes_out %= line6pcm->period_out; @@ -499,7 +502,8 @@ int snd_line6_playback_trigger(struct snd_line6_pcm *line6pcm, int cmd) #ifdef CONFIG_PM case SNDRV_PCM_TRIGGER_RESUME: #endif - err = line6_pcm_acquire(line6pcm, LINE6_BIT_PCM_ALSA_PLAYBACK_STREAM); + err = line6_pcm_acquire(line6pcm, + LINE6_BIT_PCM_ALSA_PLAYBACK_STREAM); if (err < 0) return err; @@ -510,7 +514,8 @@ int snd_line6_playback_trigger(struct snd_line6_pcm *line6pcm, int cmd) #ifdef CONFIG_PM case SNDRV_PCM_TRIGGER_SUSPEND: #endif - err = line6_pcm_release(line6pcm, LINE6_BIT_PCM_ALSA_PLAYBACK_STREAM); + err = line6_pcm_release(line6pcm, + LINE6_BIT_PCM_ALSA_PLAYBACK_STREAM); if (err < 0) return err; -- 1.7.12.1 |
From: Stefan H. <ste...@gm...> - 2012-11-11 12:25:08
|
Signed-off-by: Stefan Hajnoczi <ste...@gm...> --- drivers/staging/line6/capture.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/staging/line6/capture.c b/drivers/staging/line6/capture.c index c85c5b6..389c41f 100644 --- a/drivers/staging/line6/capture.c +++ b/drivers/staging/line6/capture.c @@ -256,8 +256,8 @@ static void audio_in_callback(struct urb *urb) #ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE if (!(line6pcm->flags & LINE6_BITS_PCM_IMPULSE)) #endif - if (test_bit(LINE6_INDEX_PCM_ALSA_CAPTURE_STREAM, &line6pcm->flags) - && (fsize > 0)) + if (test_bit(LINE6_INDEX_PCM_ALSA_CAPTURE_STREAM, + &line6pcm->flags) && (fsize > 0)) line6_capture_copy(line6pcm, fbuf, fsize); } @@ -274,7 +274,8 @@ static void audio_in_callback(struct urb *urb) #ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE if (!(line6pcm->flags & LINE6_BITS_PCM_IMPULSE)) #endif - if (test_bit(LINE6_INDEX_PCM_ALSA_CAPTURE_STREAM, &line6pcm->flags)) + if (test_bit(LINE6_INDEX_PCM_ALSA_CAPTURE_STREAM, + &line6pcm->flags)) line6_capture_check_period(line6pcm, length); } } @@ -356,7 +357,8 @@ int snd_line6_capture_trigger(struct snd_line6_pcm *line6pcm, int cmd) #ifdef CONFIG_PM case SNDRV_PCM_TRIGGER_RESUME: #endif - err = line6_pcm_acquire(line6pcm, LINE6_BIT_PCM_ALSA_CAPTURE_STREAM); + err = line6_pcm_acquire(line6pcm, + LINE6_BIT_PCM_ALSA_CAPTURE_STREAM); if (err < 0) return err; @@ -367,7 +369,8 @@ int snd_line6_capture_trigger(struct snd_line6_pcm *line6pcm, int cmd) #ifdef CONFIG_PM case SNDRV_PCM_TRIGGER_SUSPEND: #endif - err = line6_pcm_release(line6pcm, LINE6_BIT_PCM_ALSA_CAPTURE_STREAM); + err = line6_pcm_release(line6pcm, + LINE6_BIT_PCM_ALSA_CAPTURE_STREAM); if (err < 0) return err; -- 1.7.12.1 |
From: Stefan H. <ste...@gm...> - 2012-11-11 12:25:07
|
Signed-off-by: Stefan Hajnoczi <ste...@gm...> --- drivers/staging/line6/pcm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/line6/pcm.h b/drivers/staging/line6/pcm.h index 5210ec8..6aa0d46 100644 --- a/drivers/staging/line6/pcm.h +++ b/drivers/staging/line6/pcm.h @@ -167,7 +167,7 @@ enum { #endif LINE6_BIT_PCM_ALSA_CAPTURE_STREAM | LINE6_BIT_PCM_MONITOR_CAPTURE_STREAM, - + LINE6_BITS_STREAM = LINE6_BITS_PLAYBACK_STREAM | LINE6_BITS_CAPTURE_STREAM -- 1.7.12.1 |
From: Stefan H. <ste...@gm...> - 2012-11-11 12:25:05
|
Signed-off-by: Stefan Hajnoczi <ste...@gm...> --- drivers/staging/line6/pcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/line6/pcm.c b/drivers/staging/line6/pcm.c index 7fe44a6..6c1e313 100644 --- a/drivers/staging/line6/pcm.c +++ b/drivers/staging/line6/pcm.c @@ -109,7 +109,7 @@ int line6_pcm_acquire(struct snd_line6_pcm *line6pcm, int channels) line6pcm->prev_fbuf = NULL; if (test_flags(flags_old, flags_new, LINE6_BITS_CAPTURE_BUFFER)) { - /* We may be invoked multiple times in a row so allocate once only */ + /* Invoked multiple times in a row so allocate once only */ if (!line6pcm->buffer_in) { line6pcm->buffer_in = kmalloc(LINE6_ISO_BUFFERS * LINE6_ISO_PACKETS * @@ -148,7 +148,7 @@ int line6_pcm_acquire(struct snd_line6_pcm *line6pcm, int channels) } if (test_flags(flags_old, flags_new, LINE6_BITS_PLAYBACK_BUFFER)) { - /* We may be invoked multiple times in a row so allocate once only */ + /* Invoked multiple times in a row so allocate once only */ if (!line6pcm->buffer_out) { line6pcm->buffer_out = kmalloc(LINE6_ISO_BUFFERS * LINE6_ISO_PACKETS * -- 1.7.12.1 |
From: Stefan H. <ste...@gm...> - 2012-11-11 12:25:04
|
This series addresses a number of checkpatch.pl warnings, mostly exceeding the 80 character line limit. Some checkpatch.pl warnings remain in the line6 driver but they are either more difficult to resolve or I intend to drop that code entirely. So expect a little more time before the driver passes checkpatch.pl completely. Stefan Hajnoczi (8): staging: line6: wrap >80 char lines in capture.c staging: line6: fix quoted string across lines in midibuf.c staging: line6: shorten comment below 80 chars in pcm.c staging: line6: drop trailing whitespace in pcm.h staging: line6: wrap lines to 80 chars in playback.c staging: line6: replace deprecated strict_strtol() in toneport.c staging: line6: wrap lines to 80 chars in usbdefs.h staging: line6: wrap comment to 80 chars in variax.c drivers/staging/line6/capture.c | 13 ++++++++----- drivers/staging/line6/midibuf.c | 6 +++--- drivers/staging/line6/pcm.c | 4 ++-- drivers/staging/line6/pcm.h | 2 +- drivers/staging/line6/playback.c | 17 +++++++++++------ drivers/staging/line6/toneport.c | 8 ++------ drivers/staging/line6/usbdefs.h | 10 +++++++--- drivers/staging/line6/variax.c | 4 +++- 8 files changed, 37 insertions(+), 27 deletions(-) -- 1.7.12.1 |
From: Stefan H. <ste...@gm...> - 2012-11-11 11:29:33
|
On Sat, Nov 10, 2012 at 1:55 PM, Daniel Mack <zo...@gm...> wrote: > Hi, > > On 10.11.2012 07:44, Stefan Hajnoczi wrote: >> The line6 driver supports devices from the Line6 PODxt, POD HD, >> TonePort, and Variax product families. This USB sound driver has been >> in staging since 2009 and is ready for wider review and users. > > Thanks a lot for working on this! However, just moving over the current > code does not seem sufficient. > > Alone, script/checkpatch.pl gives me > > total: 9234 errors, 158 warnings, 9233 lines checked > > including DOS line feeds, broken indentation and other style issues. I > think at least most of them need to be fixed. Thanks for the response and sorry I forgot to check this. Stefan |
From: Greg Kroah-H. <gr...@li...> - 2012-11-11 05:23:02
|
On Sat, Nov 10, 2012 at 07:44:52AM +0100, Stefan Hajnoczi wrote: > The line6 driver supports devices from the Line6 PODxt, POD HD, > TonePort, and Variax product families. This USB sound driver has been > in staging since 2009 and is ready for wider review and users. > > These devices provide both PCM and MIDI. Depending on the model the PCM > supports capture and playback - there may be multiple capture sources. > MIDI is used to control the device including changing effect or > amplifier model settings, dumping presets, and changing between patches. > > There are userspace tools and a manual available at: > > http://www.tanzband-scream.at/line6/ > http://line6linux.sourceforge.net/ > > Cc: Markus Grabner <gr...@ic...> > Signed-off-by: Stefan Hajnoczi <ste...@gm...> Please fix all of the coding style issues, and the huge number of undocumented sysfs files before asking to move this out of staging. thanks, greg k-h |
From: Daniel M. <zo...@gm...> - 2012-11-10 12:55:49
|
Hi, On 10.11.2012 07:44, Stefan Hajnoczi wrote: > The line6 driver supports devices from the Line6 PODxt, POD HD, > TonePort, and Variax product families. This USB sound driver has been > in staging since 2009 and is ready for wider review and users. Thanks a lot for working on this! However, just moving over the current code does not seem sufficient. Alone, script/checkpatch.pl gives me total: 9234 errors, 158 warnings, 9233 lines checked including DOS line feeds, broken indentation and other style issues. I think at least most of them need to be fixed. Apart from that, I picked some random places to comment on below, but they by far don't address all issues that need attention. Many of the comments above also apply to other files in that patch with similar problems. Also, I wonder whether the patch could be easier reviewed when split up into mupltiple, smaller ones ... > These devices provide both PCM and MIDI. Depending on the model the PCM > supports capture and playback - there may be multiple capture sources. > MIDI is used to control the device including changing effect or > amplifier model settings, dumping presets, and changing between patches. > > There are userspace tools and a manual available at: > > http://www.tanzband-scream.at/line6/ > http://line6linux.sourceforge.net/ > > Cc: Markus Grabner <gr...@ic...> > Signed-off-by: Stefan Hajnoczi <ste...@gm...> > --- > diff --git a/sound/usb/line6/Kconfig b/sound/usb/line6/Kconfig > new file mode 100644 > index 0000000..43120ff > --- /dev/null > +++ b/sound/usb/line6/Kconfig > @@ -0,0 +1,85 @@ > +menuconfig LINE6_USB > + tristate "Line6 USB support" > + depends on USB && SND > + select SND_RAWMIDI > + select SND_PCM > + help > + This is a 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) > + > + Preliminary support for the Variax Workbench and TonePort > + devices is included. > + > +if LINE6_USB > + > +config LINE6_USB_DEBUG > + bool "print debug messages" > + default n > + help > + Say Y here to write debug messages to the syslog. > + > + If unsure, say N. > + > +config LINE6_USB_DUMP_CTRL > + bool "dump control messages" > + default n > + help > + Say Y here to write control messages sent to and received from > + Line6 devices to the syslog. > + > + If unsure, say N. > + > +config LINE6_USB_DUMP_MIDI > + bool "dump MIDI messages" > + default n > + help > + Say Y here to write MIDI messages sent to and received from > + Line6 devices to the syslog. > + > + If unsure, say N. > + > +config LINE6_USB_DUMP_PCM > + bool "dump PCM data" > + default n > + help > + Say Y here to write PCM data sent to and received from Line6 > + devices to the syslog. This will produce a huge amount of > + syslog data during playback and capture. > + > + If unsure, say N. I think all such debug things should be realized with dynamic kernel debugging features (see Documentation/dynamic-debug-howto.txt). > + > +config LINE6_USB_RAW > + bool "raw data communication" > + default n > + help > + Say Y here to create special files which allow to send raw data > + to the device. This bypasses any sanity checks, so if you discover > + the code to erase the firmware, feel free to render your device > + useless, but only after reading the GPL section "NO WARRANTY". > + > + If unsure, say N. > + > +config LINE6_USB_IMPULSE_RESPONSE > + bool "measure impulse response" > + default n > + help > + Say Y here to add code to measure the impulse response of a Line6 > + device. This is more accurate than user-space methods since it > + bypasses any PCM data buffering (e.g., by ALSA or jack). This is > + useful for assessing the performance of new devices, but is not > + required for normal operation. > + > + If unsure, say N. > + > +endif # LINE6_USB > diff --git a/sound/usb/line6/Makefile b/sound/usb/line6/Makefile > new file mode 100644 > index 0000000..34a2dda > --- /dev/null > +++ b/sound/usb/line6/Makefile > @@ -0,0 +1,16 @@ > +obj-$(CONFIG_LINE6_USB) += line6usb.o > + > +line6usb-y := \ > + audio.o \ > + capture.o \ > + control.o \ > + driver.o \ > + dumprequest.o \ > + midi.o \ > + midibuf.o \ > + pcm.o \ > + playback.o \ > + pod.o \ > + toneport.o \ > + variax.o \ > + podhd.o > diff --git a/sound/usb/line6/audio.c b/sound/usb/line6/audio.c > new file mode 100644 > index 0000000..a92e21f > --- /dev/null > +++ b/sound/usb/line6/audio.c > @@ -0,0 +1,70 @@ > +/* > + * Line6 Linux USB driver - 0.9.1beta > + * > + * Copyright (C) 2004-2010 Markus Grabner (gr...@ic...) > + * > + * This program is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License as > + * published by the Free Software Foundation, version 2. > + * > + */ > + > +#include <sound/core.h> > +#include <sound/initval.h> > +#include <linux/export.h> > + > +#include "driver.h" > +#include "audio.h" > + > +/* > + Initialize the Line6 USB audio system. > +*/ > +int line6_init_audio(struct usb_line6 *line6) > +{ > + struct snd_card *card; > + int err; > + > + err = snd_card_create(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1, > + THIS_MODULE, 0, &card); > + if (err < 0) > + return err; > + > + line6->card = card; > + > + strcpy(card->id, line6->properties->id); > + strcpy(card->driver, DRIVER_NAME); > + strcpy(card->shortname, line6->properties->name); > + /* longname is 80 chars - see asound.h */ > + sprintf(card->longname, "Line6 %s at USB %s", line6->properties->name, > + dev_name(line6->ifcdev)); > + return 0; > +} > + > +/* > + Register the Line6 USB audio system. > +*/ > +int line6_register_audio(struct usb_line6 *line6) > +{ > + int err; > + > + err = snd_card_register(line6->card); > + if (err < 0) > + return err; > + > + return 0; > +} > + > +/* > + Cleanup the Line6 USB audio system. > +*/ > +void line6_cleanup_audio(struct usb_line6 *line6) > +{ > + struct snd_card *card = line6->card; > + > + if (card == NULL) > + return; > + > + snd_card_disconnect(card); > + snd_card_free(card); > + line6->card = NULL; > +} > diff --git a/sound/usb/line6/audio.h b/sound/usb/line6/audio.h > new file mode 100644 > index 0000000..5f8a09a > --- /dev/null > +++ b/sound/usb/line6/audio.h > @@ -0,0 +1,21 @@ > +/* > + * Line6 Linux USB driver - 0.9.1beta > + * > + * Copyright (C) 2004-2010 Markus Grabner (gr...@ic...) > + * > + * This program is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License as > + * published by the Free Software Foundation, version 2. > + * > + */ > + > +#ifndef AUDIO_H > +#define AUDIO_H > + > +#include "driver.h" > + > +extern void line6_cleanup_audio(struct usb_line6 *); > +extern int line6_init_audio(struct usb_line6 *); > +extern int line6_register_audio(struct usb_line6 *); > + > +#endif > diff --git a/sound/usb/line6/capture.c b/sound/usb/line6/capture.c > new file mode 100644 > index 0000000..c85c5b6 > --- /dev/null > +++ b/sound/usb/line6/capture.c > @@ -0,0 +1,435 @@ > +/* > + * Line6 Linux USB driver - 0.9.1beta > + * > + * Copyright (C) 2004-2010 Markus Grabner (gr...@ic...) > + * > + * This program is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License as > + * published by the Free Software Foundation, version 2. > + * > + */ > + > +#include <linux/slab.h> > +#include <sound/core.h> > +#include <sound/pcm.h> > +#include <sound/pcm_params.h> > + > +#include "audio.h" > +#include "capture.h" > +#include "driver.h" > +#include "pcm.h" > +#include "pod.h" > + > +/* > + Find a free URB and submit it. > +*/ > +static int submit_audio_in_urb(struct snd_line6_pcm *line6pcm) > +{ > + int index; > + unsigned long flags; > + int i, urb_size; > + int ret; > + struct urb *urb_in; > + > + spin_lock_irqsave(&line6pcm->lock_audio_in, flags); > + index = > + find_first_zero_bit(&line6pcm->active_urb_in, LINE6_ISO_BUFFERS); > + > + if (index < 0 || index >= LINE6_ISO_BUFFERS) { > + spin_unlock_irqrestore(&line6pcm->lock_audio_in, flags); > + dev_err(line6pcm->line6->ifcdev, "no free URB found\n"); > + return -EINVAL; > + } > + > + urb_in = line6pcm->urb_audio_in[index]; > + urb_size = 0; > + > + for (i = 0; i < LINE6_ISO_PACKETS; ++i) { > + struct usb_iso_packet_descriptor *fin = > + &urb_in->iso_frame_desc[i]; > + fin->offset = urb_size; > + fin->length = line6pcm->max_packet_size; > + urb_size += line6pcm->max_packet_size; > + } > + > + urb_in->transfer_buffer = > + line6pcm->buffer_in + > + index * LINE6_ISO_PACKETS * line6pcm->max_packet_size; > + urb_in->transfer_buffer_length = urb_size; > + urb_in->context = line6pcm; > + > + ret = usb_submit_urb(urb_in, GFP_ATOMIC); > + > + if (ret == 0) > + set_bit(index, &line6pcm->active_urb_in); > + else > + dev_err(line6pcm->line6->ifcdev, > + "URB in #%d submission failed (%d)\n", index, ret); > + > + spin_unlock_irqrestore(&line6pcm->lock_audio_in, flags); > + return 0; > +} > + > +/* > + Submit all currently available capture URBs. > +*/ > +int line6_submit_audio_in_all_urbs(struct snd_line6_pcm *line6pcm) > +{ > + int ret, i; > + > + for (i = 0; i < LINE6_ISO_BUFFERS; ++i) { > + ret = submit_audio_in_urb(line6pcm); > + if (ret < 0) > + return ret; > + } > + > + return 0; > +} > + > +/* > + Unlink all currently active capture URBs. > +*/ > +void line6_unlink_audio_in_urbs(struct snd_line6_pcm *line6pcm) > +{ > + unsigned int i; > + > + for (i = LINE6_ISO_BUFFERS; i--;) { > + if (test_bit(i, &line6pcm->active_urb_in)) { > + if (!test_and_set_bit(i, &line6pcm->unlink_urb_in)) { > + struct urb *u = line6pcm->urb_audio_in[i]; > + usb_unlink_urb(u); > + } > + } > + } > +} > + > +/* > + Wait until unlinking of all currently active capture URBs has been > + finished. > +*/ > +void line6_wait_clear_audio_in_urbs(struct snd_line6_pcm *line6pcm) > +{ > + int timeout = HZ; > + unsigned int i; > + int alive; > + > + do { > + alive = 0; > + for (i = LINE6_ISO_BUFFERS; i--;) { > + if (test_bit(i, &line6pcm->active_urb_in)) > + alive++; > + } > + if (!alive) > + break; > + set_current_state(TASK_UNINTERRUPTIBLE); > + schedule_timeout(1); > + } while (--timeout > 0); > + if (alive) > + snd_printk(KERN_ERR "timeout: still %d active urbs..\n", alive); > +} > + > +/* > + Unlink all currently active capture URBs, and wait for finishing. > +*/ > +void line6_unlink_wait_clear_audio_in_urbs(struct snd_line6_pcm *line6pcm) > +{ > + line6_unlink_audio_in_urbs(line6pcm); > + line6_wait_clear_audio_in_urbs(line6pcm); > +} > + > +/* > + Copy data into ALSA capture buffer. > +*/ > +void line6_capture_copy(struct snd_line6_pcm *line6pcm, char *fbuf, int fsize) > +{ > + struct snd_pcm_substream *substream = > + get_substream(line6pcm, SNDRV_PCM_STREAM_CAPTURE); > + struct snd_pcm_runtime *runtime = substream->runtime; > + const int bytes_per_frame = line6pcm->properties->bytes_per_frame; > + int frames = fsize / bytes_per_frame; > + > + if (runtime == NULL) > + return; > + > + if (line6pcm->pos_in_done + frames > runtime->buffer_size) { > + /* > + The transferred area goes over buffer boundary, > + copy two separate chunks. > + */ > + int len; > + len = runtime->buffer_size - line6pcm->pos_in_done; > + > + if (len > 0) { > + memcpy(runtime->dma_area + > + line6pcm->pos_in_done * bytes_per_frame, fbuf, > + len * bytes_per_frame); > + memcpy(runtime->dma_area, fbuf + len * bytes_per_frame, > + (frames - len) * bytes_per_frame); > + } else { > + /* this is somewhat paranoid */ > + dev_err(line6pcm->line6->ifcdev, > + "driver bug: len = %d\n", len); > + } > + } else { > + /* copy single chunk */ > + memcpy(runtime->dma_area + > + line6pcm->pos_in_done * bytes_per_frame, fbuf, fsize); > + } > + > + line6pcm->pos_in_done += frames; > + if (line6pcm->pos_in_done >= runtime->buffer_size) > + line6pcm->pos_in_done -= runtime->buffer_size; > +} > + > +void line6_capture_check_period(struct snd_line6_pcm *line6pcm, int length) > +{ > + struct snd_pcm_substream *substream = > + get_substream(line6pcm, SNDRV_PCM_STREAM_CAPTURE); > + > + line6pcm->bytes_in += length; > + if (line6pcm->bytes_in >= line6pcm->period_in) { > + line6pcm->bytes_in %= line6pcm->period_in; > + snd_pcm_period_elapsed(substream); > + } > +} > + > +void line6_free_capture_buffer(struct snd_line6_pcm *line6pcm) > +{ > + kfree(line6pcm->buffer_in); > + line6pcm->buffer_in = NULL; > +} > + > +/* > + * Callback for completed capture URB. > + */ > +static void audio_in_callback(struct urb *urb) > +{ > + int i, index, length = 0, shutdown = 0; > + unsigned long flags; > + > + struct snd_line6_pcm *line6pcm = (struct snd_line6_pcm *)urb->context; > + > + line6pcm->last_frame_in = urb->start_frame; > + > + /* find index of URB */ > + for (index = 0; index < LINE6_ISO_BUFFERS; ++index) > + if (urb == line6pcm->urb_audio_in[index]) > + break; > + > +#ifdef CONFIG_LINE6_USB_DUMP_PCM > + for (i = 0; i < LINE6_ISO_PACKETS; ++i) { > + struct usb_iso_packet_descriptor *fout = > + &urb->iso_frame_desc[i]; > + line6_write_hexdump(line6pcm->line6, 'C', > + urb->transfer_buffer + fout->offset, > + fout->length); > + } > +#endif > + > + spin_lock_irqsave(&line6pcm->lock_audio_in, flags); > + > + for (i = 0; i < LINE6_ISO_PACKETS; ++i) { > + char *fbuf; > + int fsize; > + struct usb_iso_packet_descriptor *fin = &urb->iso_frame_desc[i]; > + > + if (fin->status == -EXDEV) { > + shutdown = 1; > + break; > + } > + > + fbuf = urb->transfer_buffer + fin->offset; > + fsize = fin->actual_length; > + > + if (fsize > line6pcm->max_packet_size) { > + dev_err(line6pcm->line6->ifcdev, > + "driver and/or device bug: packet too large (%d > %d)\n", > + fsize, line6pcm->max_packet_size); > + } > + > + length += fsize; > + > + /* the following assumes LINE6_ISO_PACKETS == 1: */ > + line6pcm->prev_fbuf = fbuf; > + line6pcm->prev_fsize = fsize; > + > +#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE > + if (!(line6pcm->flags & LINE6_BITS_PCM_IMPULSE)) > +#endif > + if (test_bit(LINE6_INDEX_PCM_ALSA_CAPTURE_STREAM, &line6pcm->flags) > + && (fsize > 0)) > + line6_capture_copy(line6pcm, fbuf, fsize); > + } > + > + clear_bit(index, &line6pcm->active_urb_in); > + > + if (test_and_clear_bit(index, &line6pcm->unlink_urb_in)) > + shutdown = 1; > + > + spin_unlock_irqrestore(&line6pcm->lock_audio_in, flags); > + > + if (!shutdown) { > + submit_audio_in_urb(line6pcm); > + > +#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE > + if (!(line6pcm->flags & LINE6_BITS_PCM_IMPULSE)) > +#endif > + if (test_bit(LINE6_INDEX_PCM_ALSA_CAPTURE_STREAM, &line6pcm->flags)) > + line6_capture_check_period(line6pcm, length); > + } > +} > + > +/* open capture callback */ > +static int snd_line6_capture_open(struct snd_pcm_substream *substream) > +{ > + int err; > + struct snd_pcm_runtime *runtime = substream->runtime; > + struct snd_line6_pcm *line6pcm = snd_pcm_substream_chip(substream); > + > + err = snd_pcm_hw_constraint_ratdens(runtime, 0, > + SNDRV_PCM_HW_PARAM_RATE, > + (&line6pcm-> > + properties->snd_line6_rates)); > + if (err < 0) > + return err; > + > + runtime->hw = line6pcm->properties->snd_line6_capture_hw; > + return 0; > +} > + > +/* close capture callback */ > +static int snd_line6_capture_close(struct snd_pcm_substream *substream) > +{ > + return 0; > +} > + > +/* hw_params capture callback */ > +static int snd_line6_capture_hw_params(struct snd_pcm_substream *substream, > + struct snd_pcm_hw_params *hw_params) > +{ > + int ret; > + struct snd_line6_pcm *line6pcm = snd_pcm_substream_chip(substream); > + > + /* -- Florian Demski [FD] */ > + /* don't ask me why, but this fixes the bug on my machine */ > + if (line6pcm == NULL) { > + if (substream->pcm == NULL) > + return -ENOMEM; > + if (substream->pcm->private_data == NULL) > + return -ENOMEM; > + substream->private_data = substream->pcm->private_data; > + line6pcm = snd_pcm_substream_chip(substream); > + } > + /* -- [FD] end */ > + > + ret = line6_pcm_acquire(line6pcm, LINE6_BIT_PCM_ALSA_CAPTURE_BUFFER); > + > + if (ret < 0) > + return ret; > + > + ret = snd_pcm_lib_malloc_pages(substream, > + params_buffer_bytes(hw_params)); > + if (ret < 0) { > + line6_pcm_release(line6pcm, LINE6_BIT_PCM_ALSA_CAPTURE_BUFFER); > + return ret; > + } > + > + line6pcm->period_in = params_period_bytes(hw_params); > + return 0; > +} > + > +/* hw_free capture callback */ > +static int snd_line6_capture_hw_free(struct snd_pcm_substream *substream) > +{ > + struct snd_line6_pcm *line6pcm = snd_pcm_substream_chip(substream); > + line6_pcm_release(line6pcm, LINE6_BIT_PCM_ALSA_CAPTURE_BUFFER); > + return snd_pcm_lib_free_pages(substream); > +} > + > +/* trigger callback */ > +int snd_line6_capture_trigger(struct snd_line6_pcm *line6pcm, int cmd) > +{ > + int err; > + > + switch (cmd) { > + case SNDRV_PCM_TRIGGER_START: > +#ifdef CONFIG_PM > + case SNDRV_PCM_TRIGGER_RESUME: > +#endif > + err = line6_pcm_acquire(line6pcm, LINE6_BIT_PCM_ALSA_CAPTURE_STREAM); > + > + if (err < 0) > + return err; > + > + break; > + > + case SNDRV_PCM_TRIGGER_STOP: > +#ifdef CONFIG_PM > + case SNDRV_PCM_TRIGGER_SUSPEND: > +#endif > + err = line6_pcm_release(line6pcm, LINE6_BIT_PCM_ALSA_CAPTURE_STREAM); > + > + if (err < 0) > + return err; > + > + break; > + > + default: > + return -EINVAL; > + } > + > + return 0; > +} > + > +/* capture pointer callback */ > +static snd_pcm_uframes_t > +snd_line6_capture_pointer(struct snd_pcm_substream *substream) > +{ > + struct snd_line6_pcm *line6pcm = snd_pcm_substream_chip(substream); > + return line6pcm->pos_in_done; > +} > + > +/* capture operators */ > +struct snd_pcm_ops snd_line6_capture_ops = { > + .open = snd_line6_capture_open, > + .close = snd_line6_capture_close, > + .ioctl = snd_pcm_lib_ioctl, > + .hw_params = snd_line6_capture_hw_params, > + .hw_free = snd_line6_capture_hw_free, > + .prepare = snd_line6_prepare, > + .trigger = snd_line6_trigger, > + .pointer = snd_line6_capture_pointer, > +}; > + > +int line6_create_audio_in_urbs(struct snd_line6_pcm *line6pcm) > +{ > + int i; > + > + /* create audio URBs and fill in constant values: */ > + for (i = 0; i < LINE6_ISO_BUFFERS; ++i) { > + struct urb *urb; > + > + /* URB for audio in: */ > + urb = line6pcm->urb_audio_in[i] = > + usb_alloc_urb(LINE6_ISO_PACKETS, GFP_KERNEL); > + > + if (urb == NULL) { > + dev_err(line6pcm->line6->ifcdev, "Out of memory\n"); > + return -ENOMEM; > + } > + > + urb->dev = line6pcm->line6->usbdev; > + urb->pipe = > + usb_rcvisocpipe(line6pcm->line6->usbdev, > + line6pcm->ep_audio_read & > + USB_ENDPOINT_NUMBER_MASK); > + urb->transfer_flags = URB_ISO_ASAP; > + urb->start_frame = -1; > + urb->number_of_packets = LINE6_ISO_PACKETS; > + urb->interval = LINE6_ISO_INTERVAL; > + urb->error_count = 0; > + urb->complete = audio_in_callback; > + } > + > + return 0; > +} > diff --git a/sound/usb/line6/capture.h b/sound/usb/line6/capture.h > new file mode 100644 > index 0000000..4157bcb > --- /dev/null > +++ b/sound/usb/line6/capture.h > @@ -0,0 +1,35 @@ > +/* > + * Line6 Linux USB driver - 0.9.1beta > + * > + * Copyright (C) 2004-2010 Markus Grabner (gr...@ic...) > + * > + * This program is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License as > + * published by the Free Software Foundation, version 2. > + * > + */ > + > +#ifndef CAPTURE_H > +#define CAPTURE_H > + > +#include <sound/pcm.h> > + > +#include "driver.h" > +#include "pcm.h" > + > +extern struct snd_pcm_ops snd_line6_capture_ops; > + > +extern void line6_capture_copy(struct snd_line6_pcm *line6pcm, char *fbuf, > + int fsize); > +extern void line6_capture_check_period(struct snd_line6_pcm *line6pcm, > + int length); > +extern int line6_create_audio_in_urbs(struct snd_line6_pcm *line6pcm); > +extern void line6_free_capture_buffer(struct snd_line6_pcm *line6pcm); > +extern int line6_submit_audio_in_all_urbs(struct snd_line6_pcm *line6pcm); > +extern void line6_unlink_audio_in_urbs(struct snd_line6_pcm *line6pcm); > +extern void line6_unlink_wait_clear_audio_in_urbs(struct snd_line6_pcm > + *line6pcm); > +extern void line6_wait_clear_audio_in_urbs(struct snd_line6_pcm *line6pcm); > +extern int snd_line6_capture_trigger(struct snd_line6_pcm *line6pcm, int cmd); > + > +#endif > diff --git a/sound/usb/line6/control.c b/sound/usb/line6/control.c > new file mode 100644 > index 0000000..f8326f5 > --- /dev/null > +++ b/sound/usb/line6/control.c > @@ -0,0 +1,995 @@ > +/* > + * Line6 Linux USB driver - 0.9.1beta > + * > + * Copyright (C) 2004-2010 Markus Grabner (gr...@ic...) > + * > + * This program is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License as > + * published by the Free Software Foundation, version 2. > + * > + */ > + > +#include <linux/usb.h> > + > +#include "control.h" > +#include "driver.h" > +#include "pod.h" > +#include "usbdefs.h" > +#include "variax.h" > + > +#define DEVICE_ATTR2(_name1, _name2, _mode, _show, _store) \ > +struct device_attribute dev_attr_##_name1 = __ATTR(_name2, _mode, _show, _store) > + > +#define LINE6_PARAM_R(PREFIX, prefix, type, param) \ > +static ssize_t prefix##_get_##param(struct device *dev, \ > + struct device_attribute *attr, char *buf) \ > +{ \ > + return prefix##_get_param_##type(dev, buf, PREFIX##_##param); \ > +} > + > +#define LINE6_PARAM_RW(PREFIX, prefix, type, param) \ > +LINE6_PARAM_R(PREFIX, prefix, type, param); \ > +static ssize_t prefix##_set_##param(struct device *dev, \ > + struct device_attribute *attr, const char *buf, size_t count) \ > +{ \ > + return prefix##_set_param_##type(dev, buf, count, PREFIX##_##param); \ > +} > + > +#define POD_PARAM_R(type, param) LINE6_PARAM_R(POD, pod, type, param) > +#define POD_PARAM_RW(type, param) LINE6_PARAM_RW(POD, pod, type, param) > +#define VARIAX_PARAM_R(type, param) LINE6_PARAM_R(VARIAX, variax, type, param) > +#define VARIAX_PARAM_RW(type, param) LINE6_PARAM_RW(VARIAX, variax, type, param) > + > +static ssize_t pod_get_param_int(struct device *dev, char *buf, int param) > +{ > + struct usb_interface *interface = to_usb_interface(dev); > + struct usb_line6_pod *pod = usb_get_intfdata(interface); > + int retval = line6_dump_wait_interruptible(&pod->dumpreq); > + if (retval < 0) > + return retval; > + return sprintf(buf, "%d\n", pod->prog_data.control[param]); > +} > + > +static ssize_t pod_set_param_int(struct device *dev, const char *buf, > + size_t count, int param) > +{ > + struct usb_interface *interface = to_usb_interface(dev); > + struct usb_line6_pod *pod = usb_get_intfdata(interface); > + u8 value; > + int retval; > + > + retval = kstrtou8(buf, 10, &value); > + if (retval) > + return retval; > + > + line6_pod_transmit_parameter(pod, param, value); > + return count; > +} > + > +static ssize_t variax_get_param_int(struct device *dev, char *buf, int param) > +{ > + struct usb_interface *interface = to_usb_interface(dev); > + struct usb_line6_variax *variax = usb_get_intfdata(interface); > + int retval = line6_dump_wait_interruptible(&variax->dumpreq); > + if (retval < 0) > + return retval; > + return sprintf(buf, "%d\n", variax->model_data.control[param]); > +} > + > +static ssize_t variax_get_param_float(struct device *dev, char *buf, int param) > +{ > + /* > + We do our own floating point handling here since at the time > + this code was written (Jan 2006) it was highly discouraged to > + use floating point arithmetic in the kernel. If you think that > + this no longer applies, feel free to replace this by generic > + floating point code. > + */ > + > + static const int BIAS = 0x7f; > + static const int OFFSET = 0xf; > + static const int PRECISION = 1000; > + > + int len = 0; > + unsigned part_int, part_frac; > + struct usb_interface *interface = to_usb_interface(dev); > + struct usb_line6_variax *variax = usb_get_intfdata(interface); > + const unsigned char *p = variax->model_data.control + param; > + int retval = line6_dump_wait_interruptible(&variax->dumpreq); > + if (retval < 0) > + return retval; > + > + if ((p[0] == 0) && (p[1] == 0) && (p[2] == 0)) > + part_int = part_frac = 0; > + else { > + int exponent = (((p[0] & 0x7f) << 1) | (p[1] >> 7)) - BIAS; > + unsigned mantissa = (p[1] << 8) | p[2] | 0x8000; > + exponent -= OFFSET; > + > + if (exponent >= 0) { > + part_int = mantissa << exponent; > + part_frac = 0; > + } else { > + part_int = mantissa >> -exponent; > + part_frac = (mantissa << (32 + exponent)) & 0xffffffff; > + } > + > + part_frac = > + (part_frac / ((1UL << 31) / (PRECISION / 2 * 10)) + 5) / 10; > + } > + > + len += > + sprintf(buf + len, "%s%d.%03d\n", ((p[0] & 0x80) ? "-" : ""), > + part_int, part_frac); > + return len; > +} > + > +POD_PARAM_RW(int, tweak); > +POD_PARAM_RW(int, wah_position); > +POD_PARAM_RW(int, compression_gain); > +POD_PARAM_RW(int, vol_pedal_position); > +POD_PARAM_RW(int, compression_threshold); > +POD_PARAM_RW(int, pan); > +POD_PARAM_RW(int, amp_model_setup); > +POD_PARAM_RW(int, amp_model); > +POD_PARAM_RW(int, drive); > +POD_PARAM_RW(int, bass); > +POD_PARAM_RW(int, mid); > +POD_PARAM_RW(int, lowmid); > +POD_PARAM_RW(int, treble); > +POD_PARAM_RW(int, highmid); > +POD_PARAM_RW(int, chan_vol); > +POD_PARAM_RW(int, reverb_mix); > +POD_PARAM_RW(int, effect_setup); > +POD_PARAM_RW(int, band_1_frequency); > +POD_PARAM_RW(int, presence); > +POD_PARAM_RW(int, treble__bass); > +POD_PARAM_RW(int, noise_gate_enable); > +POD_PARAM_RW(int, gate_threshold); > +POD_PARAM_RW(int, gate_decay_time); > +POD_PARAM_RW(int, stomp_enable); > +POD_PARAM_RW(int, comp_enable); > +POD_PARAM_RW(int, stomp_time); > +POD_PARAM_RW(int, delay_enable); > +POD_PARAM_RW(int, mod_param_1); > +POD_PARAM_RW(int, delay_param_1); > +POD_PARAM_RW(int, delay_param_1_note_value); > +POD_PARAM_RW(int, band_2_frequency__bass); > +POD_PARAM_RW(int, delay_param_2); > +POD_PARAM_RW(int, delay_volume_mix); > +POD_PARAM_RW(int, delay_param_3); > +POD_PARAM_RW(int, reverb_enable); > +POD_PARAM_RW(int, reverb_type); > +POD_PARAM_RW(int, reverb_decay); > +POD_PARAM_RW(int, reverb_tone); > +POD_PARAM_RW(int, reverb_pre_delay); > +POD_PARAM_RW(int, reverb_pre_post); > +POD_PARAM_RW(int, band_2_frequency); > +POD_PARAM_RW(int, band_3_frequency__bass); > +POD_PARAM_RW(int, wah_enable); > +POD_PARAM_RW(int, modulation_lo_cut); > +POD_PARAM_RW(int, delay_reverb_lo_cut); > +POD_PARAM_RW(int, volume_pedal_minimum); > +POD_PARAM_RW(int, eq_pre_post); > +POD_PARAM_RW(int, volume_pre_post); > +POD_PARAM_RW(int, di_model); > +POD_PARAM_RW(int, di_delay); > +POD_PARAM_RW(int, mod_enable); > +POD_PARAM_RW(int, mod_param_1_note_value); > +POD_PARAM_RW(int, mod_param_2); > +POD_PARAM_RW(int, mod_param_3); > +POD_PARAM_RW(int, mod_param_4); > +POD_PARAM_RW(int, mod_param_5); > +POD_PARAM_RW(int, mod_volume_mix); > +POD_PARAM_RW(int, mod_pre_post); > +POD_PARAM_RW(int, modulation_model); > +POD_PARAM_RW(int, band_3_frequency); > +POD_PARAM_RW(int, band_4_frequency__bass); > +POD_PARAM_RW(int, mod_param_1_double_precision); > +POD_PARAM_RW(int, delay_param_1_double_precision); > +POD_PARAM_RW(int, eq_enable); > +POD_PARAM_RW(int, tap); > +POD_PARAM_RW(int, volume_tweak_pedal_assign); > +POD_PARAM_RW(int, band_5_frequency); > +POD_PARAM_RW(int, tuner); > +POD_PARAM_RW(int, mic_selection); > +POD_PARAM_RW(int, cabinet_model); > +POD_PARAM_RW(int, stomp_model); > +POD_PARAM_RW(int, roomlevel); > +POD_PARAM_RW(int, band_4_frequency); > +POD_PARAM_RW(int, band_6_frequency); > +POD_PARAM_RW(int, stomp_param_1_note_value); > +POD_PARAM_RW(int, stomp_param_2); > +POD_PARAM_RW(int, stomp_param_3); > +POD_PARAM_RW(int, stomp_param_4); > +POD_PARAM_RW(int, stomp_param_5); > +POD_PARAM_RW(int, stomp_param_6); > +POD_PARAM_RW(int, amp_switch_select); > +POD_PARAM_RW(int, delay_param_4); > +POD_PARAM_RW(int, delay_param_5); > +POD_PARAM_RW(int, delay_pre_post); > +POD_PARAM_RW(int, delay_model); > +POD_PARAM_RW(int, delay_verb_model); > +POD_PARAM_RW(int, tempo_msb); > +POD_PARAM_RW(int, tempo_lsb); > +POD_PARAM_RW(int, wah_model); > +POD_PARAM_RW(int, bypass_volume); > +POD_PARAM_RW(int, fx_loop_on_off); > +POD_PARAM_RW(int, tweak_param_select); > +POD_PARAM_RW(int, amp1_engage); > +POD_PARAM_RW(int, band_1_gain); > +POD_PARAM_RW(int, band_2_gain__bass); > +POD_PARAM_RW(int, band_2_gain); > +POD_PARAM_RW(int, band_3_gain__bass); > +POD_PARAM_RW(int, band_3_gain); > +POD_PARAM_RW(int, band_4_gain__bass); > +POD_PARAM_RW(int, band_5_gain__bass); > +POD_PARAM_RW(int, band_4_gain); > +POD_PARAM_RW(int, band_6_gain__bass); > +VARIAX_PARAM_R(int, body); > +VARIAX_PARAM_R(int, pickup1_enable); > +VARIAX_PARAM_R(int, pickup1_type); > +VARIAX_PARAM_R(float, pickup1_position); > +VARIAX_PARAM_R(float, pickup1_angle); > +VARIAX_PARAM_R(float, pickup1_level); > +VARIAX_PARAM_R(int, pickup2_enable); > +VARIAX_PARAM_R(int, pickup2_type); > +VARIAX_PARAM_R(float, pickup2_position); > +VARIAX_PARAM_R(float, pickup2_angle); > +VARIAX_PARAM_R(float, pickup2_level); > +VARIAX_PARAM_R(int, pickup_phase); > +VARIAX_PARAM_R(float, capacitance); > +VARIAX_PARAM_R(float, tone_resistance); > +VARIAX_PARAM_R(float, volume_resistance); > +VARIAX_PARAM_R(int, taper); > +VARIAX_PARAM_R(float, tone_dump); > +VARIAX_PARAM_R(int, save_tone); > +VARIAX_PARAM_R(float, volume_dump); > +VARIAX_PARAM_R(int, tuning_enable); > +VARIAX_PARAM_R(int, tuning6); > +VARIAX_PARAM_R(int, tuning5); > +VARIAX_PARAM_R(int, tuning4); > +VARIAX_PARAM_R(int, tuning3); > +VARIAX_PARAM_R(int, tuning2); > +VARIAX_PARAM_R(int, tuning1); > +VARIAX_PARAM_R(float, detune6); > +VARIAX_PARAM_R(float, detune5); > +VARIAX_PARAM_R(float, detune4); > +VARIAX_PARAM_R(float, detune3); > +VARIAX_PARAM_R(float, detune2); > +VARIAX_PARAM_R(float, detune1); > +VARIAX_PARAM_R(float, mix6); > +VARIAX_PARAM_R(float, mix5); > +VARIAX_PARAM_R(float, mix4); > +VARIAX_PARAM_R(float, mix3); > +VARIAX_PARAM_R(float, mix2); > +VARIAX_PARAM_R(float, mix1); > +VARIAX_PARAM_R(int, pickup_wiring); > + > +static DEVICE_ATTR(tweak, S_IWUSR | S_IRUGO, pod_get_tweak, pod_set_tweak); > +static DEVICE_ATTR(wah_position, S_IWUSR | S_IRUGO, pod_get_wah_position, > + pod_set_wah_position); > +static DEVICE_ATTR(compression_gain, S_IWUSR | S_IRUGO, > + pod_get_compression_gain, pod_set_compression_gain); > +static DEVICE_ATTR(vol_pedal_position, S_IWUSR | S_IRUGO, > + pod_get_vol_pedal_position, pod_set_vol_pedal_position); > +static DEVICE_ATTR(compression_threshold, S_IWUSR | S_IRUGO, > + pod_get_compression_threshold, > + pod_set_compression_threshold); > +static DEVICE_ATTR(pan, S_IWUSR | S_IRUGO, pod_get_pan, pod_set_pan); > +static DEVICE_ATTR(amp_model_setup, S_IWUSR | S_IRUGO, pod_get_amp_model_setup, > + pod_set_amp_model_setup); > +static DEVICE_ATTR(amp_model, S_IWUSR | S_IRUGO, pod_get_amp_model, > + pod_set_amp_model); > +static DEVICE_ATTR(drive, S_IWUSR | S_IRUGO, pod_get_drive, pod_set_drive); > +static DEVICE_ATTR(bass, S_IWUSR | S_IRUGO, pod_get_bass, pod_set_bass); > +static DEVICE_ATTR(mid, S_IWUSR | S_IRUGO, pod_get_mid, pod_set_mid); > +static DEVICE_ATTR(lowmid, S_IWUSR | S_IRUGO, pod_get_lowmid, pod_set_lowmid); > +static DEVICE_ATTR(treble, S_IWUSR | S_IRUGO, pod_get_treble, pod_set_treble); > +static DEVICE_ATTR(highmid, S_IWUSR | S_IRUGO, pod_get_highmid, > + pod_set_highmid); > +static DEVICE_ATTR(chan_vol, S_IWUSR | S_IRUGO, pod_get_chan_vol, > + pod_set_chan_vol); > +static DEVICE_ATTR(reverb_mix, S_IWUSR | S_IRUGO, pod_get_reverb_mix, > + pod_set_reverb_mix); > +static DEVICE_ATTR(effect_setup, S_IWUSR | S_IRUGO, pod_get_effect_setup, > + pod_set_effect_setup); > +static DEVICE_ATTR(band_1_frequency, S_IWUSR | S_IRUGO, > + pod_get_band_1_frequency, pod_set_band_1_frequency); > +static DEVICE_ATTR(presence, S_IWUSR | S_IRUGO, pod_get_presence, > + pod_set_presence); > +static DEVICE_ATTR2(treble__bass, treble, S_IWUSR | S_IRUGO, > + pod_get_treble__bass, pod_set_treble__bass); > +static DEVICE_ATTR(noise_gate_enable, S_IWUSR | S_IRUGO, > + pod_get_noise_gate_enable, pod_set_noise_gate_enable); > +static DEVICE_ATTR(gate_threshold, S_IWUSR | S_IRUGO, pod_get_gate_threshold, > + pod_set_gate_threshold); > +static DEVICE_ATTR(gate_decay_time, S_IWUSR | S_IRUGO, pod_get_gate_decay_time, > + pod_set_gate_decay_time); > +static DEVICE_ATTR(stomp_enable, S_IWUSR | S_IRUGO, pod_get_stomp_enable, > + pod_set_stomp_enable); > +static DEVICE_ATTR(comp_enable, S_IWUSR | S_IRUGO, pod_get_comp_enable, > + pod_set_comp_enable); > +static DEVICE_ATTR(stomp_time, S_IWUSR | S_IRUGO, pod_get_stomp_time, > + pod_set_stomp_time); > +static DEVICE_ATTR(delay_enable, S_IWUSR | S_IRUGO, pod_get_delay_enable, > + pod_set_delay_enable); > +static DEVICE_ATTR(mod_param_1, S_IWUSR | S_IRUGO, pod_get_mod_param_1, > + pod_set_mod_param_1); > +static DEVICE_ATTR(delay_param_1, S_IWUSR | S_IRUGO, pod_get_delay_param_1, > + pod_set_delay_param_1); > +static DEVICE_ATTR(delay_param_1_note_value, S_IWUSR | S_IRUGO, > + pod_get_delay_param_1_note_value, > + pod_set_delay_param_1_note_value); > +static DEVICE_ATTR2(band_2_frequency__bass, band_2_frequency, S_IWUSR | S_IRUGO, > + pod_get_band_2_frequency__bass, > + pod_set_band_2_frequency__bass); > +static DEVICE_ATTR(delay_param_2, S_IWUSR | S_IRUGO, pod_get_delay_param_2, > + pod_set_delay_param_2); > +static DEVICE_ATTR(delay_volume_mix, S_IWUSR | S_IRUGO, > + pod_get_delay_volume_mix, pod_set_delay_volume_mix); > +static DEVICE_ATTR(delay_param_3, S_IWUSR | S_IRUGO, pod_get_delay_param_3, > + pod_set_delay_param_3); > +static DEVICE_ATTR(reverb_enable, S_IWUSR | S_IRUGO, pod_get_reverb_enable, > + pod_set_reverb_enable); > +static DEVICE_ATTR(reverb_type, S_IWUSR | S_IRUGO, pod_get_reverb_type, > + pod_set_reverb_type); > +static DEVICE_ATTR(reverb_decay, S_IWUSR | S_IRUGO, pod_get_reverb_decay, > + pod_set_reverb_decay); > +static DEVICE_ATTR(reverb_tone, S_IWUSR | S_IRUGO, pod_get_reverb_tone, > + pod_set_reverb_tone); > +static DEVICE_ATTR(reverb_pre_delay, S_IWUSR | S_IRUGO, > + pod_get_reverb_pre_delay, pod_set_reverb_pre_delay); > +static DEVICE_ATTR(reverb_pre_post, S_IWUSR | S_IRUGO, pod_get_reverb_pre_post, > + pod_set_reverb_pre_post); > +static DEVICE_ATTR(band_2_frequency, S_IWUSR | S_IRUGO, > + pod_get_band_2_frequency, pod_set_band_2_frequency); > +static DEVICE_ATTR2(band_3_frequency__bass, band_3_frequency, S_IWUSR | S_IRUGO, > + pod_get_band_3_frequency__bass, > + pod_set_band_3_frequency__bass); > +static DEVICE_ATTR(wah_enable, S_IWUSR | S_IRUGO, pod_get_wah_enable, > + pod_set_wah_enable); > +static DEVICE_ATTR(modulation_lo_cut, S_IWUSR | S_IRUGO, > + pod_get_modulation_lo_cut, pod_set_modulation_lo_cut); > +static DEVICE_ATTR(delay_reverb_lo_cut, S_IWUSR | S_IRUGO, > + pod_get_delay_reverb_lo_cut, pod_set_delay_reverb_lo_cut); > +static DEVICE_ATTR(volume_pedal_minimum, S_IWUSR | S_IRUGO, > + pod_get_volume_pedal_minimum, pod_set_volume_pedal_minimum); > +static DEVICE_ATTR(eq_pre_post, S_IWUSR | S_IRUGO, pod_get_eq_pre_post, > + pod_set_eq_pre_post); > +static DEVICE_ATTR(volume_pre_post, S_IWUSR | S_IRUGO, pod_get_volume_pre_post, > + pod_set_volume_pre_post); > +static DEVICE_ATTR(di_model, S_IWUSR | S_IRUGO, pod_get_di_model, > + pod_set_di_model); > +static DEVICE_ATTR(di_delay, S_IWUSR | S_IRUGO, pod_get_di_delay, > + pod_set_di_delay); > +static DEVICE_ATTR(mod_enable, S_IWUSR | S_IRUGO, pod_get_mod_enable, > + pod_set_mod_enable); > +static DEVICE_ATTR(mod_param_1_note_value, S_IWUSR | S_IRUGO, > + pod_get_mod_param_1_note_value, > + pod_set_mod_param_1_note_value); > +static DEVICE_ATTR(mod_param_2, S_IWUSR | S_IRUGO, pod_get_mod_param_2, > + pod_set_mod_param_2); > +static DEVICE_ATTR(mod_param_3, S_IWUSR | S_IRUGO, pod_get_mod_param_3, > + pod_set_mod_param_3); > +static DEVICE_ATTR(mod_param_4, S_IWUSR | S_IRUGO, pod_get_mod_param_4, > + pod_set_mod_param_4); > +static DEVICE_ATTR(mod_param_5, S_IWUSR | S_IRUGO, pod_get_mod_param_5, > + pod_set_mod_param_5); > +static DEVICE_ATTR(mod_volume_mix, S_IWUSR | S_IRUGO, pod_get_mod_volume_mix, > + pod_set_mod_volume_mix); > +static DEVICE_ATTR(mod_pre_post, S_IWUSR | S_IRUGO, pod_get_mod_pre_post, > + pod_set_mod_pre_post); > +static DEVICE_ATTR(modulation_model, S_IWUSR | S_IRUGO, > + pod_get_modulation_model, pod_set_modulation_model); > +static DEVICE_ATTR(band_3_frequency, S_IWUSR | S_IRUGO, > + pod_get_band_3_frequency, pod_set_band_3_frequency); > +static DEVICE_ATTR2(band_4_frequency__bass, band_4_frequency, S_IWUSR | S_IRUGO, > + pod_get_band_4_frequency__bass, > + pod_set_band_4_frequency__bass); > +static DEVICE_ATTR(mod_param_1_double_precision, S_IWUSR | S_IRUGO, > + pod_get_mod_param_1_double_precision, > + pod_set_mod_param_1_double_precision); > +static DEVICE_ATTR(delay_param_1_double_precision, S_IWUSR | S_IRUGO, > + pod_get_delay_param_1_double_precision, > + pod_set_delay_param_1_double_precision); > +static DEVICE_ATTR(eq_enable, S_IWUSR | S_IRUGO, pod_get_eq_enable, > + pod_set_eq_enable); > +static DEVICE_ATTR(tap, S_IWUSR | S_IRUGO, pod_get_tap, pod_set_tap); > +static DEVICE_ATTR(volume_tweak_pedal_assign, S_IWUSR | S_IRUGO, > + pod_get_volume_tweak_pedal_assign, > + pod_set_volume_tweak_pedal_assign); > +static DEVICE_ATTR(band_5_frequency, S_IWUSR | S_IRUGO, > + pod_get_band_5_frequency, pod_set_band_5_frequency); > +static DEVICE_ATTR(tuner, S_IWUSR | S_IRUGO, pod_get_tuner, pod_set_tuner); > +static DEVICE_ATTR(mic_selection, S_IWUSR | S_IRUGO, pod_get_mic_selection, > + pod_set_mic_selection); > +static DEVICE_ATTR(cabinet_model, S_IWUSR | S_IRUGO, pod_get_cabinet_model, > + pod_set_cabinet_model); > +static DEVICE_ATTR(stomp_model, S_IWUSR | S_IRUGO, pod_get_stomp_model, > + pod_set_stomp_model); > +static DEVICE_ATTR(roomlevel, S_IWUSR | S_IRUGO, pod_get_roomlevel, > + pod_set_roomlevel); > +static DEVICE_ATTR(band_4_frequency, S_IWUSR | S_IRUGO, > + pod_get_band_4_frequency, pod_set_band_4_frequency); > +static DEVICE_ATTR(band_6_frequency, S_IWUSR | S_IRUGO, > + pod_get_band_6_frequency, pod_set_band_6_frequency); > +static DEVICE_ATTR(stomp_param_1_note_value, S_IWUSR | S_IRUGO, > + pod_get_stomp_param_1_note_value, > + pod_set_stomp_param_1_note_value); > +static DEVICE_ATTR(stomp_param_2, S_IWUSR | S_IRUGO, pod_get_stomp_param_2, > + pod_set_stomp_param_2); > +static DEVICE_ATTR(stomp_param_3, S_IWUSR | S_IRUGO, pod_get_stomp_param_3, > + pod_set_stomp_param_3); > +static DEVICE_ATTR(stomp_param_4, S_IWUSR | S_IRUGO, pod_get_stomp_param_4, > + pod_set_stomp_param_4); > +static DEVICE_ATTR(stomp_param_5, S_IWUSR | S_IRUGO, pod_get_stomp_param_5, > + pod_set_stomp_param_5); > +static DEVICE_ATTR(stomp_param_6, S_IWUSR | S_IRUGO, pod_get_stomp_param_6, > + pod_set_stomp_param_6); > +static DEVICE_ATTR(amp_switch_select, S_IWUSR | S_IRUGO, > + pod_get_amp_switch_select, pod_set_amp_switch_select); > +static DEVICE_ATTR(delay_param_4, S_IWUSR | S_IRUGO, pod_get_delay_param_4, > + pod_set_delay_param_4); > +static DEVICE_ATTR(delay_param_5, S_IWUSR | S_IRUGO, pod_get_delay_param_5, > + pod_set_delay_param_5); > +static DEVICE_ATTR(delay_pre_post, S_IWUSR | S_IRUGO, pod_get_delay_pre_post, > + pod_set_delay_pre_post); > +static DEVICE_ATTR(delay_model, S_IWUSR | S_IRUGO, pod_get_delay_model, > + pod_set_delay_model); > +static DEVICE_ATTR(delay_verb_model, S_IWUSR | S_IRUGO, > + pod_get_delay_verb_model, pod_set_delay_verb_model); > +static DEVICE_ATTR(tempo_msb, S_IWUSR | S_IRUGO, pod_get_tempo_msb, > + pod_set_tempo_msb); > +static DEVICE_ATTR(tempo_lsb, S_IWUSR | S_IRUGO, pod_get_tempo_lsb, > + pod_set_tempo_lsb); > +static DEVICE_ATTR(wah_model, S_IWUSR | S_IRUGO, pod_get_wah_model, > + pod_set_wah_model); > +static DEVICE_ATTR(bypass_volume, S_IWUSR | S_IRUGO, pod_get_bypass_volume, > + pod_set_bypass_volume); > +static DEVICE_ATTR(fx_loop_on_off, S_IWUSR | S_IRUGO, pod_get_fx_loop_on_off, > + pod_set_fx_loop_on_off); > +static DEVICE_ATTR(tweak_param_select, S_IWUSR | S_IRUGO, > + pod_get_tweak_param_select, pod_set_tweak_param_select); > +static DEVICE_ATTR(amp1_engage, S_IWUSR | S_IRUGO, pod_get_amp1_engage, > + pod_set_amp1_engage); > +static DEVICE_ATTR(band_1_gain, S_IWUSR | S_IRUGO, pod_get_band_1_gain, > + pod_set_band_1_gain); > +static DEVICE_ATTR2(band_2_gain__bass, band_2_gain, S_IWUSR | S_IRUGO, > + pod_get_band_2_gain__bass, pod_set_band_2_gain__bass); > +static DEVICE_ATTR(band_2_gain, S_IWUSR | S_IRUGO, pod_get_band_2_gain, > + pod_set_band_2_gain); > +static DEVICE_ATTR2(band_3_gain__bass, band_3_gain, S_IWUSR | S_IRUGO, > + pod_get_band_3_gain__bass, pod_set_band_3_gain__bass); > +static DEVICE_ATTR(band_3_gain, S_IWUSR | S_IRUGO, pod_get_band_3_gain, > + pod_set_band_3_gain); > +static DEVICE_ATTR2(band_4_gain__bass, band_4_gain, S_IWUSR | S_IRUGO, > + pod_get_band_4_gain__bass, pod_set_band_4_gain__bass); > +static DEVICE_ATTR2(band_5_gain__bass, band_5_gain, S_IWUSR | S_IRUGO, > + pod_get_band_5_gain__bass, pod_set_band_5_gain__bass); > +static DEVICE_ATTR(band_4_gain, S_IWUSR | S_IRUGO, pod_get_band_4_gain, > + pod_set_band_4_gain); > +static DEVICE_ATTR2(band_6_gain__bass, band_6_gain, S_IWUSR | S_IRUGO, > + pod_get_band_6_gain__bass, pod_set_band_6_gain__bass); > +static DEVICE_ATTR(body, S_IRUGO, variax_get_body, line6_nop_write); > +static DEVICE_ATTR(pickup1_enable, S_IRUGO, variax_get_pickup1_enable, > + line6_nop_write); > +static DEVICE_ATTR(pickup1_type, S_IRUGO, variax_get_pickup1_type, > + line6_nop_write); > +static DEVICE_ATTR(pickup1_position, S_IRUGO, variax_get_pickup1_position, > + line6_nop_write); > +static DEVICE_ATTR(pickup1_angle, S_IRUGO, variax_get_pickup1_angle, > + line6_nop_write); > +static DEVICE_ATTR(pickup1_level, S_IRUGO, variax_get_pickup1_level, > + line6_nop_write); > +static DEVICE_ATTR(pickup2_enable, S_IRUGO, variax_get_pickup2_enable, > + line6_nop_write); > +static DEVICE_ATTR(pickup2_type, S_IRUGO, variax_get_pickup2_type, > + line6_nop_write); > +static DEVICE_ATTR(pickup2_position, S_IRUGO, variax_get_pickup2_position, > + line6_nop_write); > +static DEVICE_ATTR(pickup2_angle, S_IRUGO, variax_get_pickup2_angle, > + line6_nop_write); > +static DEVICE_ATTR(pickup2_level, S_IRUGO, variax_get_pickup2_level, > + line6_nop_write); > +static DEVICE_ATTR(pickup_phase, S_IRUGO, variax_get_pickup_phase, > + line6_nop_write); > +static DEVICE_ATTR(capacitance, S_IRUGO, variax_get_capacitance, > + line6_nop_write); > +static DEVICE_ATTR(tone_resistance, S_IRUGO, variax_get_tone_resistance, > + line6_nop_write); > +static DEVICE_ATTR(volume_resistance, S_IRUGO, variax_get_volume_resistance, > + line6_nop_write); > +static DEVICE_ATTR(taper, S_IRUGO, variax_get_taper, line6_nop_write); > +static DEVICE_ATTR(tone_dump, S_IRUGO, variax_get_tone_dump, line6_nop_write); > +static DEVICE_ATTR(save_tone, S_IRUGO, variax_get_save_tone, line6_nop_write); > +static DEVICE_ATTR(volume_dump, S_IRUGO, variax_get_volume_dump, > + line6_nop_write); > +static DEVICE_ATTR(tuning_enable, S_IRUGO, variax_get_tuning_enable, > + line6_nop_write); > +static DEVICE_ATTR(tuning6, S_IRUGO, variax_get_tuning6, line6_nop_write); > +static DEVICE_ATTR(tuning5, S_IRUGO, variax_get_tuning5, line6_nop_write); > +static DEVICE_ATTR(tuning4, S_IRUGO, variax_get_tuning4, line6_nop_write); > +static DEVICE_ATTR(tuning3, S_IRUGO, variax_get_tuning3, line6_nop_write); > +static DEVICE_ATTR(tuning2, S_IRUGO, variax_get_tuning2, line6_nop_write); > +static DEVICE_ATTR(tuning1, S_IRUGO, variax_get_tuning1, line6_nop_write); > +static DEVICE_ATTR(detune6, S_IRUGO, variax_get_detune6, line6_nop_write); > +static DEVICE_ATTR(detune5, S_IRUGO, variax_get_detune5, line6_nop_write); > +static DEVICE_ATTR(detune4, S_IRUGO, variax_get_detune4, line6_nop_write); > +static DEVICE_ATTR(detune3, S_IRUGO, variax_get_detune3, line6_nop_write); > +static DEVICE_ATTR(detune2, S_IRUGO, variax_get_detune2, line6_nop_write); > +static DEVICE_ATTR(detune1, S_IRUGO, variax_get_detune1, line6_nop_write); > +static DEVICE_ATTR(mix6, S_IRUGO, variax_get_mix6, line6_nop_write); > +static DEVICE_ATTR(mix5, S_IRUGO, variax_get_mix5, line6_nop_write); > +static DEVICE_ATTR(mix4, S_IRUGO, variax_get_mix4, line6_nop_write); > +static DEVICE_ATTR(mix3, S_IRUGO, variax_get_mix3, line6_nop_write); > +static DEVICE_ATTR(mix2, S_IRUGO, variax_get_mix2, line6_nop_write); > +static DEVICE_ATTR(mix1, S_IRUGO, variax_get_mix1, line6_nop_write); > +static DEVICE_ATTR(pickup_wiring, S_IRUGO, variax_get_pickup_wiring, > + line6_nop_write); > + > +int line6_pod_create_files(int firmware, int type, struct device *dev) > +{ > + int err; > + CHECK_RETURN(device_create_file(dev, &dev_attr_tweak)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_wah_position)); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_compression_gain)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_vol_pedal_position)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_compression_threshold)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_pan)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_amp_model_setup)); > + if (firmware >= 200) > + CHECK_RETURN(device_create_file(dev, &dev_attr_amp_model)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_drive)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_bass)); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + CHECK_RETURN(device_create_file(dev, &dev_attr_mid)); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + CHECK_RETURN(device_create_file(dev, &dev_attr_lowmid)); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + CHECK_RETURN(device_create_file(dev, &dev_attr_treble)); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + CHECK_RETURN(device_create_file(dev, &dev_attr_highmid)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_chan_vol)); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + CHECK_RETURN(device_create_file(dev, &dev_attr_reverb_mix)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_effect_setup)); > + if (firmware >= 200) > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_band_1_frequency)); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + CHECK_RETURN(device_create_file(dev, &dev_attr_presence)); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + CHECK_RETURN(device_create_file(dev, &dev_attr_treble__bass)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_noise_gate_enable)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_gate_threshold)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_gate_decay_time)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_stomp_enable)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_comp_enable)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_stomp_time)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_delay_enable)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_mod_param_1)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_delay_param_1)); > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_delay_param_1_note_value)); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + if (firmware >= 200) > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_band_2_frequency__bass)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_delay_param_2)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_delay_volume_mix)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_delay_param_3)); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + CHECK_RETURN(device_create_file(dev, &dev_attr_reverb_enable)); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + CHECK_RETURN(device_create_file(dev, &dev_attr_reverb_type)); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + CHECK_RETURN(device_create_file(dev, &dev_attr_reverb_decay)); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + CHECK_RETURN(device_create_file(dev, &dev_attr_reverb_tone)); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_reverb_pre_delay)); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_reverb_pre_post)); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + if (firmware >= 200) > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_band_2_frequency)); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + if (firmware >= 200) > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_band_3_frequency__bass)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_wah_enable)); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_modulation_lo_cut)); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_delay_reverb_lo_cut)); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + if (firmware >= 200) > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_volume_pedal_minimum)); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + if (firmware >= 200) > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_eq_pre_post)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_volume_pre_post)); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + CHECK_RETURN(device_create_file(dev, &dev_attr_di_model)); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + CHECK_RETURN(device_create_file(dev, &dev_attr_di_delay)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_mod_enable)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_mod_param_1_note_value)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_mod_param_2)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_mod_param_3)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_mod_param_4)); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + CHECK_RETURN(device_create_file(dev, &dev_attr_mod_param_5)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_mod_volume_mix)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_mod_pre_post)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_modulation_model)); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + if (firmware >= 200) > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_band_3_frequency)); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + if (firmware >= 200) > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_band_4_frequency__bass)); > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_mod_param_1_double_precision)); > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_delay_param_1_double_precision)); > + if (firmware >= 200) > + CHECK_RETURN(device_create_file(dev, &dev_attr_eq_enable)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_tap)); > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_volume_tweak_pedal_assign)); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + if (firmware >= 200) > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_band_5_frequency)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_tuner)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_mic_selection)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_cabinet_model)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_stomp_model)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_roomlevel)); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + if (firmware >= 200) > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_band_4_frequency)); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + if (firmware >= 200) > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_band_6_frequency)); > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_stomp_param_1_note_value)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_stomp_param_2)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_stomp_param_3)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_stomp_param_4)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_stomp_param_5)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_stomp_param_6)); > + if ((type & (LINE6_BITS_LIVE)) != 0) > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_amp_switch_select)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_delay_param_4)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_delay_param_5)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_delay_pre_post)); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + CHECK_RETURN(device_create_file(dev, &dev_attr_delay_model)); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_delay_verb_model)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_tempo_msb)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_tempo_lsb)); > + if (firmware >= 300) > + CHECK_RETURN(device_create_file(dev, &dev_attr_wah_model)); > + if (firmware >= 214) > + CHECK_RETURN(device_create_file(dev, &dev_attr_bypass_volume)); > + if ((type & (LINE6_BITS_PRO)) != 0) > + CHECK_RETURN(device_create_file(dev, &dev_attr_fx_loop_on_off)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_tweak_param_select)); > + CHECK_RETURN(device_create_file(dev, &dev_attr_amp1_engage)); > + if (firmware >= 200) > + CHECK_RETURN(device_create_file(dev, &dev_attr_band_1_gain)); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + if (firmware >= 200) > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_band_2_gain__bass)); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + if (firmware >= 200) > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_band_2_gain)); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + if (firmware >= 200) > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_band_3_gain__bass)); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + if (firmware >= 200) > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_band_3_gain)); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + if (firmware >= 200) > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_band_4_gain__bass)); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + if (firmware >= 200) > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_band_5_gain__bass)); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + if (firmware >= 200) > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_band_4_gain)); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + if (firmware >= 200) > + CHECK_RETURN(device_create_file > + (dev, &dev_attr_band_6_gain__bass)); > + return 0; > +} > + > +void line6_pod_remove_files(int firmware, int type, struct device *dev) > +{ > + device_remove_file(dev, &dev_attr_tweak); > + device_remove_file(dev, &dev_attr_wah_position); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + device_remove_file(dev, &dev_attr_compression_gain); > + device_remove_file(dev, &dev_attr_vol_pedal_position); > + device_remove_file(dev, &dev_attr_compression_threshold); > + device_remove_file(dev, &dev_attr_pan); > + device_remove_file(dev, &dev_attr_amp_model_setup); > + if (firmware >= 200) > + device_remove_file(dev, &dev_attr_amp_model); > + device_remove_file(dev, &dev_attr_drive); > + device_remove_file(dev, &dev_attr_bass); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + device_remove_file(dev, &dev_attr_mid); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + device_remove_file(dev, &dev_attr_lowmid); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + device_remove_file(dev, &dev_attr_treble); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + device_remove_file(dev, &dev_attr_highmid); > + device_remove_file(dev, &dev_attr_chan_vol); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + device_remove_file(dev, &dev_attr_reverb_mix); > + device_remove_file(dev, &dev_attr_effect_setup); > + if (firmware >= 200) > + device_remove_file(dev, &dev_attr_band_1_frequency); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + device_remove_file(dev, &dev_attr_presence); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + device_remove_file(dev, &dev_attr_treble__bass); > + device_remove_file(dev, &dev_attr_noise_gate_enable); > + device_remove_file(dev, &dev_attr_gate_threshold); > + device_remove_file(dev, &dev_attr_gate_decay_time); > + device_remove_file(dev, &dev_attr_stomp_enable); > + device_remove_file(dev, &dev_attr_comp_enable); > + device_remove_file(dev, &dev_attr_stomp_time); > + device_remove_file(dev, &dev_attr_delay_enable); > + device_remove_file(dev, &dev_attr_mod_param_1); > + device_remove_file(dev, &dev_attr_delay_param_1); > + device_remove_file(dev, &dev_attr_delay_param_1_note_value); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + if (firmware >= 200) > + device_remove_file(dev, > + &dev_attr_band_2_frequency__bass); > + device_remove_file(dev, &dev_attr_delay_param_2); > + device_remove_file(dev, &dev_attr_delay_volume_mix); > + device_remove_file(dev, &dev_attr_delay_param_3); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + device_remove_file(dev, &dev_attr_reverb_enable); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + device_remove_file(dev, &dev_attr_reverb_type); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + device_remove_file(dev, &dev_attr_reverb_decay); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + device_remove_file(dev, &dev_attr_reverb_tone); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + device_remove_file(dev, &dev_attr_reverb_pre_delay); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + device_remove_file(dev, &dev_attr_reverb_pre_post); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + if (firmware >= 200) > + device_remove_file(dev, &dev_attr_band_2_frequency); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + if (firmware >= 200) > + device_remove_file(dev, > + &dev_attr_band_3_frequency__bass); > + device_remove_file(dev, &dev_attr_wah_enable); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + device_remove_file(dev, &dev_attr_modulation_lo_cut); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + device_remove_file(dev, &dev_attr_delay_reverb_lo_cut); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + if (firmware >= 200) > + device_remove_file(dev, &dev_attr_volume_pedal_minimum); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + if (firmware >= 200) > + device_remove_file(dev, &dev_attr_eq_pre_post); > + device_remove_file(dev, &dev_attr_volume_pre_post); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + device_remove_file(dev, &dev_attr_di_model); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + device_remove_file(dev, &dev_attr_di_delay); > + device_remove_file(dev, &dev_attr_mod_enable); > + device_remove_file(dev, &dev_attr_mod_param_1_note_value); > + device_remove_file(dev, &dev_attr_mod_param_2); > + device_remove_file(dev, &dev_attr_mod_param_3); > + device_remove_file(dev, &dev_attr_mod_param_4); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + device_remove_file(dev, &dev_attr_mod_param_5); > + device_remove_file(dev, &dev_attr_mod_volume_mix); > + device_remove_file(dev, &dev_attr_mod_pre_post); > + device_remove_file(dev, &dev_attr_modulation_model); > + if ((type & (LINE6_BITS_PODXTALL)) != 0) > + if (firmware >= 200) > + device_remove_file(dev, &dev_attr_band_3_frequency); > + if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) > + if (firmware >= 200) > + device_remove_file(dev, > + &dev_attr_band_4_frequency__bass); > + device_remove_file(dev, &dev_attr_mod_param_1_double_precis... [truncated message content] |