usb: gadget: f_uac1: allow changing interface name via configfs
Subsystems (2)
PATCH 1/2 usb: gadget: f_uac1: allow changing interface name via configfs
This adds "function_name" configfs entry to change string value of the iInterface field. This field will be shown in Windows' audio settings panel, so being able to change it is useful. It will default to "AC Interface" just as before if unchanged.
Signed-off-by Yunhao Tian <[email protected]>
--- .../ABI/testing/configfs-usb-gadget-uac1 | 1 + Documentation/usb/gadget-testing.rst | 1 + drivers/usb/gadget/function/f_uac1.c | 46 ++++++++++++++++++- drivers/usb/gadget/function/u_uac1.h | 2 + 4 files changed, 49 insertions(+), 1 deletion(-)
Documentation/ABI/testing/configfs-usb-gadget-uac1 +1 -0
@@ -23,4 +23,5 @@ Description: p_volume_res playback volume control resolution (in 1/256 dB) req_number the number of pre-allocated request for both capture and playback + function_name name of the interface ========== ===================================
Documentation/usb/gadget-testing.rst +1 -0
@@ -745,6 +745,7 @@ The uac2 function provides these attributes in its function directory: p_volume_res playback volume control resolution (in 1/256 dB) req_number the number of pre-allocated request for both capture and playback + function_name name of the interface ================ ==================================================== The attributes have sane default values.
drivers/usb/gadget/function/f_uac1.c +45 -1
82 lines not on this page · raw message
drivers/usb/gadget/function/u_uac1.h +2 -0
@@ -51,6 +51,8 @@ struct f_uac1_opts {int req_number; unsigned bound:1; +char function_name[32 ]; +struct mutex lock;int refcnt; };
Signature · 1 line
2.25.1
PATCH 2/2 usb: gadget: f_uac2: allow changing interface name via configfs
This adds "function_name" configfs entry to change string value of the iInterface field. This field will be shown in Windows' audio settings panel, so being able to change it is useful. It will default to "Source/Sink" just as before.
Signed-off-by Yunhao Tian <[email protected]>
--- .../ABI/testing/configfs-usb-gadget-uac2 | 1 + Documentation/usb/gadget-testing.rst | 1 + drivers/usb/gadget/function/f_uac2.c | 46 ++++++++++++++++++- drivers/usb/gadget/function/u_uac2.h | 2 + 4 files changed, 49 insertions(+), 1 deletion(-)
Documentation/ABI/testing/configfs-usb-gadget-uac2 +1 -0
@@ -23,4 +23,5 @@ Description: p_volume_min playback volume control min value (in 1/256 dB) p_volume_max playback volume control max value (in 1/256 dB) p_volume_res playback volume control resolution (in 1/256 dB) + function_name name of the interface ========= ============================
Documentation/usb/gadget-testing.rst +1 -0
@@ -934,6 +934,7 @@ The uac1 function provides these attributes in its function directory: p_volume_res playback volume control resolution (in 1/256 dB) req_number the number of pre-allocated request for both capture and playback + function_name name of the interface ================ ==================================================== The attributes have sane default values.
drivers/usb/gadget/function/f_uac2.c +45 -1
82 lines not on this page · raw message
drivers/usb/gadget/function/u_uac2.h +2 -0
@@ -59,6 +59,8 @@ struct f_uac2_opts {int fb_max;bool bound; +char function_name[32 ]; +struct mutex lock;int refcnt; };
Signature · 1 line
2.25.1