Re: [PATCH v2 00/37] ALSA: Add MIDI 2.0 support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 28 Jun 2023 08:52:25 +0200,
Symbolic Debugger wrote:
> 
> I have a few question on the implementation
> 
> 1. As stated above:  So the driver may support multiple UMP Endpoints in theory, although most devices are supposed to have a single UMP EP that can contain up
> to 16 groups -- which should be large enough.
> 
> I read (forgot where)  that Windows will  only supports 1 endpoint) . This would results in maximum 16 I/O ports when using one group terminal block per endpoint. Correct ? In that case manufacturers may not create  devices with multiple endpoints ... :-) ?

Yes, that's my point in the above.  It's not much expected that there
will be multiple (UMP) Endpoints on a single device.  In theory it's
still possible, and the Linux driver supports it, but for now, it's
supposed to be exceptional.  Other OS don't seem supporting multiple
EPs, in anyway.

> Per USB spec, One endpoint can support maximum 16 terminal blocks with each 16 groups so one endpoint in theory could support 256 (bi directional) groups and thus 512 ports (256 in/ 256 out)

One UMP EP can have up to 32 Function Blocks.  But the actual
limitation is rather the max number of UMP Groups (16) contained in a
single EP.

> 2. If there is  one in and and out terminal  in an endpoint, then this will be presented as one in and one output port (in ALSA) ? Correct ?

Not really, GTB or FB are merely meta data representing the
associations of UMP Groups on a UMP Endpoint.  The Groups included in
a FB can be even changed dynamically during the runtime, too.
The actual input and output entities are UMP Groups, which correspond
to the former MIDI ports.  GTB and FB indicate how those are tied.

BTW, a UMP Endpoint represents the bidirectional I/O by itself, so
it's a pair of USB Endpoints.

> 3.  bGrpTrmBlkType: are 0x00, 0x01 and 0x02 all supported ?

Yes.

> 4. At the MIDI device, should OUT endpoints be BULK,  and IN endpoints be INTERRUPT or BOTH BULK ? Page 21 of MIDI spec shows BULK for in and out but the descriptor example shows interrupt for IN. Page 19 states: MIDI Streaming Data Endpoints use bulk or interrupt transfers to exchange data with the Host

AFAIK, in most cases, INT is used for MIDI 2.0 USB Input Endpoint,
while BULK is used for USB Output Endpoint.  (On USB MIDI 1.0 spec,
both are BULK, although there have been a few vendor-specific
variants, too).  But the driver can work in ether way.  It just
depends on the USB descriptor.

> 5. Are more than 1 Group Terminal Blocks supported by the driver for one endpoint ?

Yes, and that's the very key point of MIDI 2.0.

> 6. The current driver already uses the Group Terminal Blocks Descriptors Request ?

Yes and no.  On Linux driver, GTBs are referred at first only to find
out a MIDI Endpoint pair.  Then, the driver tries to issue the new UMP
1.1 Stream message to obtain the UMP Endpoint and Function Block
information.  On older devices that don't under those UMP 1.1
messages, the driver falls back and uses GTBs as the primary source
for building a topology.


Takashi



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux