Received: by 10.192.165.148 with SMTP id m20csp3811819imm; Mon, 23 Apr 2018 12:49:28 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+nzhj7U+UfOFHJaXFsuJkBbQpv4sXGEP+/Se6vxJk/j0MJGhzZLVeLumqfqA2iLSXj+6i5 X-Received: by 10.99.160.106 with SMTP id u42mr17425180pgn.389.1524512968437; Mon, 23 Apr 2018 12:49:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524512968; cv=none; d=google.com; s=arc-20160816; b=WwH9YUwsRn0Q+ikzZobQEH1aXoxNRAIDYafmAzjRlO3QJsO/mnuQLHyuJ2hLMIlCM3 L1WPeIIuNZqWDEpWClsUe8Unu5RP63J7GtlUVIAJKtWnxMQgxglKksvroKwa27t5HeWr bsRZJzXkVfqCiQSRkouphvVanX5wQ8PfCnR/2uQEEJ7wbKXb1X+njnmXHvZRPb6Tv1YG DYWpollCgbt6fuPj/0Fnt+ar8MpFfiRHfgxz4OC4x5sOwmPinK8U38jgaubqMxh3z4gN nJgXfwAJgiO4uJisWOU03hiHbfThnniM8ee9o9Qp/8SsvXDmqPZ4+zJxo9WrGgzt9jvJ xqeA== 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=JdmvFIiTxJzwEOd4xKaN1uj3w1Gr0yyBeBFnAGVTDJY=; b=IqWjEyH7uoP6os3uOQO0tsgc4nREtoKjuyspV/QqgLw4Rzk3l+oPI3NLcpEIwLsDve PzWXaNAnLm/y+ObbsPnMgxcRHHXlkoC/9haQTwSP0Cxjpvj6iEB9jJnorGsGaRYIik7P HdCGygKZJYpx86F3o4pz8jsZjb1aDwrnau5BtmHwhfOxpwLbO4CvDeR1FjJ3bQyMEtWA 15uW0fprlEQ/r+OqFVJOs5ADoiXpLMvcYTxqXo3L8wrKsxiQJEJpjWF5ITbDJ4q21RHv P57aadd9ZMMJoLKAD6tkdV8mkTh0kOU3wP1ctCQZXQVj6OHHw3ITuqAjj2mD2vmLuEJK d71g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rPC/k96A; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b6-v6si12252755plm.202.2018.04.23.12.49.14; Mon, 23 Apr 2018 12:49:28 -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=@gmail.com header.s=20161025 header.b=rPC/k96A; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932443AbeDWTsA (ORCPT + 99 others); Mon, 23 Apr 2018 15:48:00 -0400 Received: from mail-ot0-f194.google.com ([74.125.82.194]:38841 "EHLO mail-ot0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932257AbeDWTr4 (ORCPT ); Mon, 23 Apr 2018 15:47:56 -0400 Received: by mail-ot0-f194.google.com with SMTP id j27-v6so18458583ota.5 for ; Mon, 23 Apr 2018 12:47:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=JdmvFIiTxJzwEOd4xKaN1uj3w1Gr0yyBeBFnAGVTDJY=; b=rPC/k96A+ZYrx2415z/q94BGzDDhQtVPeS0HMXa+hFwMVCcGlQ2g+wzWW+OCehdCMi KulhPyo5tQYesRfrd6MPHY6zz8cCio16bSfXD3DQvJZ5E0yPz99GYEPObjcETfvwRzTP 04zqhld/KlS11vkSCIVgOz0jGk8/LvlhlyCJKVgjliPuYfV7FXBq5mHeywzgSfvtovl3 oKSbbisktw0MEDpXmYCWikyDdzbVi97k36oKa2J1DHrqU49MDeqViYrO/yJEqjOQUqyk NkYiPh7GaEalUSxKqxAcmjMbEHQNC4hAmxRbb4TrlJVYbY+dom7k76a1IF38I4cvyjf9 YYdw== 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=JdmvFIiTxJzwEOd4xKaN1uj3w1Gr0yyBeBFnAGVTDJY=; b=h2LgboyWebPqxzCFEqMWzLOL4CZQ14G0Z3vFgLNRHcxiICMNeh6/7prlRKgdLV6tOq qd5Q/iL8RKOyMX4oeQiaHYIGYTlrCOV0+AM3/phFuRThrIIT6vuNXWv3pxpk0r8Vhvi8 s7eI7OYC7OWoyuarCyBx9QeIULYlintfh+FUdgzTq7L/7LgTKR+j1otCw8AjwKYPIFye Z4FWnHvy9Zt5+lakU2HsLQ591xkJ9Y9AjsqXp3EyBebQHDpbJwXWcx2QOMfiZpuvy6L0 AqSgEKKj+edQy4Ex5HiDf3V65AwHMhy6odnActe+i+83+pyieSvg9yLPjHLBejVofpuu zirA== X-Gm-Message-State: ALQs6tCXlMbHt9apDJvt36ItIe5YbyQrwZJeMJUukJj+5aDU2u9JeN2H 1i0zxfMMv1reNpNUJoBZgbii5MCtu91R1eFzGS8= X-Received: by 2002:a9d:ec8:: with SMTP id 66-v6mr13840070otj.167.1524512875942; Mon, 23 Apr 2018 12:47:55 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:1e8a:0:0:0:0:0 with HTTP; Mon, 23 Apr 2018 12:47:55 -0700 (PDT) In-Reply-To: References: <1523658266-2259-1-git-send-email-ruslan.bilovol@gmail.com> <1523658266-2259-5-git-send-email-ruslan.bilovol@gmail.com> From: Ruslan Bilovol Date: Mon, 23 Apr 2018 22:47:55 +0300 Message-ID: Subject: Re: [alsa-devel] [PATCH 4/4] ALSA: usb: add UAC3 BADD profiles support To: Andrew Chant 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 Thu, Apr 19, 2018 at 12:42 PM, Andrew Chant wrote: > 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. I have no any objections, "Side Tone" was in UAC3 documentation, but "Sidetone" is OK too, so will change it Thanks, Ruslan