Received: by 10.192.165.156 with SMTP id m28csp499963imm; Thu, 19 Apr 2018 02:45:01 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/5RR/i5o0tv5R9Lb3ldiYTz0OY3dSKabLzI4SM4IsJCLOrYHLcVHhoNPIh8/Yt2+GVIvQb X-Received: by 10.98.182.15 with SMTP id j15mr5183174pff.115.1524131101679; Thu, 19 Apr 2018 02:45:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524131101; cv=none; d=google.com; s=arc-20160816; b=iNEDU3ImTkdaqpKTt6QT9ggFXPdKqhvZ0fRj8epWMFeMpt9QORoSKqpRW3R+rbru6X waZBPXbeXXmOPqRc7raQE6C/SUKsEb+CY6zi7HxTdajnjQANNBGlZ1Sbg58+ZfVeYW+c viAYSukv/g5RtRWRvixGSrd29bcaXYZ6aomq9mvDt37mueESbyOQmJ7TI0fftTKB3BSs I1XEB45BSJEPf+KYfBgifb7psipRqKYwXkEUJE8IJ9rit+CXjBkDhFX0fsU1RzsdraNm QVkKIEuM+1XtNirU9bV3nBWiFfwkAukppm25Ls22YOV2JO5A/Bnj1OY+NddlWIWb02fF jOZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=cQRSJMMRYwzeAbETa8tD/QEfufv/ewphMKFAPe8IZRI=; b=BqJ7KibtX1YD5c9J/jx54tVhdqq8VVOUUT5ncLdMCU/CNd0e+ADUlaNsK5d5Kqtwpi PQZQuxwAWCgVczwZY7N0U9pD1YtWznyfh2evwI9mxazdThc52/dZsjRYBZC5iiN6Z+X3 76bqgKlmWWdZWxTPAQ8USCR8FQMlCs/frx1ilaIOld3+cOUIdUyVFmINOi3LywHC3i3r gpgB5S5DxyVP1q5rDT+LxBiOjQbgWWKapr/JnZAxMBSrvD9DaqF+nRS6LZ51JIu+zdJt MlQDeAU7zk2oT5bP5tuWLZSUmtq+n/weWVkJWql/OZkAKUVwUjDPs9WENxsYdER0AIAb HjIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Sk8k8RMP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s66si1068409pfj.164.2018.04.19.02.44.46; Thu, 19 Apr 2018 02:45:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Sk8k8RMP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751822AbeDSJnl (ORCPT + 99 others); Thu, 19 Apr 2018 05:43:41 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:40669 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751047AbeDSJnj (ORCPT ); Thu, 19 Apr 2018 05:43:39 -0400 Received: by mail-wr0-f195.google.com with SMTP id v60-v6so12216334wrc.7 for ; Thu, 19 Apr 2018 02:43:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=cQRSJMMRYwzeAbETa8tD/QEfufv/ewphMKFAPe8IZRI=; b=Sk8k8RMPza6WJGScV0Hoi9JON/Xh3SZosS6O5y1CoUlVR46t1dNPb2Tm/0MoOdHFh0 tlGu6htaMpMCHfS0DKLZzrO1LA2WPnzFZyjUgWU5kpRZ79PulNZ1iRYk1Vyo81cwgbyQ TCp0+1Ol4W1KvaEMiG3kZEhDbrkpgt4yrsrfs4+gJhjyoIuvA83+48+egbyRb9ziRuH+ Q3WlhqgiFTMbTArzEBhSGVnAGovqhogIhqTv31sV2LGqy8/K+n6YpksxUVz3iafArdNr Vm0eLilTly29F6RWrk2V3w4JSQaGekUXvaRtjwExzrqnVh9QtRqiwE9IOi3NghqtJSX6 j5ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=cQRSJMMRYwzeAbETa8tD/QEfufv/ewphMKFAPe8IZRI=; b=Rdg/2XwGlsqFxDEyC3I6ub/qFahhdZn9FFzvpByKcEGQrrfIbzVeKFy8vaUrB7TsL7 IV3rsvEzFW3TtTaWvvyelrPUZooNoMn0aR4XvU1HmMrXC4Si5TCziNbTaSlb7G6PW2XO +6PKcOlk+UF8ct1PUpWDierMRbLvnUmILVu8BkKFI8En2xWTOkwt+/xb8De8B/o9b/70 9hED1ll+jyAfMUFXFjYi1WXrhK9+5LvmgbpcVT+cnRTG8us49Jw+ffmpQx+o8ptvyRGz FfqiTJSZTiHNwEe9f+1ligCd/Q35J1S31QG4sK4mKXmRWC8/mW2kmB2hJ8UDA/MKbJGo pGWg== X-Gm-Message-State: ALQs6tBwy6yqLr6L7oelCK+LlQb9dyaYZmIUMDYqz17+AXLvrVLJx68X VasZvymBt9menSVQEQx4L/L3zicYJUaTHkTno/XCSA== X-Received: by 2002:adf:8b44:: with SMTP id v4-v6mr3880763wra.99.1524131017804; Thu, 19 Apr 2018 02:43:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.247.20 with HTTP; Thu, 19 Apr 2018 02:42:57 -0700 (PDT) In-Reply-To: <1523658266-2259-5-git-send-email-ruslan.bilovol@gmail.com> References: <1523658266-2259-1-git-send-email-ruslan.bilovol@gmail.com> <1523658266-2259-5-git-send-email-ruslan.bilovol@gmail.com> From: Andrew Chant Date: Thu, 19 Apr 2018 17:42:57 +0800 Message-ID: Subject: Re: [alsa-devel] [PATCH 4/4] ALSA: usb: add UAC3 BADD profiles support To: Ruslan Bilovol Cc: Takashi Iwai , Jorge , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 14, 2018 at 6:24 AM, Ruslan Bilovol 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=E2=80=99s 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 > --- > 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[] =3D { > + { 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[] =3D { > + { UAC3_BADD_FU_ID2, "Headphone Playback" }, > + { 0 } /* terminator */ > +}; > +static struct usbmix_name_map uac3_badd_speaker_map[] =3D { > + { UAC3_BADD_FU_ID2, "Speaker Playback" }, > + { 0 } /* terminator */ > +}; > +static struct usbmix_name_map uac3_badd_microphone_map[] =3D { > + { UAC3_BADD_FU_ID5, "Mic Capture" }, > + { 0 } /* terminator */ > +}; > +/* Covers also 'headset adapter' profile */ > +static struct usbmix_name_map uac3_badd_headset_map[] =3D { > + { 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.