From: Kristian Amlie <kristian@amlie.name>
To: Daniel Mack <zonque@gmail.com>
Cc: alsa-devel@alsa-project.org, Clemens Ladisch <clemens@ladisch.de>
Subject: Re: How to add a new MIDI device to the usbaudio driver
Date: Tue, 23 Aug 2011 15:12:40 +0200 [thread overview]
Message-ID: <4E53A748.4070404@amlie.name> (raw)
In-Reply-To: <CACTFLAMh2Brji5NBOZjtDmyP-DPR3S4HCP93SO0sE9J7xEn3NQ@mail.gmail.com>
On 08/23/11 14:20, Daniel Mack wrote:
> On Tue, Aug 23, 2011 at 1:57 PM, Kristian Amlie <kristian@amlie.name> wrote:
>> I was not able to to use 31250 baud as you suggested. However, I tried
>> 38400 baud, and that seemed to work. I got a small number of bytes
>> everytime I pressed a key on the instrument.
>>
>> Using the following command line:
>>
>> $ cu -s 38400 -l /dev/ttyUSB0 | hexdump -C
>>
>> and pressing the same key repeatedly with the same force, I got the
>> following output:
>>
>> 00000000 18 f9 ff 18 03 f8 18 f9 ff 18 01 f8 18 f9 ff 18
>> |................|
>> 00000010 01 f8 18 fb ff 18 01 f8 18 fb ff 18 01 f8 18 fb
>> |................|
>> 00000020 ff 18 03 f8 18 f9 ff 18 01 f8 18 fb ff 18 01 f8
>> |................|
>> 00000030 18 fb ff 18 01 f8 18 fb ff 18 01 f8 07 43 6f 6e
>> |.............Con|
>> 00000040 6e 65 63 74 65 64 2e 0a 07 43 6f 6e 6e 65 63 74
>> |nected...Connect|
>> 00000050 65 64 2e 0a 0a 07 44 69 73 63 6f 6e 6e 65 63 74
>> |ed....Disconnect|
>> 00000060 65 64 2e 0a |ed..|
>> 00000064
>
> That hexdump reads as "Connected....Disconnected". Are you sure you
> get useful data from cu?
Quite sure. Those messages are just from cu (I assume), telling me that
I connected and disconnected (by killing it). If I run it without
piping, they appear before and after the bytestream as they should. I
don't really know why they appear at the end in that output; maybe a
buffering issue.
In either case, the important data is in the three first lines. That is
what appears while I'm pressing the keys.
> If you are certain about this, I would recommend you add some debug
> printk() into drivers/usb/serial/ftdi_sio.c and trace what values the
> functions change_speed() and update_mctrl() pass to usb_control_msg()
> when the device is connected and cu is started. Once we have this
> information, I can prepare a patch to add the control messages to the
> MIDI driver.
Alright, I guess it is the urb_value and urb_index values you are
interested in?
Here is the output from one complete run of cu, including connecting,
pressing a key once on the instrument and killing cu afterwards:
[20380.847492] change_speed(): urb_value: 16696, urb_index: 0
[20380.849364] update_mctrl(): urb_value: 771, priv->interface: 0
[20380.851360] change_speed(): urb_value: 49230, urb_index: 0
[20380.854412] change_speed(): urb_value: 49230, urb_index: 0
[20380.857361] change_speed(): urb_value: 49230, urb_index: 0
[20387.615704] change_speed(): urb_value: 16696, urb_index: 0
[20387.619557] update_mctrl(): urb_value: 768, priv->interface: 0
--
Kristian
next prev parent reply other threads:[~2011-08-23 13:12 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-22 10:52 How to add a new MIDI device to the usbaudio driver Kristian Amlie
2011-08-22 10:54 ` Daniel Mack
2011-08-22 11:40 ` Kristian Amlie
2011-08-22 11:49 ` Daniel Mack
2011-08-23 7:35 ` Kristian Amlie
2011-08-23 8:43 ` Daniel Mack
2011-08-23 9:03 ` Paul Menzel
2011-08-23 9:22 ` Daniel Mack
2011-08-23 9:42 ` Kristian Amlie
2011-08-23 10:02 ` Paul Menzel
2011-08-27 10:38 ` Kristian Amlie
2011-08-23 9:38 ` Clemens Ladisch
2011-08-23 9:42 ` Daniel Mack
2011-08-23 10:07 ` Kristian Amlie
2011-08-23 10:16 ` Daniel Mack
2011-08-23 11:57 ` Kristian Amlie
2011-08-23 12:20 ` Daniel Mack
2011-08-23 13:12 ` Kristian Amlie [this message]
2011-08-23 13:16 ` Daniel Mack
2011-08-23 13:28 ` Kristian Amlie
2011-08-23 13:44 ` Daniel Mack
2011-08-24 8:09 ` Kristian Amlie
2011-08-24 8:32 ` Daniel Mack
2011-08-24 10:14 ` Kristian Amlie
2011-08-24 10:29 ` Daniel Mack
2011-08-24 13:14 ` Kristian Amlie
2011-08-24 13:18 ` Daniel Mack
2011-08-24 19:51 ` Clemens Ladisch
2011-08-25 11:28 ` Kristian Amlie
2011-08-25 11:35 ` [PATCH] Added support for Starr Labs USB MIDI devices Kristian Amlie
2011-08-25 12:20 ` Daniel Mack
2011-08-25 13:40 ` Kristian Amlie
2011-08-26 11:24 ` Clemens Ladisch
2011-08-25 12:38 ` How to add a new MIDI device to the usbaudio driver Daniel Mack
2011-08-24 11:44 ` Clemens Ladisch
2011-08-24 12:05 ` Daniel Mack
2011-08-24 13:19 ` Kristian Amlie
2011-08-24 16:01 ` Clemens Ladisch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E53A748.4070404@amlie.name \
--to=kristian@amlie.name \
--cc=alsa-devel@alsa-project.org \
--cc=clemens@ladisch.de \
--cc=zonque@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).