Skip to contentSkip to conversation

Support for EDIROL UM-3ex

PATCH Applied Brent Cook 3 participants 6 messages Jan 1, 2006 – Jan 10, 2006 Sound

lore
Share & tools
lore

Brent Cook

author
#0 lore raw

Dear all,

This is my naive attempt at adding ALSA device support. The attached patch provides support for the EDIROL UM-3ex. This is a 3-port USB midi interface with a built-in USB hub and the ability to chain 2 other UM-3x's in a master-slave configuration. I only have one, so I do not know how this works in practice.

Though this is a 3-port device, I had to throw in that 4th 'Control' interface to the definition in order to make the 3rd port work. If I set in/out_cables to 0x000b, a 3rd interface appears on the driver, but it does nothing. Changing it to 0x000f allows the 3rd interface to work, but of course interface 4 does not work because it does not exist.

- Brent

sound/usb/usbmidi.c +2 -0
diff -urN linux-2.6.15-rc7/sound/usb/usbmidi.c linux-2.6.15-rc7.dev/sound/usb/usbmidi.c
@@ -1095,6 +1095,8 @@
 	{ USB_ID(0x086a, 0x0001), 8, "%s Broadcast" },
 	{ USB_ID(0x086a, 0x0002), 8, "%s Broadcast" },
 	{ USB_ID(0x086a, 0x0003), 4, "%s Broadcast" },
+	/* Edirol UM-3ex */
+	{ USB_ID(0x0582, 0x009a), 3, "%s Control" },
 };
 
 static void snd_usbmidi_init_substream(snd_usb_midi_t* umidi,
sound/usb/usbquirks.h +22 -0
diff -urN linux-2.6.15-rc7/sound/usb/usbquirks.h linux-2.6.15-rc7.dev/sound/usb/usbquirks.h
@@ -204,6 +204,28 @@
 	}
 },
 {
+	USB_DEVICE(0x0582, 0x009a),
+	.driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
+		.vendor_name = "EDIROL",
+		.product_name = "UM-3ex",
+		.ifnum = QUIRK_ANY_INTERFACE,
+		.type = QUIRK_COMPOSITE,
+		.data = (const snd_usb_audio_quirk_t[]) {
+			{
+				.ifnum = 0,
+				.type = QUIRK_MIDI_FIXED_ENDPOINT,
+				.data = & (const snd_usb_midi_endpoint_info_t) {
+					.out_cables = 0x000f,
+					.in_cables  = 0x000f
+				}
+			},
+			{
+				.ifnum = -1
+			}
+		}
+	}
+},
+{
 	USB_DEVICE(0x0582, 0x0002),
 	.driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
 		.vendor_name = "EDIROL",
author
#1 lore raw
Quoted 8 lines · Brent Cook

Dear all,

This is my naive attempt at adding ALSA device support. The attached patch provides support for the EDIROL UM-3ex. This is a 3-port USB midi interface with a built-in USB hub and the ability to chain 2 other UM-3x's in a master-slave configuration. I only have one, so I do not know how this works in practice.

Quoted 7 lines

Though this is a 3-port device, I had to throw in that 4th 'Control' interface to the definition in order to make the 3rd port work. If I set in/out_cables to 0x000b, a 3rd interface appears on the driver, but it does nothing. Changing it to 0x000f allows the 3rd interface to work, but of course interface 4 does not work because it does not exist.

- Brent

Oh, and here is the relevant USB info for the device; maybe it explains the 3rd port quirk.

T:  Bus=04 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#=  3 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=ff(vend.) Sub=00 Prot=ff MxPS=64 #Cfgs=  1
P:  Vendor=0582 ProdID=009a Rev= 1.00
S:  Manufacturer=EDIROL
S:  Product=UM-3
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 90mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=03 Prot=00 Driver=snd-usb-audio
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:  If#= 0 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=03 Prot=00 Driver=snd-usb-audio
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=82(I) Atr=03(Int.) MxPS=  64 Ivl=1ms

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

#2 lore raw
In reply to Brent Cook

At Sat, 31 Dec 2005 21:54:35 -0600,

Quoted 9 lines · Brent Cook

Dear all,

This is my naive attempt at adding ALSA device support. The attached patch provides support for the EDIROL UM-3ex. This is a 3-port USB midi interface with a built-in USB hub and the ability to chain 2 other UM-3x's in a master-slave configuration. I only have one, so I do not know how this works in practice.

Quoted 5 lines

Though this is a 3-port device, I had to throw in that 4th 'Control' interface to the definition in order to make the 3rd port work. If I set in/out_cables to 0x000b, a 3rd interface appears on the driver, but it does nothing. Changing it to 0x000f allows the 3rd interface to work, but of course interface 4 does not work because it does not exist.

The patch looks OK to me, but it cannot be applied because we removed xxx_t typedefs in the latest ALSA code. Could you regenerate a patch for Linus' latest git tree (also together with Signed-off-by line) ?

Thanks.

Takashi

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

author
#3 lore raw
Quoted 11 lines · Takashi Iwai

At Sat, 31 Dec 2005 21:54:35 -0600,

Quoted 7 lines · Brent Cook

Dear all,

This is my naive attempt at adding ALSA device support. The attached patch provides support for the EDIROL UM-3ex. This is a 3-port USB midi interface with a built-in USB hub and the ability to chain 2 other UM-3x's in a master-slave configuration. I only have one, so I do not know how this works in practice.

Quoted 7 lines

The patch looks OK to me, but it cannot be applied because we removed xxx_t typedefs in the latest ALSA code. Could you regenerate a patch for Linus' latest git tree (also together with Signed-off-by line) ?

Thanks.

Takashi

Here you go. By the way. what was the rationale behind removing the typedefs? I always agonize over when to choose a typedef over a struct.

- Brent

sound/usb/usbmidi.c +2 -0
index f15b021..905e33e 100644
@@ -1092,6 +1092,8 @@ static struct {
 	{ USB_ID(0x086a, 0x0001), 8, "%s Broadcast" },
 	{ USB_ID(0x086a, 0x0002), 8, "%s Broadcast" },
 	{ USB_ID(0x086a, 0x0003), 4, "%s Broadcast" },
+	/* Edirol UM-3ex */
+	{ USB_ID(0x0582, 0x009a), 3, "%s Control" },
 };
 
 static void snd_usbmidi_init_substream(struct snd_usb_midi* umidi,
sound/usb/usbquirks.h +22 -0
index 6190ada..8f34861 100644
@@ -204,6 +204,28 @@ YAMAHA_DEVICE(0x7010, "UB99"),
 	}
 },
 {
+	USB_DEVICE(0x0582, 0x009a),
+	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
+		.vendor_name = "EDIROL",
+		.product_name = "UM-3ex",
+		.ifnum = QUIRK_ANY_INTERFACE,
+		.type = QUIRK_COMPOSITE,
+		.data = (const struct snd_usb_audio_quirk[]) {
+			{
+				.ifnum = 0,
+				.type = QUIRK_MIDI_FIXED_ENDPOINT,
+				.data = & (const struct snd_usb_midi_endpoint_info) {
+					.out_cables = 0x000f,
+					.in_cables  = 0x000f
+				}
+			},
+			{
+				.ifnum = -1
+			}
+		}
+	}
+},
+{
 	USB_DEVICE(0x0582, 0x0002),
 	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
 		.vendor_name = "EDIROL",
#4 lore raw
Quoted 5 lines · Brent Cook
Quoted 2 lines · Takashi Iwai

Could you regenerate a patch for Linus' latest git tree (also together with Signed-off-by line) ?

Here you go.

I usually try to keep the product IDs sorted, and a composite quirk isn't needed for devices with only one interface. And I added your Signed-off-by line. Would the patch below be OK?

Clemens

==========

Subject: Support for EDIROL UM-3EX

This is my naive attempt at adding ALSA device support. The attached patch provides support for the EDIROL UM-3ex. This is a 3-port USB midi interface with a built-in USB hub and the ability to chain 2 other UM-3x's in a master-slave configuration. I only have one, so I do not know how this works in practice.

Index: alsa-kernel/usb/usbmidi.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/usb/usbmidi.c,v retrieving revision 1.61

usb/usbmidi.c +2 -0
diff -u -r1.61 usbmidi.c
@@ -1082,6 +1082,8 @@
 	{ USB_ID(0x0582, 0x004d), 0, "%s MIDI" },
 	{ USB_ID(0x0582, 0x004d), 1, "%s 1" },
 	{ USB_ID(0x0582, 0x004d), 2, "%s 2" },
+	/* Edirol UM-3EX */
+	{ USB_ID(0x0582, 0x009a), 3, "%s Control" },
 	/* M-Audio MidiSport 8x8 */
 	{ USB_ID(0x0763, 0x1031), 8, "%s Control" },
 	{ USB_ID(0x0763, 0x1033), 8, "%s Control" },

Index: alsa-kernel/usb/usbquirks.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/usb/usbquirks.h,v retrieving revision 1.58

usb/usbquirks.h +13 -1
diff -u -r1.58 usbquirks.h
@@ -1090,6 +1090,19 @@
 		}
 	}
 },
+{
+	USB_DEVICE(0x0582, 0x009a),
+	.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
+		.vendor_name = "EDIROL",
+		.product_name = "UM-3EX",
+		.ifnum = 0,
+		.type = QUIRK_MIDI_FIXED_ENDPOINT,
+		.data = & (const struct snd_usb_midi_endpoint_info) {
+			.out_cables = 0x000f,
+			.in_cables  = 0x000f
+		}
+	}
+},
 
 /* Guillemot devices */
 {
@@ -1118,7 +1131,6 @@
 	/* TODO: add Edirol PC-50 support */
 	/* TODO: add Edirol PC-80 support */
 	/* TODO: add Edirol UA-1EX support */
-	/* TODO: add Edirol UM-3 support */
 	/* TODO: add Edirol MD-P1 support */
 
 /* Midiman/M-Audio devices */
Applied
#5 lore raw
In reply to Brent Cook

At Tue, 10 Jan 2006 07:34:32 -0600,

Quoted 18 lines · Brent Cook

[1 <text/plain; iso-8859-1 (7bit)>]

Quoted 15 lines · Takashi Iwai

At Sat, 31 Dec 2005 21:54:35 -0600,

Quoted 7 lines · Brent Cook

Dear all,

This is my naive attempt at adding ALSA device support. The attached patch provides support for the EDIROL UM-3ex. This is a 3-port USB midi interface with a built-in USB hub and the ability to chain 2 other UM-3x's in a master-slave configuration. I only have one, so I do not know how this works in practice.

The patch looks OK to me, but it cannot be applied because we removed xxx_t typedefs in the latest ALSA code. Could you regenerate a patch for Linus' latest git tree (also together with Signed-off-by line) ?

Quoted 5 lines
Quoted 3 lines

Thanks.

Takashi

Here you go.

Applied to CVS. Thanks.

Quoted 2 lines

By the way. what was the rationale behind removing the typedefs?
I always agonize over when to choose a typedef over a struct.

We just follow to the standard style instead of own preference.

Takashi

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click