Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 May 2013 10:44:19 +0200
From:      =?utf-8?Q?Hans_Petter_Selasky?= <hans.petter.selasky@bitfrost.no>
To:        =?utf-8?Q?Shane_Ambler?= <FreeBSD@ShaneWare.Biz>
Cc:        =?utf-8?Q?freebsd-multimedia=40freebsd=2Eorg?= <freebsd-multimedia@freebsd.org>
Subject:   RE: usb midi support for Alesis keyboard
Message-ID:  <zarafa.51973f63.523f.47a46f32686d827f@eric2.bitfrost>
In-Reply-To: <51973844.9040806@ShaneWare.Biz>
References:  <51973844.9040806@ShaneWare.Biz>

next in thread | previous in thread | raw e-mail | index | archive | help

Hi,



 

You should use /usr/ports/jack_umidi to create jack nodes which your other software can access. The USB MIDI nodes are 100% raw data and not interconnected with the sound system in FreeBSD!



 

--HPS

 

-----Original message-----

From:Shane Ambler <FreeBSD@ShaneWare.Biz>

Sent:Sat 18-05-2013 10:13

Subject:Re: usb midi support for Alesis keyboard

To:Hans Petter Selasky <hans.petter.selasky@bitfrost.no>; 

CC:freebsd-multimedia@freebsd.org; 

On 18/05/2013 16:49, Hans Petter Selasky wrote:

> Hi,

>

> Try this patch:

>

> http://svnweb.freebsd.org/changeset/base/250765

>



With the device disconnecting - hw.usb.no_cs_fail=1 stopped that.



/dev/midistat still says no midi devices.

plug/un-plug creates/deletes /dev/umidi0.0 -> 15 (they are stable 

without the disconnecting)



I'll try the patch and see how that goes. I rebuilt world to update to

9.1-RELEASE-p3 last night. Using a dtrace enabled kernel built with clang.



The Q49 is plugged directly into a usb2.0/1.1 socket at the back of the 

motherboard.



I get the following from usbdump from a middle c

followed by usbconfig dump_curr_config_desc



# usbdump -i usbus2 -f 6 -s 65536 -vvv

16:28:47.266708 usbus2.6 

DONE-BULK-EP=00000081,SPD=FULL,NFR=1,SLEN=64,IVAL=0,ERR=0

  frame[0] READ 64 bytes

  0000  09 90 3C 5A 00 00 00 00  00 00 00 00 00 00 00 00  |..<Z............|

  0010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

  0020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

  0030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

  flags 0x12 <SHORT_XFER_OK|PROXY_BUFFER|0>

  status 0xeb021 

<OPEN|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CURR_DMA_SET|CAN_CANCEL_IMMED|DOING_CALLBACK|0>

16:28:47.266713 usbus2.6 SUBM-BULK-EP=00000081,SPD=FULL,NFR=1,SLEN=0,IVAL=0

  frame[0] READ 64 bytes

  flags 0x12 <SHORT_XFER_OK|PROXY_BUFFER|0>

  status 0xeb023 

<OPEN|TRANSFERRING|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CURR_DMA_SET|CAN_CANCEL_IMMED|DOING_CALLBACK|0>

16:28:47.403588 usbus2.6 

DONE-BULK-EP=00000081,SPD=FULL,NFR=1,SLEN=64,IVAL=0,ERR=0

  frame[0] READ 64 bytes

  0000  08 80 3C 40 00 00 00 00  00 00 00 00 00 00 00 00  |..<@............|

  0010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

  0020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

  0030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

  flags 0x12 <SHORT_XFER_OK|PROXY_BUFFER|0>

  status 0xcb021 

<OPEN|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|DOING_CALLBACK|0>

16:28:47.403593 usbus2.6 SUBM-BULK-EP=00000081,SPD=FULL,NFR=1,SLEN=0,IVAL=0

  frame[0] READ 64 bytes

  flags 0x12 <SHORT_XFER_OK|PROXY_BUFFER|0>

  status 0xcb023 

<OPEN|TRANSFERRING|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|DOING_CALLBACK|0>









# usbconfig -u 2 -a 6 dump_curr_config_desc

ugen2.6: <Q49 Alesis> at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON





  Configuration index 0



     bLength = 0x0009

     bDescriptorType = 0x0002

     wTotalLength = 0x0065

     bNumInterfaces = 0x0002

     bConfigurationValue = 0x0001

     iConfiguration = 0x0000  <no string>

     bmAttributes = 0x00a0

     bMaxPower = 0x0032



     Interface 0

       bLength = 0x0009

       bDescriptorType = 0x0004

       bInterfaceNumber = 0x0000

       bAlternateSetting = 0x0000

       bNumEndpoints = 0x0000

       bInterfaceClass = 0x0001

       bInterfaceSubClass = 0x0001

       bInterfaceProtocol = 0x0000

       iInterface = 0x0000  <no string>



       Additional Descriptor



       bLength = 0x09

       bDescriptorType = 0x24

       bDescriptorSubType = 0x01

        RAW dump:

        0x00 | 0x09, 0x24, 0x01, 0x00, 0x01, 0x09, 0x00, 0x01,

        0x08 | 0x01





     Interface 1

       bLength = 0x0009

       bDescriptorType = 0x0004

       bInterfaceNumber = 0x0001

       bAlternateSetting = 0x0000

       bNumEndpoints = 0x0002

       bInterfaceClass = 0x0001

       bInterfaceSubClass = 0x0003

       bInterfaceProtocol = 0x0000

       iInterface = 0x0000  <no string>



       Additional Descriptor



       bLength = 0x07

       bDescriptorType = 0x24

       bDescriptorSubType = 0x01

        RAW dump:

        0x00 | 0x07, 0x24, 0x01, 0x00, 0x01, 0x41, 0x00





       Additional Descriptor



       bLength = 0x06

       bDescriptorType = 0x24

       bDescriptorSubType = 0x02

        RAW dump:

        0x00 | 0x06, 0x24, 0x02, 0x01, 0x01, 0x00





       Additional Descriptor



       bLength = 0x06

       bDescriptorType = 0x24

       bDescriptorSubType = 0x02

        RAW dump:

        0x00 | 0x06, 0x24, 0x02, 0x02, 0x02, 0x00





       Additional Descriptor



       bLength = 0x09

       bDescriptorType = 0x24

       bDescriptorSubType = 0x03

        RAW dump:

        0x00 | 0x09, 0x24, 0x03, 0x01, 0x03, 0x01, 0x02, 0x01,

        0x08 | 0x00



       Additional Descriptor



       bLength = 0x09

       bDescriptorType = 0x24

       bDescriptorSubType = 0x03

        RAW dump:

        0x00 | 0x09, 0x24, 0x03, 0x02, 0x04, 0x01, 0x01, 0x01,

        0x08 | 0x00



      Endpoint 0

         bLength = 0x0009

         bDescriptorType = 0x0005

         bEndpointAddress = 0x0001  <OUT>

         bmAttributes = 0x0002  <BULK>

         wMaxPacketSize = 0x0040

         bInterval = 0x0000

         bRefresh = 0x0000

         bSynchAddress = 0x0000



       Additional Descriptor



       bLength = 0x05

       bDescriptorType = 0x25

       bDescriptorSubType = 0x01

        RAW dump:

        0x00 | 0x05, 0x25, 0x01, 0x01, 0x01





      Endpoint 1

         bLength = 0x0009

         bDescriptorType = 0x0005

         bEndpointAddress = 0x0081  <IN>

         bmAttributes = 0x0002  <BULK>

         wMaxPacketSize = 0x0040

         bInterval = 0x0000

         bRefresh = 0x0000

         bSynchAddress = 0x0000



       Additional Descriptor



       bLength = 0x05

       bDescriptorType = 0x25

       bDescriptorSubType = 0x01

        RAW dump:

        0x00 | 0x05, 0x25, 0x01, 0x01, 0x03








From owner-freebsd-multimedia@FreeBSD.ORG  Sat May 18 09:43:27 2013
Return-Path: <owner-freebsd-multimedia@FreeBSD.ORG>
Delivered-To: freebsd-multimedia@freebsd.org
Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 8798C1ED
 for <freebsd-multimedia@freebsd.org>; Sat, 18 May 2013 09:43:27 +0000 (UTC)
 (envelope-from ralf.mardorf@alice-dsl.net)
Received: from smtp-out007b.alice-dsl.net (smtp-out007B.alice-dsl.net
 [88.44.63.7]) by mx1.freebsd.org (Postfix) with ESMTP id 1BE7E9B2
 for <freebsd-multimedia@freebsd.org>; Sat, 18 May 2013 09:43:26 +0000 (UTC)
Received: from out.alice-dsl.de ([192.168.125.61]) by
 smtp-out007b.alice-dsl.net with Microsoft SMTPSVC(6.0.3790.3959);
 Sat, 18 May 2013 11:42:44 +0200
Received: from [78.50.20.40] ([78.50.20.40]) by out.alice-dsl.de over TLS
 secured channel with Microsoft SMTPSVC(6.0.3790.3959);
 Sat, 18 May 2013 11:42:30 +0200
Message-ID: <1368870149.671.83.camel@archlinux>
Subject: Re: jackd
From: Ralf Mardorf <ralf.mardorf@alice-dsl.net>
To: freebsd-multimedia@freebsd.org
Date: Sat, 18 May 2013 11:42:29 +0200
In-Reply-To: <20130518154752.W86776@sola.nimnet.asn.au>
References: <1368803054.1374.8.camel@localhost>
 <20130518154752.W86776@sola.nimnet.asn.au>
Content-Type: text/plain; charset="UTF-8"
X-Mailer: Evolution 3.8.2
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 18 May 2013 09:42:31.0004 (UTC)
 FILETIME=[042FB9C0:01CE53AC]
X-BeenThere: freebsd-multimedia@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Multimedia discussions <freebsd-multimedia.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-multimedia>,
 <mailto:freebsd-multimedia-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-multimedia>;
List-Post: <mailto:freebsd-multimedia@freebsd.org>
List-Help: <mailto:freebsd-multimedia-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia>,
 <mailto:freebsd-multimedia-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 18 May 2013 09:43:27 -0000

On Sat, 2013-05-18 at 17:02 +1000, Ian Smith wrote:
> Re what Diane said, that seems also to be the case on linux

Hi :)

I reply from my "pro-audio" (bizarre term) Linux DAW ;). Are you talking
about real-time for the users?

On Linux even a vanilla kernel can be used with real-time abilities +
you can configure it to _full_ preemption and enable threadirqs when
booting, without patching the kernel. Im using a real-time patch for my
kernels, but the difference to a full preempted kernel are minimal.

Usually real-time permissions are given to the user by PAM,
http://www.jackaudio.org/linux_rt_config .

FWIW if on FreeBSD real-time is an issue, there still is the possibility
to take care about some other stuff, that could harm audio performance.

On my machine I unbind some USB ports, that share the IRQ with one of my
sound cards.

echo -n "0000:00:13.2" > /sys/bus/pci/drivers/ohci_hcd/unbind
echo -n "0000:00:13.4" > /sys/bus/pci/drivers/ohci_hcd/unbind

There isn't a difference for the performance on my machine, but perhaps
this can help on other machines.

You can stop services, bluetooth, cups, resp. remove drivers for
firewire, parallel port, printer.

http://wiki.linuxmusicians.com/doku.php?id=system_configuration

It's said that editing PCI bus latency isn't a good idea and IIRC it has
got no impact to PCIe, but I might be mistaken.

http://www.mythtv.org/wiki/PCI_Latency

Using Linux for pro-audio (this term simply is for "good working audio",
not only for professional usage ;) IMO still is luck of the draw, but
possible and this by running jackd as user.

Regards,
Ralf





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?zarafa.51973f63.523f.47a46f32686d827f>