Linux-api Archive mirror
 help / color / mirror / Atom feed
From: Chris Wulff <Chris.Wulff@biamp.com>
To: Pavel Hofman <pavel.hofman@ivitera.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	James Gruber <jimmyjgruber@gmail.com>, Lee Jones <lee@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-api@vger.kernel.org" <linux-api@vger.kernel.org>
Subject: Re: [PATCH v2] usb: gadget: f_uac2: Expose all string descriptors through configfs.
Date: Wed, 24 Apr 2024 19:01:05 +0000	[thread overview]
Message-ID: <CO1PR17MB5419DDEE71C3145C158326C6E1102@CO1PR17MB5419.namprd17.prod.outlook.com> (raw)
In-Reply-To: <9b40e148-f3eb-f8f5-bf2d-37a0a0629417@ivitera.com>

>From: Pavel Hofman <pavel.hofman@ivitera.com>
>Sent: Wednesday, April 24, 2024 3:55 AM
>>>> +             p_it_name               playback input terminal name
>>>> +             p_ot_name               playback output terminal name
>>>> +             p_fu_name               playback function unit name
>>>> +             p_alt0_name             playback alt mode 0 name
>>>> +             p_alt1_name             playback alt mode 1 name
>>>
>>> Nacked-by: Pavel Hofman <pavel.hofman@ivitera.com>
>>>
>>> I am not sure adding a numbered parameter for every additional alt mode
>>> is a way to go for the future. I am not that much concerned about UAC1,
>>> but IMO (at least) in UAC2 the configuration method should be flexible
>>> for more alt setttings. I can see use cases with many more altsettings.
>>>
>>> My proposal for adding more alt settings
>>> https://lore.kernel.org/linux-usb/35be4668-58d3-894a-72cf-de1afaacae45@ivitera.com/
>>> suggested using lists to existing parameters where each item would
>>> correspond to the alt setting of the same index (+1). That would allow
>>> using more altsettings easily, without having to add parameters to the
>>> source code and adding configfs params. I received no feedback. I do not
>>> push the param list proposal, but I am convinced an acceptable solution
>>> should be discussed thoroughly by the UAC2 gadget stakeholders.
>>>
>>> I am afraid that once p_alt1_name/c_alt1_name params are accepted, there
>>> will be no way back because subsequent removal of configfs params could
>>> be viewed as a regression for users.
>>
>> I have been thinking about this as well. The alt names are slightly different than the rest of the settings
>> since they also include alt mode 0. I was thinking p/c_alt1_name could be expanded to the array so
>> that the entries line up with the other settings and don't have an extra entry for alt 0. Perhaps a different
>> name would make more sense.
>>
>> Along those lines, I didn't see any gadget drivers using an array of strings for anything, which is also why
>> I didn't try to do anything here that merged alt0/1 names into an array. If we were to do an array of strings
>> I'm not sure what the best separator would be. Maybe ";"? The rates array uses ",".
>>
>> This patch only exposes the existing strings to make them configurable, but I don't want to do anything
>> that would preclude a nice interface for extra alt modes.
>>
>
>Thanks a lot for your response. Please can you take a look at
>https://lore.kernel.org/linux-usb/72e9b581-4a91-2319-cb9f-0bcb370f34a1@ivitera.com/T/ ?
>
>If the params in the upper level were to stand as defaults for the
>altsettings (and for the existing altsetting 1 if no specific altset
>subdir configs were given), maybe the naming xxx_alt1_xxx could become a
>bit confusing. E.g. p_altx_name or p_alt_non0_name?

I am in favor of the subdirs for alt mode settings, with the main config options acting as the default/single
configuration as it is today.

I can change these patches from c/p_alt1_name to c/p_altx_name if nobody objects to that, or I could remove
the alt name from this patch set if anyone thinks this needs more discussion. I don't actually need to set
the alt name for my use case, but included it for completeness.

-- Chris Wulff

  reply	other threads:[~2024-04-24 19:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-23 14:09 [PATCH v2] usb: gadget: f_uac2: Expose all string descriptors through configfs Chris Wulff
2024-04-23 15:38 ` Pavel Hofman
2024-04-23 17:22   ` Chris Wulff
2024-04-24  7:55     ` Pavel Hofman
2024-04-24 19:01       ` Chris Wulff [this message]
2024-04-27 16:27       ` Chris Wulff
2024-04-28 11:49         ` Pavel Hofman

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=CO1PR17MB5419DDEE71C3145C158326C6E1102@CO1PR17MB5419.namprd17.prod.outlook.com \
    --to=chris.wulff@biamp.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jimmyjgruber@gmail.com \
    --cc=lee@kernel.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=pavel.hofman@ivitera.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 read-only IMAP folder(s) and NNTP newsgroup(s).