31
31
#define DRIVER_VERSION "0.9.1beta" DRIVER_REVISION
32
32
33
33
#define LINE6_DEVICE (prod ) USB_DEVICE(0x0e41, prod)
34
+ #define LINE6_IF_NUM (prod , n ) USB_DEVICE_INTERFACE_NUMBER(0x0e41, prod, n)
34
35
35
36
/* table of devices that work with this driver */
36
37
static const struct usb_device_id line6_id_table [] = {
@@ -46,7 +47,8 @@ static const struct usb_device_id line6_id_table[] = {
46
47
{ LINE6_DEVICE (0x4150 ), .driver_info = LINE6_PODSTUDIO_UX1 },
47
48
{ LINE6_DEVICE (0x4151 ), .driver_info = LINE6_PODSTUDIO_UX2 },
48
49
{ LINE6_DEVICE (0x5044 ), .driver_info = LINE6_PODXT },
49
- { LINE6_DEVICE (0x4650 ), .driver_info = LINE6_PODXTLIVE },
50
+ { LINE6_IF_NUM (0x4650 , 0 ), .driver_info = LINE6_PODXTLIVE_POD },
51
+ { LINE6_IF_NUM (0x4650 , 1 ), .driver_info = LINE6_PODXTLIVE_VARIAX },
50
52
{ LINE6_DEVICE (0x5050 ), .driver_info = LINE6_PODXTPRO },
51
53
{ LINE6_DEVICE (0x4147 ), .driver_info = LINE6_TONEPORT_GX },
52
54
{ LINE6_DEVICE (0x4141 ), .driver_info = LINE6_TONEPORT_UX1 },
@@ -132,7 +134,14 @@ static const struct line6_properties line6_properties_table[] = {
132
134
| LINE6_CAP_PCM
133
135
| LINE6_CAP_HWMON ,
134
136
},
135
- [LINE6_PODXTLIVE ] = {
137
+ [LINE6_PODXTLIVE_POD ] = {
138
+ .id = "PODxtLive" ,
139
+ .name = "PODxt Live" ,
140
+ .capabilities = LINE6_CAP_CONTROL
141
+ | LINE6_CAP_PCM
142
+ | LINE6_CAP_HWMON ,
143
+ },
144
+ [LINE6_PODXTLIVE_VARIAX ] = {
136
145
.id = "PODxtLive" ,
137
146
.name = "PODxt Live" ,
138
147
.capabilities = LINE6_CAP_CONTROL
@@ -445,24 +454,15 @@ static void line6_data_received(struct urb *urb)
445
454
case LINE6_PODHD500 :
446
455
break ; /* let userspace handle MIDI */
447
456
448
- case LINE6_PODXTLIVE :
449
- switch (line6 -> interface_number ) {
450
- case PODXTLIVE_INTERFACE_POD :
451
- line6_pod_process_message ((struct usb_line6_pod
457
+ case LINE6_PODXTLIVE_POD :
458
+ line6_pod_process_message ((struct usb_line6_pod
452
459
* )line6 );
453
- break ;
454
-
455
- case PODXTLIVE_INTERFACE_VARIAX :
456
- line6_variax_process_message ((struct
457
- usb_line6_variax
458
- * )line6 );
459
- break ;
460
-
461
- default :
462
- dev_err (line6 -> ifcdev ,
463
- "PODxt Live interface %d not supported\n" ,
464
- line6 -> interface_number );
465
- }
460
+ break ;
461
+
462
+ case LINE6_PODXTLIVE_VARIAX :
463
+ line6_variax_process_message ((struct
464
+ usb_line6_variax
465
+ * )line6 );
466
466
break ;
467
467
468
468
case LINE6_VARIAX :
@@ -722,7 +722,8 @@ static int line6_probe(struct usb_interface *interface,
722
722
723
723
switch (devtype ) {
724
724
case LINE6_BASSPODXTLIVE :
725
- case LINE6_PODXTLIVE :
725
+ case LINE6_PODXTLIVE_POD :
726
+ case LINE6_PODXTLIVE_VARIAX :
726
727
case LINE6_VARIAX :
727
728
alternate = 1 ;
728
729
break ;
@@ -841,24 +842,16 @@ static int line6_probe(struct usb_interface *interface,
841
842
/* these don't have a control channel */
842
843
break ;
843
844
844
- case LINE6_PODXTLIVE :
845
- switch (interface_number ) {
846
- case PODXTLIVE_INTERFACE_POD :
847
- size = sizeof (struct usb_line6_pod );
848
- ep_read = 0x84 ;
849
- ep_write = 0x03 ;
850
- break ;
851
-
852
- case PODXTLIVE_INTERFACE_VARIAX :
853
- size = sizeof (struct usb_line6_variax );
854
- ep_read = 0x86 ;
855
- ep_write = 0x05 ;
856
- break ;
845
+ case LINE6_PODXTLIVE_POD :
846
+ size = sizeof (struct usb_line6_pod );
847
+ ep_read = 0x84 ;
848
+ ep_write = 0x03 ;
849
+ break ;
857
850
858
- default :
859
- ret = - ENODEV ;
860
- goto err_put ;
861
- }
851
+ case LINE6_PODXTLIVE_VARIAX :
852
+ size = sizeof ( struct usb_line6_variax ) ;
853
+ ep_read = 0x86 ;
854
+ ep_write = 0x05 ;
862
855
break ;
863
856
864
857
case LINE6_VARIAX :
@@ -887,7 +880,6 @@ static int line6_probe(struct usb_interface *interface,
887
880
}
888
881
889
882
/* store basic data: */
890
- line6 -> interface_number = interface_number ;
891
883
line6 -> properties = properties ;
892
884
line6 -> usbdev = usbdev ;
893
885
line6 -> ifcdev = & interface -> dev ;
@@ -967,27 +959,16 @@ static int line6_probe(struct usb_interface *interface,
967
959
(struct usb_line6_podhd * )line6 );
968
960
break ;
969
961
970
- case LINE6_PODXTLIVE :
971
- switch (interface_number ) {
972
- case PODXTLIVE_INTERFACE_POD :
973
- ret =
974
- line6_pod_init (interface ,
975
- (struct usb_line6_pod * )line6 );
976
- break ;
977
-
978
- case PODXTLIVE_INTERFACE_VARIAX :
979
- ret =
980
- line6_variax_init (interface ,
981
- (struct usb_line6_variax * )line6 );
982
- break ;
983
-
984
- default :
985
- dev_err (& interface -> dev ,
986
- "PODxt Live interface %d not supported\n" ,
987
- interface_number );
988
- ret = - ENODEV ;
989
- }
962
+ case LINE6_PODXTLIVE_POD :
963
+ ret =
964
+ line6_pod_init (interface ,
965
+ (struct usb_line6_pod * )line6 );
966
+ break ;
990
967
968
+ case LINE6_PODXTLIVE_VARIAX :
969
+ ret =
970
+ line6_variax_init (interface ,
971
+ (struct usb_line6_variax * )line6 );
991
972
break ;
992
973
993
974
case LINE6_VARIAX :
@@ -1084,17 +1065,12 @@ static void line6_disconnect(struct usb_interface *interface)
1084
1065
line6_podhd_disconnect (interface );
1085
1066
break ;
1086
1067
1087
- case LINE6_PODXTLIVE :
1088
- switch (interface_number ) {
1089
- case PODXTLIVE_INTERFACE_POD :
1090
- line6_pod_disconnect (interface );
1091
- break ;
1092
-
1093
- case PODXTLIVE_INTERFACE_VARIAX :
1094
- line6_variax_disconnect (interface );
1095
- break ;
1096
- }
1068
+ case LINE6_PODXTLIVE_POD :
1069
+ line6_pod_disconnect (interface );
1070
+ break ;
1097
1071
1072
+ case LINE6_PODXTLIVE_VARIAX :
1073
+ line6_variax_disconnect (interface );
1098
1074
break ;
1099
1075
1100
1076
case LINE6_VARIAX :
0 commit comments