Re: [PATCH v2] usb: gadget: f_uac2: Expose all string descriptors through configfs.

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

 



>From: Pavel Hofman <pavel.hofman@xxxxxxxxxxx>
>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@xxxxxxxxxxx>
>>>
>>> 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@xxxxxxxxxxx/
>>> 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@xxxxxxxxxxx/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




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux