Linux-USB Archive mirror
 help / color / mirror / Atom feed
* usb:gadget:f_uac2: RFC: allowing multiple altsetttings for channel/samplesize combinations
@ 2024-04-17 11:07 Pavel Hofman
  2024-04-24  7:40 ` Pavel Hofman
  0 siblings, 1 reply; 9+ messages in thread
From: Pavel Hofman @ 2024-04-17 11:07 UTC (permalink / raw
  To: linux-usb@vger.kernel.org, alsa-devel@alsa-project.org
  Cc: Ruslan Bilovol, Felipe Balbi, Jerome Brunet, Julian Scheel,
	Greg Kroah-Hartman, John Keeping, AKASH KUMAR, Jack Pham

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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-05-02 11:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-17 11:07 usb:gadget:f_uac2: RFC: allowing multiple altsetttings for channel/samplesize combinations Pavel Hofman
2024-04-24  7:40 ` Pavel Hofman
2024-04-25  9:22   ` Takashi Iwai
2024-04-25 15:07     ` Pavel Hofman
2024-04-28 15:30       ` Chris Wulff
2024-04-28 16:38         ` Chris Wulff
2024-04-29 15:02           ` Pavel Hofman
2024-04-30 18:51             ` Chris Wulff
2024-05-02 11:13               ` Pavel Hofman

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 read-only IMAP folder(s) and NNTP newsgroup(s).