Hi,
I am considering implementation of multiple altsettings to f_uac2, so
that multiple combinations of channels and samplesizes can be offered to
the host.
Configuration:
--------------
* each altsetting for each direction should define
* channel mask
* samplesize
* hs_bint bInterval
* c_sync type (for capture only)
Perhaps the easiest config would be allowing lists for the existing
parameters (like the multiple samplerates were implemented). All the
list params would have to have the same number of items - initial check.
First values in the list would apply to altsetting 1, second to
altsetting 2 etc.
Or the altsetting could be some structured configfs param - please is
there any recommended standard for structured configfs params?
Should the config also adjust the list of allowed samplerates for each
altsetting? Technically it makes sense as higher number of channels can
decrease the max samplerate, e.g. for via a TDM interface. If so, it
would need either the structured configuration or some "list of lists"
format.
Implementation:
---------------
Parameters could be turned to arrays of fixed predefined sizes, like the
p/s_srates. E.g. 5 max. altsettings in each direction would consume only
4 * (5-1) + 3* (5-1) = 28 extra ints (excluding the samplerates config).
Currently all descriptor structs are statically pre-allocated as there
are only two hard-coded altsettings. IMO the descriptors specific for
each altsetting could be allocated dynamically in a loop over all
none-zero alsettings.
Please may I ask UAC2 gadget "stakeholders" for comments, suggestions,
recommendations, so that my eventual initial version was in some
generally acceptable direction?
Thanks a lot,
Pavel.