All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Chant <achant@google.com>
To: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Cc: Takashi Iwai <tiwai@suse.com>,
	Jorge <jorge.sanjuan@codethink.co.uk>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [alsa-devel] [PATCH 4/4] ALSA: usb: add UAC3 BADD profiles support
Date: Thu, 19 Apr 2018 17:42:57 +0800	[thread overview]
Message-ID: <CANVWZtHn9jYczuhZiKyeC5yf1jjeKFySHv6RkY0ekDj5fD1h+w@mail.gmail.com> (raw)
In-Reply-To: <1523658266-2259-5-git-send-email-ruslan.bilovol@gmail.com>

On Sat, Apr 14, 2018 at 6:24 AM, Ruslan Bilovol
<ruslan.bilovol@gmail.com> wrote:
> Recently released USB Audio Class 3.0 specification
> contains BADD (Basic Audio Device Definition) document
> which describes pre-defined UAC3 configurations.
>
> BADD support is mandatory for UAC3 devices, it should be
> implemented as a separate USB device configuration.
> As per BADD document, class-specific descriptors
> shall not be included in the Device’s Configuration
> descriptor ("inferred"), but host can guess them
> from BADD profile number, number of endpoints and
> their max packed sizes.
>
> This patch adds support of all BADD profiles from the spec
>
> Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
> ---
>  sound/usb/card.c       |  14 +++
>  sound/usb/clock.c      |   9 +-
>  sound/usb/mixer.c      | 313 +++++++++++++++++++++++++++++++++++++++++++++++--
>  sound/usb/mixer_maps.c |  65 ++++++++++
>  sound/usb/stream.c     |  83 +++++++++++--
>  sound/usb/usbaudio.h   |   2 +
>  6 files changed, 466 insertions(+), 20 deletions(-)

> --- a/sound/usb/mixer_maps.c
> +++ b/sound/usb/mixer_maps.c
> @@ -482,3 +482,68 @@ struct usbmix_ctl_map {
>         { 0 } /* terminator */
>  };
>
> +/*
> + * Control map entries for UAC3 BADD profiles
> + */
> +
> +static struct usbmix_name_map uac3_badd_generic_io_map[] = {
> +       { UAC3_BADD_FU_ID2, "Generic Out Playback" },
> +       { UAC3_BADD_FU_ID5, "Generic In Capture" },
> +       { 0 }                                   /* terminator */
> +};
> +static struct usbmix_name_map uac3_badd_headphone_map[] = {
> +       { UAC3_BADD_FU_ID2, "Headphone Playback" },
> +       { 0 }                                   /* terminator */
> +};
> +static struct usbmix_name_map uac3_badd_speaker_map[] = {
> +       { UAC3_BADD_FU_ID2, "Speaker Playback" },
> +       { 0 }                                   /* terminator */
> +};
> +static struct usbmix_name_map uac3_badd_microphone_map[] = {
> +       { UAC3_BADD_FU_ID5, "Mic Capture" },
> +       { 0 }                                   /* terminator */
> +};
> +/* Covers also 'headset adapter' profile */
> +static struct usbmix_name_map uac3_badd_headset_map[] = {
> +       { UAC3_BADD_FU_ID2, "Headset Playback" },
> +       { UAC3_BADD_FU_ID5, "Headset Capture" },
> +       { UAC3_BADD_FU_ID7, "Side Tone Mixing" },
Can you please call this "Sidetone"?
This better matches other Sidetone control names in the sound tree and
makes it compatible with existing Android userspace usage.

  parent reply	other threads:[~2018-04-19  9:42 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-13 22:24 [PATCH 0/4] USB Audio Device Class 3.0 BADD profiles support Ruslan Bilovol
2018-04-13 22:24 ` [PATCH 1/4] ALSA: usb: stream: refactor audio interface parsing Ruslan Bilovol
2018-04-19  9:55   ` [alsa-devel] " Takashi Iwai
2018-04-19  9:55     ` Takashi Iwai
2018-04-23 19:48     ` Ruslan Bilovol
2018-04-23 19:48       ` Ruslan Bilovol
2018-04-13 22:24 ` [PATCH 2/4] include: usb: audio-v3: add BADD-specific values Ruslan Bilovol
2018-04-13 22:24   ` Ruslan Bilovol
2018-04-13 22:24 ` [PATCH 3/4] ALSA: usb: Only get AudioControl header for UAC1 class Ruslan Bilovol
2018-04-13 22:24 ` [PATCH 4/4] ALSA: usb: add UAC3 BADD profiles support Ruslan Bilovol
2018-04-14 17:55   ` Jorge Sanjuan
2018-04-14 17:55     ` Jorge Sanjuan
2018-04-18  0:41     ` Ruslan Bilovol
2018-04-16  9:05   ` kbuild test robot, Dan Carpenter
2018-04-16  9:05     ` kbuild test robot, Dan Carpenter
2018-04-19  9:42   ` Andrew Chant [this message]
2018-04-23 19:47     ` [alsa-devel] " Ruslan Bilovol
2018-04-23 19:47       ` Ruslan Bilovol
2018-04-19 10:19   ` [alsa-devel] " Takashi Iwai
2018-04-24  7:51     ` Ruslan Bilovol
2018-04-24  7:51       ` Ruslan Bilovol

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANVWZtHn9jYczuhZiKyeC5yf1jjeKFySHv6RkY0ekDj5fD1h+w@mail.gmail.com \
    --to=achant@google.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jorge.sanjuan@codethink.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ruslan.bilovol@gmail.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.