Received: by 10.213.65.68 with SMTP id h4csp832110imn; Tue, 20 Mar 2018 17:05:17 -0700 (PDT) X-Google-Smtp-Source: AG47ELuR42LkJXpAWJV4VoLmd0BctOS2Ppq7hAicLT1iEXzblCi7jNqC2+fOOuHEvHR2xD2+fHHY X-Received: by 10.99.114.77 with SMTP id c13mr13434393pgn.8.1521590717839; Tue, 20 Mar 2018 17:05:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521590717; cv=none; d=google.com; s=arc-20160816; b=W3pv21V04Pal/JgdKjVifGyx7tYgu+/dufuaiP2ogIvt0mLr1opkfZXQmCCY1mQHIB Q6+Q2hXtefCcxzPg2ZcUAmlW330LOl1Tl4uYmzMR6SZB5kAePztQW7F9HSZPtnbRRVGD C7k4KTLkLeRggcwB/MECRBhO2Pr5Y5F7gzaNB9LGhiQHf0LS9GwV8uFCllxo+btJpbvg 5TpXhpb59jpPC2RpL9M4SrN5L7MtnTokE8/YnoQAm9zN3NaaAgck0gAFLJ7aVT152iRv 2NZhq8gtGG+rX9FKldaL1pvsZ817vcGAFhTpbMu0zkaOmxQqUITZmzyNh0MMnXomwrEy OGeA== 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=JRx4Jp8Xc92eteaB4nqDQ2klvNzvpfUeEKA1qvWcFrY=; b=ZnQsmCZP7Fi3i1ceGLUYsX1gI6BNmt7tByNp3shIF21zn+66toUSPZhpSJ9vnz70Cc XPNx62u9vC8WPXlMO6GB22lBzg7EerjlrbM+RvntfvQk9OHhss4FHqUO+Qscq77jxuNk FGjMuwJtLvlj6q3B7cAtvmyJlecMO53/1DO3pLrMJqLLDSDtpGmVFr3XtqC3xF80NFM1 DZIKS00neMTt/oJ+b/JJ3OSXQ5sChlSfN9ROPdsV19lV65UQcgdHntFyr86gGA+JGL6/ voawOtiAl28fx4xww00Y1SW0BeMsXPlakK+7YOI7covMWi2ePlCwd6Jd5NLMQBudz2Az xPNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZVPO4gs6; 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 h14-v6si2751939plk.706.2018.03.20.17.05.01; Tue, 20 Mar 2018 17:05:17 -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=ZVPO4gs6; 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 S1751472AbeCUAEG (ORCPT + 99 others); Tue, 20 Mar 2018 20:04:06 -0400 Received: from mail-lf0-f49.google.com ([209.85.215.49]:42939 "EHLO mail-lf0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751018AbeCUAEF (ORCPT ); Tue, 20 Mar 2018 20:04:05 -0400 Received: by mail-lf0-f49.google.com with SMTP id a22-v6so5251449lfg.9 for ; Tue, 20 Mar 2018 17:04:04 -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=JRx4Jp8Xc92eteaB4nqDQ2klvNzvpfUeEKA1qvWcFrY=; b=ZVPO4gs6APZHcXf+w3s5aAOYBOsWwdAgdsjeO39mcO+97C/AwV05OIWZXdZN4Ju3/+ VsOm91PkXt1+t5oW11L49D39tyDuXzvFTN7NGYMFVQrVd4rlIwt5XbVAl0phjMpOtNDi SLygfaPlyCnY4HF48gIpAkhVBtdEUKPAAjAICKC+gWG9ZYxu5wi1Z8TX2MNdJzmKR5Zj o7C+/dvHxmyFUEOTYWxgziBxBZc9cblz85gVOwPaNU36y19Au5BsvRfd+axxqOWNQGb9 dMDlhpF9y/wdt0EEtKTzjcyideO4ni/iJeCSduRxWkPccBxjPocqrRLQphv1x2ZiBavd L2xw== 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=JRx4Jp8Xc92eteaB4nqDQ2klvNzvpfUeEKA1qvWcFrY=; b=CUgIC2fe0pJo1U8YcZq++lEcyaeWfGKW6vwsrW/3jCrt2fBIFrYmIH5iWskTCYIN1A uYyuSaLzl5tEXAQ8rTQrZLhlDj4L4FPQ4eQg6zcXUSJT6gaP7lLFqNhxSacxBkEArnZV moK4dNT9UgJ9o80F8ww5W+CSE4kmYCcI178AHMToGOty67bTmb74mZoxJ9HRCHUKxLNx Methp6xb8HjgvKxYM2n40Rg+FyoBU5TJfpbEmhlKFt2s69vPj4HsAWA02mylcR5QeGhE 3R+D9v0bJJJJ2vK5DiIfzcCi+K6oFOL2pRu4LVQCX44gdqXZaP6SM8ely+Dkgza6SlXT 2GpA== X-Gm-Message-State: AElRT7HSH7wQgHPZMnSjiiG0QcGTSZTsK2dYs0ZC9RvbriRHfFbIVnHn MRJZvo76oRl8YNDpZVF7ewk= X-Received: by 2002:a19:8f91:: with SMTP id s17-v6mr12695721lfk.56.1521590644019; Tue, 20 Mar 2018 17:04:04 -0700 (PDT) Received: from localhost ([62.216.62.149]) by smtp.gmail.com with ESMTPSA id 10-v6sm318647lfv.78.2018.03.20.17.04.02 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 20 Mar 2018 17:04:03 -0700 (PDT) From: Ruslan Bilovol To: Takashi Iwai Cc: Pierre-Louis Bossart , Jorge , Greg Kroah-Hartman , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH v3] USB Audio Device Class 3.0 support Date: Wed, 21 Mar 2018 02:03:58 +0200 Message-Id: <1521590639-31383-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 Hi Takashi, This patch adds initial USB Audio Device Class 3.0 [1] support to the ALSA that we discussed at ELCE. The patch was tested with UAC3 gadget [2] that I posted to USB mailing list before. It is good for working with BADD device which implements such topologies like BAIF (Basic Audio Input Functions), BAOF (Basic Audio Output Functions) or compbination of both. UAC3 spec has changed descriptors laout and many other codes comparing to UAC2 spec, thus making reuse of existing sources impossible or quite complex. There are still many areas of improvement, as this patch doesn't have UAC3 Mixer Unit support nor some new features like Power Management I tested this with BeagleBone Black as UAC3 gadget device. [1] http://www.usb.org/developers/docs/devclass_docs/USB_Audio_v3.0.zip [2] http://www.spinics.net/lists/linux-usb/msg162482.html v3 changes: - dropped audioformat quirks patch (already accepted) - addressed coding style requested changes v2 changes: - moved audioformat quirks to quirks.c - addressed many comments from Pierre-Louis Bossart - reorganized audio-v3.h - added more UAC3 channel relationship definitions Ruslan Bilovol (1): ALSA: usb: initial USB Audio Device Class 3.0 support include/linux/usb/audio-v2.h | 4 +- include/linux/usb/audio-v3.h | 395 +++++++++++++++++++++++++++++++++++++++++ include/uapi/linux/usb/audio.h | 1 + sound/usb/card.c | 7 +- sound/usb/card.h | 2 +- sound/usb/clock.c | 228 +++++++++++++++++++++--- sound/usb/clock.h | 4 +- sound/usb/format.c | 91 ++++++++-- sound/usb/format.h | 6 +- sound/usb/mixer.c | 337 +++++++++++++++++++++++------------ sound/usb/stream.c | 365 +++++++++++++++++++++++++++++++++---- 11 files changed, 1246 insertions(+), 194 deletions(-) create mode 100644 include/linux/usb/audio-v3.h -- 1.9.1