Received: by 10.192.165.156 with SMTP id m28csp1205584imm; Fri, 13 Apr 2018 15:28:38 -0700 (PDT) X-Google-Smtp-Source: AIpwx48RuMMEU1EK3S7YGju+Z3C8QyeIHjHmFz5D5a9sFOLaOOoKNMz0vnAE7m2ZJqXW3P0ZSNTb X-Received: by 2002:a17:902:28e4:: with SMTP id f91-v6mr6712013plb.336.1523658518806; Fri, 13 Apr 2018 15:28:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523658518; cv=none; d=google.com; s=arc-20160816; b=K94rXcStAdU39OR91VaJjfZ2WFMCW/XcSXIixOuTr66WVYeZK9kFQWag9e1cKkJ/DT BOc8+VHi6XClbeyTlbOlQ6mbuPPtXaB/Hi3N34TBhMW0m3571JZaHbJP7PI0TISiifEC BRbq2ILFLgrM+94aM00JchmAbJ7l2k4rE8TZF1CIiO5dqfYPBlh4UaMaIyfZkaSnzEmx 8g9XqgDQQb/PWvGBSz9YQPzkTi2K141V69dKNcg/Bec7KiVzbjG2ftDfKDxwQElJeFl+ 5X7xZMx1s+rDJS6XtSq6uXygi8+Sy5WPBlrfVEYWZhL18OcjPCp5wsdomzWGoGxqFSZw LtZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=nMgxzD9Zwsw6u4HYeZZlpRtxLLmPmVv4FzyETMWT5Fc=; b=QAukYbQWPaXNz3E/KoDKDj5CW6Da1fpsaSZg9/YKxHV/U1i05xqT83hXJuuy8EAeTI ovt7sMQ3ic16PBV3Bh/YdYkko4zRhB+pBX/GvdRKFnf5oMEELdQYC/s4YIoKWxaco+SH 9J3gRqckfx30J+g+ohYHo+0/NcYH4Wppufw19cuHwdK5K1nv3+udIE0FD0UJxlhRKjjg 98UvPVFvJPStWqoJIOwR7gGCVWEk0deiRgifNfSCuWu/OjCtcfK9+USkzbysN9kucaGj 3uwagMZ0WlQ1UeUfHZFjTDx5kIsWD/nAPjoEu8Rg655NsJKowjv1v4sAVITH8ri+5dNM QU0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gtcP1cVL; 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 w12si3458929pge.165.2018.04.13.15.28.24; Fri, 13 Apr 2018 15:28:38 -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=gtcP1cVL; 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 S1752574AbeDMWYm (ORCPT + 99 others); Fri, 13 Apr 2018 18:24:42 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:40018 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752005AbeDMWYl (ORCPT ); Fri, 13 Apr 2018 18:24:41 -0400 Received: by mail-lf0-f68.google.com with SMTP id e5-v6so14588011lfb.7 for ; Fri, 13 Apr 2018 15:24:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=nMgxzD9Zwsw6u4HYeZZlpRtxLLmPmVv4FzyETMWT5Fc=; b=gtcP1cVLk9i3EnoRUUeOPWYC49QsDDEkuyG+XCmqaK7qg8KWrGRR/OcaknEbHowE2n VI7pO26DcwkGwkNp/KzEfVkdfyWYLKRw1IDvvtTdK58c8QSDHTeBDHX4zO3I0yb/YKON k9iJN8Q1XhQ5vpgauhLNHZLcM181cRQ9zWhjwkG0MJ0c02grAzfJgwiVBzOiDUPT73hy kewrZ0p571TF1AodETqXDUZn9cwpG0z9bxU1aEgGwLVQc1ou5lj+wbBccoiNZutv84UY Jv9vpa3puC7oo1YgG5cdUCuXb5iY8uWhJ5chmWTO0p+wj0MTfu4ORwO6SC/tWx25d3c+ D3Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=nMgxzD9Zwsw6u4HYeZZlpRtxLLmPmVv4FzyETMWT5Fc=; b=Cl1iCB1G8TBJAeLGdVvyb0gEe/fSv9pkjeks8t2CfRR8JvH4TZFYAN9dg/s0CR48mU FlxFM+9VBVLXdPgrB8pFFZrQ1OU/3gn46Lk8RlJbcNqqbJvjAWHIP7Z9gbGMcnAhLIq7 3N+IAV4Z2KCVzwS84TktGXinKzfvzYkIRlm2ZqMB4+W9fvDl2N0fm1mwfmWZmRuyi6s1 tUEVh0zvNiy1ISY2E/1p4jotdT1Rli6VueT8ptqAxydCrJtH/uqNkZhmvU1XG/RWipb7 wMH/KyAbrfHoAi/6wkQtVDN8HK18eyyzH00t/fEaKJEi7oO2vp0iMsHC7Uxw7PwYbm6J WsTQ== X-Gm-Message-State: ALQs6tDSORYkIq+Ulf7235u0DEyiIBaC+B87N0jAnBVo4m0BqwBemWNj 7dEL6bGdP/zfaaXk4QV4QwXog3Hq X-Received: by 2002:a19:cf89:: with SMTP id f131-v6mr8943101lfg.130.1523658279555; Fri, 13 Apr 2018 15:24:39 -0700 (PDT) Received: from localhost ([62.216.62.149]) by smtp.gmail.com with ESMTPSA id x62-v6sm1428317lfd.82.2018.04.13.15.24.38 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 13 Apr 2018 15:24:38 -0700 (PDT) From: Ruslan Bilovol To: Takashi Iwai Cc: Jorge , Greg Kroah-Hartman , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/4] USB Audio Device Class 3.0 BADD profiles support Date: Sat, 14 Apr 2018 01:24:22 +0300 Message-Id: <1523658266-2259-1-git-send-email-ruslan.bilovol@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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. [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 (3): ALSA: usb: stream: refactor audio interface parsing 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 | 313 +++++++++++++++++++- sound/usb/mixer_maps.c | 65 +++++ sound/usb/stream.c | 678 +++++++++++++++++++++++++------------------ sound/usb/usbaudio.h | 2 + 7 files changed, 836 insertions(+), 310 deletions(-) -- 1.9.1