usb: gadget: f_uac1: Support multiple sampling rates
authorJulian Scheel <julian@jusst.de>
Fri, 21 Jan 2022 15:53:04 +0000 (16:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Jan 2022 13:06:08 +0000 (14:06 +0100)
commit695d39ffc2b59b8333ff85724619514f98613205
treecf372ebc45497fa8b10ead635a6f4446e1127203
parenta7339e4f5788bd088bb0be1f96a6cce459676ed0
usb: gadget: f_uac1: Support multiple sampling rates

A list of sampling rates can be specified via configfs. All enabled
sampling rates are sent to the USB host on request. When the host
selects a sampling rate the internal active rate is updated.

Config strings with single value stay compatible with the previous version.

Multiple samplerates passed as configuration arrays to g_audio module
when built for f_uac1.

Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Link: https://lore.kernel.org/r/20220121155308.48794-7-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/ABI/testing/configfs-usb-gadget-uac1
Documentation/usb/gadget-testing.rst
drivers/usb/gadget/function/f_uac1.c
drivers/usb/gadget/function/u_uac1.h
drivers/usb/gadget/legacy/audio.c