All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/11] usb: gadget: audio: Multiple rates, dyn. bInterval
@ 2021-12-20 21:11 Pavel Hofman
  2021-12-20 21:11 ` [PATCH v2 01/11] usb: gadget: u_audio: Subdevice 0 for capture ctls Pavel Hofman
                   ` (11 more replies)
  0 siblings, 12 replies; 40+ messages in thread
From: Pavel Hofman @ 2021-12-20 21:11 UTC (permalink / raw)
  To: linux-usb
  Cc: Pavel Hofman, Ruslan Bilovol, Felipe Balbi, Jerome Brunet,
	Julian Scheel, Greg Kroah-Hartman

Hi all,

This series implements:
* Support for multiple rates in the audio gadget
* Notification of gadget-side alsa processes about playback/capture
start/stop on the host side via Playback/Capture Rate controls.
* Detection of the USB cable disconnection by handling SUSPEND call
in f_uac1/2. The disconnection generates a stop notification.
* Dynamic bInterval calculation for HS and SS

Patches for the multirate support, originally authored by Julian Scheel,
were rebased and modified for the current code base. Julian has
acknowledged the presented patches.

The detection of cable disconnection was discussed with dwc2 maintainer
Minas Harutyunyan who confirmed that the suspend event can be used
(https://lore.kernel.org/all/5aada8e3-f385-0589-8d58-187abd1a924d@synopsys.com/T/).
Tests on dwc2 have confirmed reliable detection, the gadget correctly
reports playback/capture stop at cable disconnection.

The start/stop/current rate notification feature is accompanied by
example implementation of audio gadget controller
https://github.com/pavhofman/gaudio_ctl. The controller also handles
debouncing fast start/stop events when USB host audio driver is loaded
and/or audio daemon re/started.

Changes:
--------

v2: Fixed compilation of "usb: gadget: f_uac1: Support multiple sampling
rates" - added changes for CONFIG_GADGET_UAC1

---------
Julian Scheel (4):
  usb: gadget: u_audio: Support multiple sampling rates
  usb: gadget: f_uac2: Support multiple sampling rates
  usb: gadget: f_uac1: Support multiple sampling rates
  usb: gadget: f_uac2: Renaming Clock Sources to fixed names

Pavel Hofman (7):
  usb: gadget: u_audio: Subdevice 0 for capture ctls
  usb: gadget: u_audio: Rate ctl notifies about current srate
    (0=stopped)
  usb: gadget: u_audio: Stopping PCM substream at capture/playback stop
  usb: gadget: u_audio: Adding suspend call
  usb: gadget: f_uac2: Adding suspend callback
  usb: gadget: f_uac1: Adding suspend callback
  usb: gadget: f_uac2: Determining bInterval for HS and SS

 .../ABI/testing/configfs-usb-gadget-uac1      |   4 +-
 .../ABI/testing/configfs-usb-gadget-uac2      |   4 +-
 Documentation/usb/gadget-testing.rst          |   8 +-
 drivers/usb/gadget/function/f_uac1.c          | 121 ++++++++--
 drivers/usb/gadget/function/f_uac2.c          | 221 ++++++++++++------
 drivers/usb/gadget/function/u_audio.c         | 162 ++++++++++++-
 drivers/usb/gadget/function/u_audio.h         |  12 +-
 drivers/usb/gadget/function/u_uac1.h          |  63 ++++-
 drivers/usb/gadget/function/u_uac2.h          |  62 +++++
 drivers/usb/gadget/function/uac_common.h      |   9 +
 drivers/usb/gadget/legacy/audio.c             |  40 +++-
 11 files changed, 597 insertions(+), 109 deletions(-)
 create mode 100644 drivers/usb/gadget/function/uac_common.h

-- 
2.25.1


^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2022-01-07 10:30 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-20 21:11 [PATCH v2 00/11] usb: gadget: audio: Multiple rates, dyn. bInterval Pavel Hofman
2021-12-20 21:11 ` [PATCH v2 01/11] usb: gadget: u_audio: Subdevice 0 for capture ctls Pavel Hofman
2021-12-20 21:11 ` [PATCH v2 02/11] usb: gadget: u_audio: Support multiple sampling rates Pavel Hofman
2021-12-21 11:35   ` John Keeping
2021-12-22  7:13     ` Pavel Hofman
2022-01-04 15:32       ` John Keeping
2022-01-05 10:55         ` Pavel Hofman
2021-12-20 21:11 ` [PATCH v2 03/11] usb: gadget: f_uac2: " Pavel Hofman
2021-12-21 11:59   ` John Keeping
2021-12-22 10:01     ` Pavel Hofman
2022-01-04 15:33       ` John Keeping
2022-01-05 12:20         ` Pavel Hofman
2022-01-05 12:44           ` John Keeping
2022-01-05 14:05             ` Pavel Hofman
2022-01-06  8:45               ` Pavel Hofman
2021-12-20 21:11 ` [PATCH v2 04/11] usb: gadget: f_uac1: " Pavel Hofman
2021-12-20 21:11 ` [PATCH v2 05/11] usb: gadget: f_uac2: Renaming Clock Sources to fixed names Pavel Hofman
2021-12-21 12:02   ` John Keeping
2021-12-22 10:11     ` Pavel Hofman
2021-12-20 21:11 ` [PATCH v2 06/11] usb: gadget: u_audio: Rate ctl notifies about current srate (0=stopped) Pavel Hofman
2021-12-21 12:07   ` John Keeping
2021-12-22 10:41     ` Pavel Hofman
2021-12-20 21:11 ` [PATCH v2 07/11] usb: gadget: u_audio: Stopping PCM substream at capture/playback stop Pavel Hofman
2021-12-21 12:18   ` John Keeping
2021-12-22 12:26     ` Pavel Hofman
2021-12-28  9:04       ` [RFC: PATCH " Pavel Hofman
2021-12-20 21:11 ` [PATCH v2 08/11] usb: gadget: u_audio: Adding suspend call Pavel Hofman
2021-12-20 21:11 ` [PATCH v2 09/11] usb: gadget: f_uac2: Adding suspend callback Pavel Hofman
2021-12-20 21:11 ` [PATCH v2 10/11] usb: gadget: f_uac1: " Pavel Hofman
2021-12-20 21:11 ` [PATCH v2 11/11] usb: gadget: f_uac2: Determining bInterval for HS and SS Pavel Hofman
2021-12-21 12:29   ` John Keeping
2021-12-22 13:35     ` Pavel Hofman
2021-12-22 19:50       ` John Keeping
2021-12-23  7:09         ` Pavel Hofman
2022-01-04 15:33           ` John Keeping
2022-01-05 11:31             ` Pavel Hofman
2022-01-06 14:32               ` John Keeping
2022-01-07 10:30                 ` Pavel Hofman
2021-12-21  7:59 ` [PATCH v2 00/11] usb: gadget: audio: Multiple rates, dyn. bInterval Greg Kroah-Hartman
2021-12-22 13:38   ` Pavel Hofman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.