Skip to contentSkip to conversation

about usb midi endpoints quirks

DISCUSSION Martin Langer 2 participants 4 messages Jul 29, 2003 – Jul 31, 2003

lore
Share & tools
lore
#0 lore raw

Hi,

looking into usbquirks.h I saw that audio endpoints follow the rule:

	0x0...  for output
	0x8...  for input

I think that's absolutely ok!

And now: If I jump into the usb-midi world and try a similar quirk:

       .out_ep = 0x06,
       .in_ep = 0x86,

it will end with an "usb_submit_urb: -22" :-(

OTOH the use of

    	.out_ep = 0x06,
	.in_ep = 0x06,

will be accepted! :-)
And I believe the USB MIDI device definition use 0x8.. values for inputs.

Is that ALSA design (0x0.. numbers for input endpoints) really wanted? Ok, it's also possible that my Tascam US-122 is far away from any standard out there...

martin

-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01

#1 lore raw
Quoted 4 lines · Martin Langer

looking into usbquirks.h I saw that audio endpoints follow the rule:

	0x0...  for output
	0x8...  for input

I think that's absolutely ok!

This is for the endpoint field of the audioformat structure.

Quoted 10 lines

And now: If I jump into the usb-midi world and try a similar quirk:

       .out_ep = 0x06,
       .in_ep = 0x86,

it will end with an "usb_submit_urb: -22" :-(

OTOH the use of

    	.out_ep = 0x06,
	.in_ep = 0x06,

will be accepted! :-)
And I believe the USB MIDI device definition use 0x8.. values for inputs.

The USB protocol defines an endpoint number as a 4-bit integer. Additionally, input and output endpoints are distinct, and are distinguished, when necessary, with bit 7 (0x80).

The audioformat structure is the same for both input and output, therefore it requires the "input" flag. The MIDI quirk structure has separate fields for input and output endpoints, so you must not use 0x80 in this case.

HTH
Clemens

-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01

#2 lore raw
Quoted 19 lines · Clemens Ladisch
Quoted 4 lines · Martin Langer

looking into usbquirks.h I saw that audio endpoints follow the rule:

	0x0...  for output
	0x8...  for input

I think that's absolutely ok!

This is for the endpoint field of the audioformat structure.

Quoted 10 lines

And now: If I jump into the usb-midi world and try a similar quirk:

       .out_ep = 0x06,
       .in_ep = 0x86,

it will end with an "usb_submit_urb: -22" :-(

OTOH the use of

    	.out_ep = 0x06,
	.in_ep = 0x06,

will be accepted! :-)
And I believe the USB MIDI device definition use 0x8.. values for inputs.

Quoted 8 lines

The USB protocol defines an endpoint number as a 4-bit integer. Additionally, input and output endpoints are distinct, and are distinguished, when necessary, with bit 7 (0x80).

The audioformat structure is the same for both input and output, therefore it requires the "input" flag. The MIDI quirk structure has separate fields for input and output endpoints, so you must not use 0x80 in this case.

must not???

It doesn't work with the 0x80 flag!!!
Only the 0x00 flag works! That was the point I've tried to explain.

But I agree that the "must not" way would be a nice solution. .......................maybe in the future?

martin

-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01

#3 lore raw
Quoted 8 lines · Martin Langer
Quoted 2 lines · Clemens Ladisch

The MIDI quirk structure has separate fields for input and output endpoints, so you must not use 0x80 in this case.

must not???

It doesn't work with the 0x80 flag!!!
Only the 0x00 flag works! That was the point I've tried to explain.

And this is exactly the same what I tried to say. "you must not" = "you are not allowed to".

Regards
Clemens

-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01