LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v2 0/7] USB Audio Device Class 3.0 BADD profiles support
@ 2018-05-04  1:23 Ruslan Bilovol
  2018-05-04  1:23 ` [PATCH v2 1/7] ALSA: usb: stream: move audioformat alloc/init into separate function Ruslan Bilovol
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Ruslan Bilovol @ 2018-05-04  1:23 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Jorge, Andrew Chant, Greg Kroah-Hartman, alsa-devel, linux-kernel

This patchset adds BADD profiles support from the USB Audio
Device Class 3.0 spec [1].

BADD profile support is defined as mandatory feature of
UAC3-compliant device, it should be implemented as a separate
USB configuration.

Notable issue with BADD configuration is that it misses
class-specific descriptors (and it's mandatory as per spec),
so host should guess them from BADD profile number and
parameters of endpoints (type, number of endpoints and
max packet size)

This patchset adds support of all known/existing BADD profiles
from the UAC3 specification.

First 5 patches are refactoring and improvements, and last 2
patches actually implement UAC3 BADD profiles support.

It's an alternative implementation comparing to [2],
and doesn't build usb descriptors on the host but instead
initializes alsa-usb structures with known parameters,
so we don't need to keep whole class-specific descriptors
in the driver since we anyway need to have BADD-specific
logic.

I've picked one Jorge's UAC1 patch-improvement and
updated it to v4.17 wich contais recently introduced
header's sanity checks.

Remaining part is to add interrupt endpoint support
so we will be able to detect jack insertion in
the Headset Adapter profile.

This has been tested on ARM and x86-64 machines with
custom UAC3 gadget which I'll post later to linux-usb

Comments and testing are welcome.

v2:
  - split refactoring patch to more atomic and bisectable
    changes as suggested by Takashi
  - renamed "Side Tone"->"Sidetone" as suggested by Andrew
  - revorked main BADD patch to have table lookup for
    checking BADD channels validity and to reduce identation
    as suggested by Takashi
  - also removed code duplication in BADD patch by reusing
    common part of build_feature_ctl() func

v1: http://mailman.alsa-project.org/pipermail/alsa-devel/2018-April/134412.html


[1] http://www.usb.org/developers/docs/devclass_docs/USB_Audio_v3.0.zip
[2] https://www.spinics.net/lists/alsa-devel/msg71614.html

Jorge Sanjuan (1):
  ALSA: usb: Only get AudioControl header for UAC1 class.

Ruslan Bilovol (6):
  ALSA: usb: stream: move audioformat alloc/init into separate function
  ALSA: usb: stream: refactor uac1/2 audio interface parsing
  ALSA: usb: stream: refactor uac3 audio interface parsing
  ALSA: usb: mixer: make string parsing independent of mixer_build state
  include: usb: audio-v3: add BADD-specific values
  ALSA: usb: add UAC3 BADD profiles support

 include/linux/usb/audio-v3.h |  26 ++
 sound/usb/card.c             |  53 ++--
 sound/usb/clock.c            |   9 +-
 sound/usb/mixer.c            | 351 +++++++++++++++++++---
 sound/usb/mixer_maps.c       |  65 ++++
 sound/usb/stream.c           | 687 +++++++++++++++++++++++++------------------
 sound/usb/usbaudio.h         |   2 +
 7 files changed, 849 insertions(+), 344 deletions(-)

-- 
1.9.1

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

end of thread, other threads:[~2018-05-13  7:06 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-04  1:23 [PATCH v2 0/7] USB Audio Device Class 3.0 BADD profiles support Ruslan Bilovol
2018-05-04  1:23 ` [PATCH v2 1/7] ALSA: usb: stream: move audioformat alloc/init into separate function Ruslan Bilovol
2018-05-04  1:23 ` [PATCH v2 2/7] ALSA: usb: stream: refactor uac1/2 audio interface parsing Ruslan Bilovol
2018-05-04  1:24 ` [PATCH v2 3/7] ALSA: usb: stream: refactor uac3 " Ruslan Bilovol
2018-05-04  1:24 ` [PATCH v2 4/7] ALSA: usb: Only get AudioControl header for UAC1 class Ruslan Bilovol
2018-05-04  1:24 ` [PATCH v2 5/7] ALSA: usb: mixer: make string parsing independent of mixer_build state Ruslan Bilovol
2018-05-04  1:24 ` [PATCH v2 6/7] include: usb: audio-v3: add BADD-specific values Ruslan Bilovol
2018-05-04  1:24 ` [PATCH v2 7/7] ALSA: usb: add UAC3 BADD profiles support Ruslan Bilovol
2018-05-11 15:36   ` Jorge
2018-05-13  7:06     ` Takashi Iwai
2018-05-04  7:44 ` [PATCH v2 0/7] USB Audio Device Class 3.0 " Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).