From owner-freebsd-multimedia@FreeBSD.ORG Sun Feb 20 19:52:47 2011 Return-Path: Delivered-To: freebsd-multimedia@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FE55106566B for ; Sun, 20 Feb 2011 19:52:47 +0000 (UTC) (envelope-from torfinn.ingolfsen@broadpark.no) Received: from thalia-smout.broadpark.no (thalia-smout.broadpark.no [80.202.8.21]) by mx1.freebsd.org (Postfix) with ESMTP id 039C68FC19 for ; Sun, 20 Feb 2011 19:52:46 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from terra-smin.broadpark.no ([80.202.8.13]) by thalia-smout.broadpark.no (Sun Java(tm) System Messaging Server 7u3-15.01 64bit (built Feb 12 2010)) with ESMTP id <0LGX008QWLVTDH90@thalia-smout.broadpark.no> for freebsd-multimedia@FreeBSD.org; Sun, 20 Feb 2011 20:52:41 +0100 (CET) Received: from kg-v2.kg4.no ([84.48.120.77]) by terra-smin.broadpark.no (Sun Java(tm) System Messaging Server 7u3-15.01 64bit (built Feb 12 2010)) with SMTP id <0LGX00IMVLVSOUJ0@terra-smin.broadpark.no> for freebsd-multimedia@FreeBSD.org; Sun, 20 Feb 2011 20:52:41 +0100 (CET) Date: Sun, 20 Feb 2011 20:52:40 +0100 From: Torfinn Ingolfsen To: freebsd-multimedia@FreeBSD.org Message-id: <20110220205240.7f9317e0.torfinn.ingolfsen@broadpark.no> In-reply-to: <201102171900.39165.hselasky@c2i.net> References: <201102171118.40721.hselasky@c2i.net> <201102171900.39165.hselasky@c2i.net> X-Mailer: Sylpheed 3.1.0 (GTK+ 2.22.1; amd64-portbld-freebsd8.1) X-Face: "t9w2,-X@O^I`jVW\sonI3.,36KBLZE*AL[y9lL[PyFD*r_S:dIL9c[8Y>V42R0"!"yb_zN,f#%.[PYYNq; m"_0v; ~rUM2Yy!zmkh)3&U|u!=T(zyv,MHJv"nDH>OJ`t(@mil461d_B'Uo|'nMwlKe0Mv=kvV?Nh@>Hb<3s_z2jYgZhPb@?Wi^x1a~Hplz1.zH Cc: Subject: Re: USB MIDI patch for FreeBSD 8/9 X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Feb 2011 19:52:47 -0000 On Thu, 17 Feb 2011 19:00:39 +0100 Hans Petter Selasky wrote: > On Thursday 17 February 2011 11:18:40 Hans Petter Selasky wrote: > > Dear all USB MIDI freaks using FreeBSD 8+! > > > > After some more testing I'm going to push a patch for the USB AUDIO driver > > that improves USB MIDI on FreeBSD. I'm sending the patch out for review so > > that users get a chance to try out the changes before they get committed. > > The patch should apply to 8.2-RELEASE aswell as 9-CURRENT. > > > > How to apply: > > > > cd /usr/src/sys/dev/sound/usb/ > > cat umidi_patch_001.txt | patch > > > > A short summary of what the changes are about: > > > > - Make the USB MIDI driver more OSS compliant by implementing the > > correct data format for the /dev/umidiX.Y character devices. Also > > implement some missing OSS MIDI ioctls. > > - Use the USB stack's builtin clear-stall feature. > > - Wrap some long lines. > > - Use memcpy() instead of bcopy(). > - Use memset() instead of bzero(). > > > > --HPS > > Found some bugs in my initial patch after testing. Attaching new one. I tried it, my (usb) keyboard (Evolution eKeys 37) is detected, but my Roland Edirol SD-20 is not (because it reports as vendor class, so not surprising). Anyway, output from /var/log/messages when both the eKey 37 and the SD-20 is attached and I kldload snd_uaudio: Feb 20 20:44:58 kg-v7 kernel: uaudio0: on usbus0 Feb 20 20:44:58 kg-v7 kernel: uaudio0: No playback! Feb 20 20:44:58 kg-v7 kernel: uaudio0: No recording! Feb 20 20:44:58 kg-v7 kernel: uaudio0: MIDI sequencer Feb 20 20:44:58 kg-v7 kernel: pcm6: on uaudio0 Feb 20 20:44:58 kg-v7 root: Unknown USB device: vendor 0x0a4d product 0x00d2 bus uhub2 and usbconfig output for completeness: root@kg-v7# usbconfig -u 0 -a 3 ugen0.3: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON root@kg-v7# usbconfig -u 0 -a 4 ugen0.4: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON HTH -- Torfinn