usb: gadget: f_uac1: Change volume name and remove alt names
Subsystems (2)
PATCH v3 1/1 usb: gadget: f_uac1: Change volume name and remove alt names
From: Chris Wulff <[email protected]>
This changes the UAPI to align with disussion of alt settings work.
fu_name is renamed to fu_vol_name, and alt settings mode names are removed for now in favor of future work where they will be settable in subdirectories for each alt mode.
discussion thread for api changes for alt mode settings:
https://lore.kernel.org/linux-usb/[email protected]/T/
---
v3: Corrected semantics of c_/p_ strings to match other c_/p_ settings.
v2: Moved discussion thread tidbit into commit message
https://lore.kernel.org/all/[email protected]/
v1: https://lore.kernel.org/all/[email protected]/
--- .../ABI/testing/configfs-usb-gadget-uac1 | 8 +-- Documentation/usb/gadget-testing.rst | 8 +-- drivers/usb/gadget/function/f_uac1.c | 64 ++++++++----------- drivers/usb/gadget/function/u_uac1.h | 8 +-- 4 files changed, 32 insertions(+), 56 deletions(-)
Documentation/ABI/testing/configfs-usb-gadget-uac1 +2 -6
@@ -33,13 +33,9 @@ Description: p_it_name playback input terminal name p_it_ch_name playback channels name p_ot_name playback output terminal name - p_fu_name playback functional unit name - p_alt0_name playback alt mode 0 name - p_alt1_name playback alt mode 1 name + p_fu_vol_name playback mute/volume functional unit name c_it_name capture input terminal name c_it_ch_name capture channels name c_ot_name capture output terminal name - c_fu_name capture functional unit name - c_alt0_name capture alt mode 0 name - c_alt1_name capture alt mode 1 name + c_fu_vol_name capture mute/volume functional unit name ===================== =======================================
Documentation/usb/gadget-testing.rst +2 -6
@@ -960,15 +960,11 @@ The uac1 function provides these attributes in its function directory: p_it_name playback input terminal name p_it_ch_name playback channels name p_ot_name playback output terminal name - p_fu_name playback functional unit name - p_alt0_name playback alt mode 0 name - p_alt1_name playback alt mode 1 name + p_fu_vol_name playback mute/volume functional unit name c_it_name capture input terminal name c_it_ch_name capture channels name c_ot_name capture output terminal name - c_fu_name capture functional unit name - c_alt0_name capture alt mode 0 name - c_alt1_name capture alt mode 1 name + c_fu_vol_name capture mute/volume functional unit name ================ ==================================================== The attributes have sane default values.
drivers/usb/gadget/function/f_uac1.c +26 -38
96 lines not on this page · raw message
drivers/usb/gadget/function/u_uac1.h +2 -6
@@ -57,16 +57,12 @@ struct f_uac1_opts {char p_it_name[USB_MAX_STRING_LEN ];char p_it_ch_name[USB_MAX_STRING_LEN ];char p_ot_name[USB_MAX_STRING_LEN ]; -char p_fu_name[USB_MAX_STRING_LEN ]; -char p_alt0_name[USB_MAX_STRING_LEN ]; -char p_alt1_name[USB_MAX_STRING_LEN ]; +char p_fu_vol_name[USB_MAX_STRING_LEN ];char c_it_name[USB_MAX_STRING_LEN ];char c_it_ch_name[USB_MAX_STRING_LEN ];char c_ot_name[USB_MAX_STRING_LEN ]; -char c_fu_name[USB_MAX_STRING_LEN ]; -char c_alt0_name[USB_MAX_STRING_LEN ]; -char c_alt1_name[USB_MAX_STRING_LEN ]; +char c_fu_vol_name[USB_MAX_STRING_LEN ];struct mutex lock;int refcnt;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerQuoted 10 lines · On Sat, Aug 03, 2024 at 08:29:13PM -0400, [email protected] wrote:
From: Chris Wulff <[email protected]>
This changes the UAPI to align with disussion of alt settings work.
fu_nameis renamed tofu_vol_name, and alt settings mode names are removed for now in favor of future work where they will be settable in subdirectories for each alt mode.discussion thread for api changes for alt mode settings:
https://lore.kernel.org/linux-usb/[email protected]/T/
What is now going to break due to this change? What userspace tools use the old names that need to be changed?
Are you _SURE_ that you can rename external files like this and everything will keep on working?
thanks,
greg k-h
Quoted 10 lines · Greg Kroah-Hartman
Quoted 8 lines · On Sat, Aug 03, 2024 at 08:29:13PM -0400, [email protected] wrote:
From: Chris Wulff <[email protected]>
This changes the UAPI to align with disussion of alt settings work.
fu_nameis renamed tofu_vol_name, and alt settings mode names are removed for now in favor of future work where they will be settable in subdirectories for each alt mode.
Quoted 8 lines
Quoted 2 lines
discussion thread for api changes for alt mode settings:
https://lore.kernel.org/linux-usb/[email protected]/T/What is now going to break due to this change? What userspace tools use the old names that need to be changed?
Are you _SURE_ that you can rename external files like this and everything will keep on working?
Nothing is using them, since they were just introduced. I wanted to get the API changed before they make it to mainline and somebody starts using them.
You just applied the patch that introduced them into usb-next on 7/31/2024, just after v6.11-rc1 so they haven't yet made it to the mainline kernel.
This is the patch that introduces them:
Quoted 4 lines
thanks,
greg k-h
Greg Kroah-Hartman
maintainerQuoted 25 lines · Chris Wulff
Quoted 10 lines · Greg Kroah-Hartman
Quoted 8 lines · On Sat, Aug 03, 2024 at 08:29:13PM -0400, [email protected] wrote:
From: Chris Wulff <[email protected]>
This changes the UAPI to align with disussion of alt settings work.
fu_nameis renamed tofu_vol_name, and alt settings mode names are removed for now in favor of future work where they will be settable in subdirectories for each alt mode.Quoted 8 lines
Quoted 2 lines
discussion thread for api changes for alt mode settings:
https://lore.kernel.org/linux-usb/[email protected]/T/What is now going to break due to this change? What userspace tools use the old names that need to be changed?
Are you _SURE_ that you can rename external files like this and everything will keep on working?
Nothing is using them, since they were just introduced. I wanted to get the API changed before they make it to mainline and somebody starts using them.
Quoted 6 lines
You just applied the patch that introduced them into usb-next on 7/31/2024, just after v6.11-rc1 so they haven't yet made it to the mainline kernel.
This is the patch that introduces them:
Ah, thanks, I totally forgot that. Remember, I deal with about 1000+ patches a week...
thanks,
greg k-h