mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2026-01-27 20:49:52 +00:00
The Playback/Capture ctl currently reports rate value set by USB control selector UAC2_CS_CONTROL_SAM_FREQ (fixed for UAC1). When the stops playback/capture, the reported value does not change. The gadget side has no information whether the host has started/stopped capture/playback. This patch sets the value reported by the respective rate ctl to zero when the host side has stopped playback/capture. Also, it calls snd_ctl_notify when start/stop occurs, so that a subscribed client can act appropriately. Tests have confirmed that USB hosts change UAC2_CS_CONTROL_SAM_FREQ before switching altsetting to activate playback/capture, resulting in correct order (params->c/p_srate is set to requested rate before u_audio_start_capture/playback is called). The gadget rate notifications are used by user-space audio gadget controller gaudio_ctl https://github.com/pavhofman/gaudio_ctl. Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com> Link: https://lore.kernel.org/r/20220121155308.48794-8-pavel.hofman@ivitera.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
||
|---|---|---|
| .. | ||
| f_acm.c | ||
| f_ecm.c | ||
| f_eem.c | ||
| f_fs.c | ||
| f_hid.c | ||
| f_loopback.c | ||
| f_mass_storage.c | ||
| f_mass_storage.h | ||
| f_midi.c | ||
| f_ncm.c | ||
| f_obex.c | ||
| f_phonet.c | ||
| f_printer.c | ||
| f_rndis.c | ||
| f_serial.c | ||
| f_sourcesink.c | ||
| f_subset.c | ||
| f_tcm.c | ||
| f_uac1_legacy.c | ||
| f_uac1.c | ||
| f_uac2.c | ||
| f_uvc.c | ||
| f_uvc.h | ||
| g_zero.h | ||
| Makefile | ||
| ndis.h | ||
| rndis.c | ||
| rndis.h | ||
| storage_common.c | ||
| storage_common.h | ||
| tcm.h | ||
| u_audio.c | ||
| u_audio.h | ||
| u_ecm.h | ||
| u_eem.h | ||
| u_ether_configfs.h | ||
| u_ether.c | ||
| u_ether.h | ||
| u_fs.h | ||
| u_gether.h | ||
| u_hid.h | ||
| u_midi.h | ||
| u_ncm.h | ||
| u_phonet.h | ||
| u_printer.h | ||
| u_rndis.h | ||
| u_serial.c | ||
| u_serial.h | ||
| u_tcm.h | ||
| u_uac1_legacy.c | ||
| u_uac1_legacy.h | ||
| u_uac1.h | ||
| u_uac2.h | ||
| u_uvc.h | ||
| uac_common.h | ||
| uvc_configfs.c | ||
| uvc_configfs.h | ||
| uvc_queue.c | ||
| uvc_queue.h | ||
| uvc_v4l2.c | ||
| uvc_v4l2.h | ||
| uvc_video.c | ||
| uvc_video.h | ||
| uvc.h | ||