All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 00/10] usb: gadget: audio: Multiple rates, notify
@ 2022-01-10  7:37 Pavel Hofman
  2022-01-10  7:37 ` [PATCH v4 01/10] usb: gadget:audio: Replace deprecated macro S_IRUGO Pavel Hofman
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Pavel Hofman @ 2022-01-10  7:37 UTC (permalink / raw)
  To: linux-usb
  Cc: Pavel Hofman, Ruslan Bilovol, Felipe Balbi, Jerome Brunet,
	Julian Scheel, John Keeping, Greg Kroah-Hartman

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.

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

v3:
* Implemented most of changes suggested by John Keeping
* Patches for bInterval calculation moved to a separate patch series
* Patches for stopping substreams moved to a separate patch series
* audio: Replaced deprecated macro S_IRUGO
* u_audio: Moved dynamic srate from params to rtd
* f_uac2: removed current state srates from struct f_uac2_opts, using
  u_audio_get_playback/capture_srate() instead.
* f_uac2: Reworked macros for struct cntrl_ranges_lay3_xxx

v4:
* Fixed the unused-but-set-variable warnings
* Patch "usb: gadget: f_uac2: Rename Clock Sources to fixed names"
  squashed to patch "usb: gadget: f_uac2: Support multiple sampling
  rates"


Julian Scheel (3):
  usb: gadget: u_audio: Support multiple sampling rates
  usb: gadget: f_uac2: Support multiple sampling rates
  usb: gadget: f_uac1: Support multiple sampling rates

Pavel Hofman (7):
  usb: gadget:audio: Replace deprecated macro S_IRUGO
  usb: gadget: u_audio: Move dynamic srate from params to rtd
  usb: gadget: u_audio: Add capture/playback srate getter
  usb: gadget: u_audio: Rate ctl notifies about current srate
    (0=stopped)
  usb: gadget: u_audio: Add suspend call
  usb: gadget: f_uac2: Add suspend callback
  usb: gadget: f_uac1: Add suspend callback

 .../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          | 190 ++++++++++++--
 drivers/usb/gadget/function/f_uac2.c          | 207 ++++++++++++---
 drivers/usb/gadget/function/u_audio.c         | 238 ++++++++++++++++--
 drivers/usb/gadget/function/u_audio.h         |  14 +-
 drivers/usb/gadget/function/u_uac1.h          |   5 +-
 drivers/usb/gadget/function/u_uac2.h          |   5 +-
 drivers/usb/gadget/function/uac_common.h      |   9 +
 drivers/usb/gadget/legacy/audio.c             |  78 +++---
 11 files changed, 632 insertions(+), 130 deletions(-)
 create mode 100644 drivers/usb/gadget/function/uac_common.h

-- 
2.25.1


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

end of thread, other threads:[~2022-01-12 15:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-10  7:37 [PATCH v4 00/10] usb: gadget: audio: Multiple rates, notify Pavel Hofman
2022-01-10  7:37 ` [PATCH v4 01/10] usb: gadget:audio: Replace deprecated macro S_IRUGO Pavel Hofman
2022-01-10  7:37 ` [PATCH v4 02/10] usb: gadget: u_audio: Support multiple sampling rates Pavel Hofman
2022-01-10  7:37 ` [PATCH v4 03/10] usb: gadget: u_audio: Move dynamic srate from params to rtd Pavel Hofman
2022-01-10  7:37 ` [PATCH v4 04/10] usb: gadget: u_audio: Add capture/playback srate getter Pavel Hofman
2022-01-10  7:37 ` [PATCH v4 05/10] usb: gadget: f_uac2: Support multiple sampling rates Pavel Hofman
2022-01-12 15:19   ` kernel test robot
2022-01-10  7:37 ` [PATCH v4 06/10] usb: gadget: f_uac1: " Pavel Hofman
2022-01-10  7:37 ` [PATCH v4 07/10] usb: gadget: u_audio: Rate ctl notifies about current srate (0=stopped) Pavel Hofman
2022-01-10  7:37 ` [PATCH v4 08/10] usb: gadget: u_audio: Add suspend call Pavel Hofman
2022-01-10  7:37 ` [PATCH v4 09/10] usb: gadget: f_uac2: Add suspend callback Pavel Hofman
2022-01-10  7:37 ` [PATCH v4 10/10] usb: gadget: f_uac1: " 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.