Subject: kern/30986: umidi quirks for Roland USB MIDI devices
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: DHOYASHIKI Shinichi <clare@znet.or.jp>
List: netbsd-bugs
Date: 08/14/2005 13:27:00
>Number:         30986
>Category:       kern
>Synopsis:       umidi quirks for Roland USB MIDI devices
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 14 13:27:00 +0000 2005
>Originator:     DHOYASHIKI Shinichi
>Release:        NetBSD 3.99.7 as of 2005-08
>Organization:
at home
>Environment:
System: NetBSD minako 3.99.7
	NetBSD 3.99.7 (MINAKO6) #6: Mon Aug 8 23:51:09 JST 2005
	clare@minako:/src/sys/arch/i386/compile/MINAKO6 i386
Architecture: i386
Machine: i386
>Description:
	Missing device ID's and umidi quirks entries.
>How-To-Repeat:
>Fix:
	Following patches add support for some Roland products.
	Not all devices have been tested.

Index: dev/usb/usbdevs
===================================================================
RCS file: /deck/cvsroot/netbsd/src/sys/dev/usb/usbdevs,v
retrieving revision 1.410
diff -u -t -b -u -r1.410 usbdevs
--- dev/usb/usbdevs	3 Aug 2005 23:08:08 -0000	1.410
+++ dev/usb/usbdevs	14 Aug 2005 12:43:15 -0000
@@ -1597,8 +1597,15 @@
 product ROLAND SD20             0x0027  SD-20 MIDI Synth.
 product ROLAND SD80             0x0029  SD-80 MIDI Synth.
 product ROLAND UA700            0x002b  UA-700 USB Audio I/F
+product ROLAND PCRA             0x0033  EDIROL PCR MIDI keyboard (advanced)
+product ROLAND PCR              0x0034  EDIROL PCR MIDI keyboard
+product ROLAND M1000            0x0035  M-1000 audio I/F
+product ROLAND UA1000           0x0044  EDIROL UA-1000 USB audio I/F
 product ROLAND UA3FXA           0x0050  EDIROL UA-3FX USB audio I/F (advanced)
 product ROLAND UA3FX            0x0051  EDIROL UA-3FX USB audio I/F
+product ROLAND FANTOMX          0x006d  Fantom-X MIDI Synth.
+product ROLAND UA101            0x007d  EDIROL UA-101
+product ROLAND UA101F           0x008d  EDIROL UA-101 USB1
 
 /* Rockfire products */
 product ROCKFIRE GAMEPAD        0x2033  gamepad 203USB
Index: dev/usb/umidi_quirks.c
===================================================================
RCS file: /deck/cvsroot/netbsd/src/sys/dev/usb/umidi_quirks.c,v
retrieving revision 1.7
diff -u -t -b -u -r1.7 umidi_quirks.c
--- dev/usb/umidi_quirks.c	30 May 2005 04:21:39 -0000	1.7
+++ dev/usb/umidi_quirks.c	12 Jun 2005 04:23:59 -0000
@@ -363,7 +363,77 @@
         UMQ_TERMINATOR
 };
 
+/*
+ * ROLAND UA-1000
+ */
+UMQ_FIXED_EP_DEF(ROLAND, ROLAND_UA1000, 3, 1, 1) = {
+        /* out */
+        { 0, 2 },
+        /* in */
+        { 1, 2 }
+};
+
+UMQ_DEF(ROLAND, ROLAND_UA1000, 3) = {
+        UMQ_FIXED_EP_REG(ROLAND, ROLAND_UA1000, 3),
+        UMQ_TERMINATOR
+};
+
+/*
+ * ROLAND UA-101
+ */
+UMQ_FIXED_EP_DEF(ROLAND, ROLAND_UA101, 2, 1, 1) = {
+        /* out */
+        { 0, 2 },
+        /* in */
+        { 1, 2 }
+};
+
+UMQ_DEF(ROLAND, ROLAND_UA101, 2) = {
+        UMQ_FIXED_EP_REG(ROLAND, ROLAND_UA101, 2),
+        UMQ_TERMINATOR
+};
+
+UMQ_FIXED_EP_DEF(ROLAND, ROLAND_UA101F, 2, 1, 1) = {
+        /* out */
+        { 0, 2 },
+        /* in */
+        { 1, 2 }
+};
 
+UMQ_DEF(ROLAND, ROLAND_UA101F, 2) = {
+        UMQ_FIXED_EP_REG(ROLAND, ROLAND_UA101F, 2),
+        UMQ_TERMINATOR
+};
+
+/*
+ * ROLAND Fantom-X
+ */
+UMQ_FIXED_EP_DEF(ROLAND, ROLAND_FANTOMX, 0, 1, 1) = {
+        /* out */
+        { 0, 1 },
+        /* in */
+        { 1, 1 }
+};
+
+UMQ_DEF(ROLAND, ROLAND_FANTOMX, 0) = {
+        UMQ_FIXED_EP_REG(ROLAND, ROLAND_FANTOMX, 0),
+        UMQ_TERMINATOR
+};
+
+/*
+ * ROLAND PCR
+ */
+UMQ_FIXED_EP_DEF(ROLAND, ROLAND_PCR, 0, 1, 1) = {
+        /* out */
+        { 0, 3 },
+        /* in */
+        { 1, 3 }
+};
+
+UMQ_DEF(ROLAND, ROLAND_PCR, 0) = {
+        UMQ_FIXED_EP_REG(ROLAND, ROLAND_PCR, 0),
+        UMQ_TERMINATOR
+};
 
 /*
  * quirk list
@@ -388,6 +458,11 @@
         UMQ_REG(ROLAND, ROLAND_SD20, 0),
         UMQ_REG(ROLAND, ROLAND_SD80, 0),
         UMQ_REG(ROLAND, ROLAND_UA700, 3),
+        UMQ_REG(ROLAND, ROLAND_UA1000, 3),
+        UMQ_REG(ROLAND, ROLAND_UA101, 2),
+        UMQ_REG(ROLAND, ROLAND_UA101F, 2),
+        UMQ_REG(ROLAND, ROLAND_FANTOMX, 0),
+        UMQ_REG(ROLAND, ROLAND_PCR, 0),
         UMQ_TERMINATOR
 };