ALSA: line6: add support for POD HD500X
PATCH 1/2 ALSA: line6: add support for POD HD500X
Add support for the Line6 POD HD500X multi effect processor for playback and capture (in/out audio) through USB.
--- sound/usb/line6/podhd.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)
sound/usb/line6/podhd.c +16 -1
@@ -3,6 +3,7 @@* * Copyright (C) 2011 Stefan Hajnoczi <[email protected]> * Copyright (C) 2015 Andrej Krutak <[email protected]> +* Copyright (C) 2015 Hans P. Moller <[email protected]> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as
@@ -37,7 +38,8 @@ enum {LINE6_PODHD500_0 ,LINE6_PODHD500_1 ,LINE6_PODX3 , -LINE6_PODX3LIVE +LINE6_PODX3LIVE , +LINE6_PODHD500X }; struct usb_line6_podhd {
@@ -372,6 +374,7 @@ static const struct usb_device_id podhd_id_table[] = { { LINE6_IF_NUM(0x414D, 1), .driver_info = LINE6_PODHD500_1 }, { LINE6_IF_NUM(0x414A, 0), .driver_info = LINE6_PODX3 }, { LINE6_IF_NUM(0x414B, 0), .driver_info = LINE6_PODX3LIVE }, + { LINE6_IF_NUM(0x4159, 0), .driver_info = LINE6_PODHD500X }, {} };
@@ -446,6 +449,18 @@ static const struct line6_properties podhd_properties_table[] = { .ep_audio_r = 0x86, .ep_audio_w = 0x02, }, + [LINE6_PODHD500X] = { + .id = "PODHD500X", + .name = "POD HD500X", + .capabilities =LINE6_CAP_CONTROL + | LINE6_CAP_PCM | LINE6_CAP_HWMON, + .altsetting = 1, + .ep_ctrl_r = 0x81, + .ep_ctrl_w = 0x01, + .ctrl_if = 1, + .ep_audio_r = 0x86, + .ep_audio_w = 0x02, + }, };/*
Signature · 1 line
2.7.4
PATCH 2/2 ALSA:line6: remove unnecessary initialization to PODHD500X.
Body:
Remove Initialization from POD HD500X because it's not needed.
Every time the device is connected dmesg gives the following output: "receive length failed (error -11)".
To solve this problem, another flags is introduced (LINE6_CAP_CONTROL_INFO) and it is only used for PODX3 in: sysfs entries, call podhd_startup_finalize(pod) and disconnection. With this patch the error disappear.
--- sound/usb/line6/driver.h | 2 ++ sound/usb/line6/podhd.c | 12 +++++++----- 2 files changed, 9 insertions(+), 5 deletions(-)
sound/usb/line6/driver.h +2 -0
@@ -117,6 +117,8 @@ enum {LINE6_CAP_IN_NEEDS_OUT =1 <<3 ,/* device uses raw MIDI via USB (data endpoints) */ LINE6_CAP_CONTROL_MIDI =1 <<4 , +/* device provides low-level information */ + LINE6_CAP_CONTROL_INFO = 1 << 5, };/*
sound/usb/line6/podhd.c +7 -5
@@ -293,7 +293,7 @@ static void podhd_disconnect(struct usb_line6 *line6) {struct usb_line6_podhd *pod = (struct usb_line6_podhd *)line6; -if (pod->line6.properties->capabilities &LINE6_CAP_CONTROL ) { +if (pod->line6.properties->capabilities &LINE6_CAP_CONTROL_INFO ) {struct usb_interface *intf;del_timer_sync (&pod->startup_timer);
@@ -333,7 +333,9 @@ static int podhd_init(struct usb_line6 *line6, pod->line6.properties->ctrl_if, err);return err; } - + } + +if (pod->line6.properties->capabilities &LINE6_CAP_CONTROL_INFO ) {/* create sysfs entries: */ err =snd_card_add_dev_attr (line6->card, &podhd_dev_attr_group);if (err <0 )
@@ -350,7 +352,7 @@ static int podhd_init(struct usb_line6 *line6,return err; } -if (!(pod->line6.properties->capabilities &LINE6_CAP_CONTROL )) { +if (!(pod->line6.properties->capabilities &LINE6_CAP_CONTROL_INFO )) {/* register USB audio system directly */ return podhd_startup_finalize (pod); }
@@ -428,7 +430,7 @@ static const struct line6_properties podhd_properties_table[] = { [LINE6_PODX3] = { .id = "PODX3", .name = "POD X3", - .capabilities =LINE6_CAP_CONTROL + .capabilities =LINE6_CAP_CONTROL |LINE6_CAP_CONTROL_INFO | LINE6_CAP_PCM | LINE6_CAP_HWMON | LINE6_CAP_IN_NEEDS_OUT, .altsetting = 1, .ep_ctrl_r = 0x81,
@@ -440,7 +442,7 @@ static const struct line6_properties podhd_properties_table[] = { [LINE6_PODX3LIVE] = { .id = "PODX3LIVE", .name = "POD X3 LIVE", - .capabilities =LINE6_CAP_CONTROL + .capabilities =LINE6_CAP_CONTROL |LINE6_CAP_CONTROL_INFO | LINE6_CAP_PCM | LINE6_CAP_HWMON | LINE6_CAP_IN_NEEDS_OUT, .altsetting = 1, .ep_ctrl_r = 0x81,
Signature · 1 line
2.7.4
Re: [PATCH 2/2] ALSA:line6: remove unnecessary initialization to PODHD500X.
On Jun 16, 2017 20:14, "Hans P. Möller Ebner" <[email protected]> wrote:
Body:
Remove Initialization from POD HD500X because it's not needed. Every time the device is connected dmesg gives the following output:
"receive length failed (error -11)".
To solve this problem, another flags is introduced (LINE6_CAP_CONTROL_INFO) and it is only used for PODX3 in: sysfs entries, call podhd_startup_finalize(pod) and disconnection.
With this patch the error disappear.
--- sound/usb/line6/driver.h | 2 ++ sound/usb/line6/podhd.c | 12 +++++++----- 2 files changed, 9 insertions(+), 5 deletions(-)
sound/usb/line6/driver.h +2 -0
@@ -117,6 +117,8 @@ enum {LINE6_CAP_IN_NEEDS_OUT =1 <<3 ,/* device uses raw MIDI via USB (data endpoints) */ LINE6_CAP_CONTROL_MIDI =1 <<4 , +/* device provides low-level information */ + LINE6_CAP_CONTROL_INFO = 1 << 5, };/*
sound/usb/line6/podhd.c +4 -2
@@ -293,7 +293,7 @@ static void podhd_disconnect(struct usb_line6 *line6) {struct usb_line6_podhd *pod = (struct usb_line6_podhd *)line6; -if (pod->line6.properties->capabilities &LINE6_CAP_CONTROL ) { +if (pod->line6.properties->capabilities &LINE6_CAP_CONTROL_INFO ) {struct usb_interface *intf;del_timer_sync (&pod->startup_timer);
@@ -333,7 +333,9 @@ static int podhd_init(struct usb_line6 *line6, pod->line6.properties->ctrl_if, err);return err; } - + } + +if (pod->line6.properties->capabilities &LINE6_CAP_CONTROL_INFO ) {/* create sysfs entries: */ err = snd_card_add_dev_attr(line6->card,
&podhd_dev_attr_group);
if (err < 0)
@@ -350,7 +352,7 @@ static int podhd_init(struct usb_line6 *line6,
return err;
}- if (!(pod->line6.properties->capabilities & LINE6_CAP_CONTROL)) {
+ if (!(pod->line6.properties->capabilities &
LINE6_CAP_CONTROL_INFO)) {
/* register USB audio system directly */
return podhd_startup_finalize(pod);
}
@@ -428,7 +430,7 @@ static const struct line6_properties
podhd_properties_table[] = {
[LINE6_PODX3] = {
.id = "PODX3",
.name = "POD X3",
- .capabilities = LINE6_CAP_CONTROL
+ .capabilities = LINE6_CAP_CONTROL | LINE6_CAP_CONTROL_INFO
| LINE6_CAP_PCM | LINE6_CAP_HWMON |LINE6_CAP_IN_NEEDS_OUT,
.altsetting = 1,
.ep_ctrl_r = 0x81,
@@ -440,7 +442,7 @@ static const struct line6_properties
podhd_properties_table[] = {
[LINE6_PODX3LIVE] = {
.id = "PODX3LIVE",
.name = "POD X3 LIVE",
- .capabilities = LINE6_CAP_CONTROL
+ .capabilities = LINE6_CAP_CONTROL | LINE6_CAP_CONTROL_INFO
| LINE6_CAP_PCM | LINE6_CAP_HWMON |LINE6_CAP_IN_NEEDS_OUT,
.altsetting = 1,
.ep_ctrl_r = 0x81,
--
2.7.4
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Quoted 13 lines · Hans P. Möller Ebner
Add support for the Line6 POD HD500X multi effect processor for playback and capture (in/out audio) through USB.
Signed-off-by Hans P. Moller <[email protected]>--- sound/usb/line6/podhd.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)sound/usb/line6/podhd.c +0
-0
sound/usb/line6/podhd.c line 6
Quoted 4 lines
sound/usb/line6/podhd.c +1
-0@@ -3,6 +3,7 @@* * Copyright (C) 2011 Stefan Hajnoczi <[email protected]> * Copyright (C) 2015 Andrej Krutak <[email protected]> +* Copyright (C) 2015 Hans P. Moller <[email protected]>
Was the code written in two years ago? Otherwise put 2017. (Or you can omit such a change, too. The change history can be
tracked via git nowadays.)
thanks,
Takashi
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
My mistake, 2017, sorry. Should I generate again the 2 commits? or a third just correcting that? How should I handle it?
brgds
HPM
Quoted 26 lines · Takashi Iwai
Quoted 2 lines · Hans P. Möller Ebner
Add support for the Line6 POD HD500X multi effect processor for playback
and capture (in/out audio) through USB.
Quoted 11 lines
Signed-off-by Hans P. Moller <[email protected]>--- sound/usb/line6/podhd.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)sound/usb/line6/podhd.c +0
-0sound/usb/line6/podhd.c line 6
Quoted 4 lines
sound/usb/line6/podhd.c +1
-0@@ -3,6 +3,7 @@* * Copyright (C) 2011 Stefan Hajnoczi <[email protected]> * Copyright (C) 2015 Andrej Krutak <[email protected]> +* Copyright (C) 2015 Hans P. Moller <[email protected]> Was the code written in two years ago? Otherwise put 2017. (Or you can omit such a change, too. The change history can be
tracked via git nowadays.)
Quoted 4 lines
thanks,
Takashi
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Quoted 3 lines · Hans Peter Möller
My mistake, 2017, sorry. Should I generate again the 2 commits? or a third just correcting that? How should I handle it?
It's basically up to you. I can fix it in my side for such a trivial thing, too, so no need for resend unless anyone else finds more issue.
thanks,
Takashi
Quoted 31 lines
brgds
HPMQuoted 26 lines · Takashi Iwai
Quoted 2 lines · Hans P. Möller Ebner
Add support for the Line6 POD HD500X multi effect processor for playback
and capture (in/out audio) through USB.
Quoted 11 lines
Signed-off-by Hans P. Moller <[email protected]>--- sound/usb/line6/podhd.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)sound/usb/line6/podhd.c +0
-0sound/usb/line6/podhd.c line 6
Quoted 4 lines
sound/usb/line6/podhd.c +1
-0@@ -3,6 +3,7 @@* * Copyright (C) 2011 Stefan Hajnoczi <[email protected]> * Copyright (C) 2015 Andrej Krutak <[email protected]> +* Copyright (C) 2015 Hans P. Moller <[email protected]> Was the code written in two years ago? Otherwise put 2017. (Or you can omit such a change, too. The change history can be
tracked via git nowadays.)
Quoted 6 lines
Quoted 4 lines
thanks,
Takashi
[2 <text/html; UTF-8 (quoted-printable)>]
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
If you can do it, I would appreciate it.
Thanks.
brgds
HPM
Quoted 19 lines · Takashi Iwai
Quoted 2 lines · Hans Peter Möller
My mistake, 2017, sorry. Should I generate again the 2 commits? or a
third
Quoted 1 line
just correcting that? How should I handle it?
It's basically up to you. I can fix it in my side for such a trivial thing, too, so no need for resend unless anyone else finds more issue.
thanks,
Takashi
Quoted 3 lines
brgds
HPM
Quoted 36 lines
Quoted 6 lines · Takashi Iwai
Quoted 5 lines
Quoted 2 lines · Hans P. Möller Ebner
Add support for the Line6 POD HD500X multi effect processor for
playback
Quoted 28 lines
Quoted 22 lines
and capture (in/out audio) through USB.
Quoted 11 lines
Signed-off-by Hans P. Moller <[email protected]>--- sound/usb/line6/podhd.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)sound/usb/line6/podhd.c +0
-0sound/usb/line6/podhd.c line 6
Quoted 4 lines
sound/usb/line6/podhd.c +1
-0@@ -3,6 +3,7 @@* * Copyright (C) 2011 Stefan Hajnoczi <[email protected]> * Copyright (C) 2015 Andrej Krutak <[email protected]> +* Copyright (C) 2015 Hans P. Moller <[email protected]> Was the code written in two years ago? Otherwise put 2017. (Or you can omit such a change, too. The change history can be
tracked via git nowadays.)Quoted 4 lines
thanks,
Takashi
[2 <text/html; UTF-8 (quoted-printable)>]
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Quoted 3 lines · Hans Peter Möller
If you can do it, I would appreciate it.
Thanks.
OK, applied both patches now. Thanks.
Takashi
Quoted 58 lines
brgds
HPMQuoted 52 lines · Takashi Iwai
Quoted 2 lines · Hans Peter Möller
My mistake, 2017, sorry. Should I generate again the 2 commits? or a
third
Quoted 1 line
just correcting that? How should I handle it?
It's basically up to you. I can fix it in my side for such a trivial thing, too, so no need for resend unless anyone else finds more issue.
thanks,
Takashi
Quoted 9 lines
brgds
HPMQuoted 4 lines · Takashi Iwai
Quoted 2 lines · Hans P. Möller Ebner
Add support for the Line6 POD HD500X multi effect processor for
playback
Quoted 26 lines
Quoted 26 lines
and capture (in/out audio) through USB.
Quoted 11 lines
Signed-off-by Hans P. Moller <[email protected]>--- sound/usb/line6/podhd.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)sound/usb/line6/podhd.c +0
-0sound/usb/line6/podhd.c line 6
Quoted 4 lines
sound/usb/line6/podhd.c +1
-0@@ -3,6 +3,7 @@* * Copyright (C) 2011 Stefan Hajnoczi <[email protected]> * Copyright (C) 2015 Andrej Krutak <[email protected]> +* Copyright (C) 2015 Hans P. Moller <[email protected]> Was the code written in two years ago? Otherwise put 2017. (Or you can omit such a change, too. The change history can be
tracked via git nowadays.)thanks,
Takashi
Quoted 7 lines
Quoted 3 lines
Quoted 2 lines
[2 <text/html; UTF-8 (quoted-printable)>]
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel