Received: by 10.192.165.148 with SMTP id m20csp472254imm; Fri, 4 May 2018 00:46:21 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrMTZAAUovgFZXXb5289+BDDDJDSVGa6ygwFUdFlnUKdDVCKqPLWS5mvz/qwIh5okLlFuAd X-Received: by 2002:a17:902:4603:: with SMTP id o3-v6mr20689911pld.49.1525419981091; Fri, 04 May 2018 00:46:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525419981; cv=none; d=google.com; s=arc-20160816; b=sxuKZ899DoOlKjRhu8IEg+erIUKqMcYbKzDgOO6aTJAMb5NniviX+H1FWTc2z+/kNc zpsETmVSGnXjbcUC1Rz0IAPbofPD8WRs+SjaVEfTNxsc8t8ik0QBXJWz8xoGXI+IXkoR yDPEW2E0Zhc2uz4UjnfwOQP4SxEOrkDcEOCmKBT6d1TqFMTEkDnfAzMfG0JYNhkVy351 w9UskGmnldeSiknOKj1bq7B788jjLcRYPddzwfb+B83Je/FgMJ88zt34n+LVnGH+uYjQ yBNKcXuTOhQyd2QfmzAqU75+QmaQQiKDm8jgqJi89hPHGKWvd1q/9wT0SJkDBSuCZgg+ 55dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:subject:cc:to:from:message-id:date :arc-authentication-results; bh=OjTjiBev82MHZhunu4ttlcU5ob5efboZ116GjC9dKKc=; b=KgiZLR047FsBr1JYgYEuaKefBrTxXvbM4awUEb6j6ENfpphMZHgcUOngi0krM3PMpS 4D4jvterFBbyul5mVDHfvw/HyXReqloEONWKY+feTfFONyQrK7CB9TeDqgbZXWzkCUor JY7rRA0lishcyIPqvpv3jfOCWrh6nf2yZm+z9CdTT1esF/rv95y46HE5nWrqAegzuiw8 Vm4FRIYuKac8ydBoa7rtM1kVVNQ9fQuw/JV6I2iFCDQv8qloVzJhguLJ1Bo9ELihqlDQ 7BhoVvqOQjrt72FaDVZk/rC88nllIkiOyBZCWLirFs6E4B1odKTiplDRHKPdozjKE3N6 bQkg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v31-v6si15837950plg.157.2018.05.04.00.46.07; Fri, 04 May 2018 00:46:21 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751551AbeEDHoi (ORCPT + 99 others); Fri, 4 May 2018 03:44:38 -0400 Received: from mx2.suse.de ([195.135.220.15]:58848 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751339AbeEDHoe (ORCPT ); Fri, 4 May 2018 03:44:34 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id BADEBAB34; Fri, 4 May 2018 07:44:32 +0000 (UTC) Date: Fri, 04 May 2018 09:44:31 +0200 Message-ID: From: Takashi Iwai To: "Ruslan Bilovol" Cc: , "Jorge" , "Andrew Chant" , "Greg Kroah-Hartman" , Subject: Re: [PATCH v2 0/7] USB Audio Device Class 3.0 BADD profiles support In-Reply-To: <1525397044-15080-1-git-send-email-ruslan.bilovol@gmail.com> References: <1525397044-15080-1-git-send-email-ruslan.bilovol@gmail.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 04 May 2018 03:23:57 +0200, Ruslan Bilovol wrote: > > 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. OK, these 5 look like a nice cleanup, so I'll apply them right now. > 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. For this essential one, I'd like agreements from you guys before taking it. Through my quick glance over the code, it looks good enough, but obviously I haven't tested it at all, so it's no right judge. As I'm going to be off in the next week from tomorrow, I'll be less responsive, but don't mind and go ahead for discussions :) thanks, Takashi > > 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 > >