linux-stable/drivers/usb/gadget
Pavel Hofman 6fec018a7e usb: gadget: u_audio.c: Adding Playback Pitch ctl for sync playback
EP IN is hard-coded as ASYNC both in f_uac1 and f_uac2 but u_audio sends
steady number of audio frames in each USB packet, without any control.

This patch adds 'Playback Pitch 1000000' ctl analogous to the existing
'Capture Pitch 1000000' ctl. The calculation of playback req->length in
u_audio_iso_complete respects the Playback Pitch ctl value to 1ppm now.

Max. value for Playback Pitch is configured by the existing parameter
uac2_opts->fb_max, used also for the Capture Pitch.

Since the EP IN packet size can be increased by uac2_opts->fb_max now,
maxPacketSize for the playback direction is calculated by the same
algorithm as for the async capture direction in
f_uac2.c:set_ep_max_packet_size.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Link: https://lore.kernel.org/r/20211013073934.36476-1-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-13 13:59:43 +02:00
..
function usb: gadget: u_audio.c: Adding Playback Pitch ctl for sync playback 2021-10-13 13:59:43 +02:00
legacy usb: gadget: hid: fix error code in do_config() 2021-10-12 09:31:21 +02:00
udc USB: gadget: udc: Remove some dead code 2021-10-10 15:12:34 +02:00
composite.c usb: gadget: composite: Allow bMaxPower=0 if self-powered 2021-07-21 10:06:47 +02:00
config.c usb: fix various gadget panics on 10gbps cabling 2021-06-09 10:40:08 +02:00
configfs.c usb: gadget: Fix inconsistent indent 2021-08-05 12:31:22 +02:00
configfs.h
epautoconf.c usb: gadget: fix for a typo that conveys logically-inverted information. 2021-09-14 10:27:54 +02:00
functions.c
Kconfig usb: gadget: uvc: add scatter gather support 2021-07-27 15:59:19 +02:00
Makefile
u_f.c
u_f.h USB: gadget: u_f: Unbreak offset calculation in VLAs 2020-08-27 09:25:06 +02:00
u_os_desc.h
usbstring.c