Received: by 10.223.164.202 with SMTP id h10csp30916wrb; Tue, 7 Nov 2017 02:19:36 -0800 (PST) X-Google-Smtp-Source: ABhQp+TyfDobY02Y08RKVPJ2Auu1/x++nothnetoRppSNMov+WCBt5jQtc57yab8R5rfLsQ/bj9N X-Received: by 10.84.241.129 with SMTP id b1mr17986986pll.103.1510049975861; Tue, 07 Nov 2017 02:19:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510049975; cv=none; d=google.com; s=arc-20160816; b=WQUy9jB+OT6j50LriFUSywBssNDIuPawIu0hdmjt65IJK5S8Du9iP8pwgQiiRA+J1q xKhUGt2IychcI75aUwx8HszfSRE2HjJwaZTVe5vaJ3kzI8Q7OnUZ66JRKUycxGoH/1/L cyG2R3WDWip8OZkNAhj3jWRAH8aKYiSun9mO8HwXzJXR883Oq7DsI9k25tqAnJYaflit YBn+VN9K7KG9UPb7N4tjmLspxt3YjVVha4hf5MGj5vsw9ATGBdiYg7WTO5IWxhzZr87r cdmbS00/KPyjHVEzB/4wxzu0FHz9dViB7HoU65f7WsXHJ/huoAj+67zqJZfrPjfgDG9R hD0w== 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=TddVsOLMHXxqHAIVzSIuuJfNsf+S8D7p3zD9aOav0Bk=; b=ItMxQuxfss+cY+WqTTGoN8hDU4udH4v0WoJJoT+q2Lyj7jU40MNB62flAGE2IBCnh5 EFZ4AIRWmWx6jaXHc3Wuc/7nADS3uKHS7u12sC9SNjNhOmfwnShx8UT/MlBmwCy2ipht mmxCvtP6dlEr/mG/2E55aL7xidfIs4kXSEvcKOmtu4rBPZlmGgUqAEnxu7yplVzZGWjU /cV6XK3Vygh2ztCXc8HHHp7bFOHVyey0jHUUHkzw3k8xllbZGvr8hGp3M9gxhoFOSyeb BSSrTZ1fYfE5eaPs93Xvah05///B5zuoSdp5ahIYVnVH4qT4LzG5/WfHf7fEgRhBmGGn jGNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VelUsVOS; 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=NONE 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 m6si866100pff.205.2017.11.07.02.19.12; Tue, 07 Nov 2017 02:19:35 -0800 (PST) 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=VelUsVOS; 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=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752139AbdKGBwI (ORCPT + 92 others); Mon, 6 Nov 2017 20:52:08 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:46398 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750922AbdKGBwG (ORCPT ); Mon, 6 Nov 2017 20:52:06 -0500 Received: by mail-lf0-f67.google.com with SMTP id g70so12664532lfl.3; Mon, 06 Nov 2017 17:52:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=TddVsOLMHXxqHAIVzSIuuJfNsf+S8D7p3zD9aOav0Bk=; b=VelUsVOSpU7h58bYtHe7ht8W6RZGm2J3l2PoAUWvfn2Dgv0u0g5sbU9x21yass20iY H408/XMOAc5q82JH1/zOnMXbBWlQtMTCOiEmMNQkvTxxXtYTkxTqvhcfqaSX2/DLyDp0 3ZEM8ktujQKPQmPYNCw6vJyk5P5VPsraYprbUhVIQ6XZxDfJcDGMRP4AEj4jOPZXBcQT UEQd4cL8xW6J2ZEp5mlTjTsz+04XajWERQ/kDvKr2BLQbfu6fe+CROcQLWCVztiFPOZ5 dVq90nXnNUWE/PBLf2O6vPGHtpIlx739hMjFgkjqAvff3a5rtr5TexQC7IaYClP3SM1j p76g== 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=TddVsOLMHXxqHAIVzSIuuJfNsf+S8D7p3zD9aOav0Bk=; b=GFo26bDfButR+mA+DxDb/0jZr9n0DFjp8Hf4Gcd1i/kJRRNtcNs/3a0IN5iZEGQOV0 jn34p9S6l4iEabEoE7GXF2NuPJ5Z7j0/KZUHhLvbrowpJtWuBmjJTfDG4tyhliulroUM FOR7s/iTftjsh403QyhdU1y41CDzSaQ4UDjatt/U+Im8EXKwJdOiBETKqNph1fVyX6jl D4J3HvQH5baur7LeqPaw4NdRhjcUHa8wIi7EcuOHgxMe9s0xbti5SVoSNJPv0rq2wAyp Xso6x65wSzgxHysi8Q39dwXnAeCFCc25ISIETTcqD99z49FUAuRCz3DO5fBaEEIzd3B3 2pQA== X-Gm-Message-State: AJaThX6VWCWucq60Dn1fURQ/cfwoJI4v90XP8U2vnFEqL23CQFW9fLri Sd0nOcmpYL3ztzVHQiuLrCLYemt6 X-Received: by 10.25.90.146 with SMTP id y18mr30417lfk.97.1510019524252; Mon, 06 Nov 2017 17:52:04 -0800 (PST) Received: from localhost ([62.216.59.211]) by smtp.gmail.com with ESMTPSA id o85sm11356lfb.77.2017.11.06.17.52.03 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Mon, 06 Nov 2017 17:52:03 -0800 (PST) From: Ruslan Bilovol To: Felipe Balbi Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/1] USB Audio Device Class 3.0 Gadget support Date: Tue, 7 Nov 2017 03:52:01 +0200 Message-Id: <1510019522-15155-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, This patch adds USB Audio Device Class 3.0 [1] function support to gadget subsystem. I didn't add UAC3 support to legacy gadget as it will make preprocessor configuration too complex (UAC3 device must have two configurations for backward compatibility, first is UAC1/2 and second is UAC3), yet also I'm too lazy to do that and verify all possible configurations. For modern ConfigFS interface I'll provide my configuration for testing below; testing was done on a BeagleBone Black board. This patch depends on uac3 header files from include dir which I'll post as part of ALSA host UAC3 patch and will provide the link to it here. uac_3 ------------ mkdir cfg mount none cfg -t configfs mkdir cfg/usb_gadget/g1 cd cfg/usb_gadget/g1 mkdir configs/c.1 mkdir functions/uac3.0 mkdir strings/0x409 mkdir configs/c.1/strings/0x409 echo 0x0101 > idProduct echo 0x1d6b > idVendor echo my-serial-num > strings/0x409/serialnumber echo my-manufacturer > strings/0x409/manufacturer echo "Test gadget" > strings/0x409/product echo "Conf 1" > configs/c.1/strings/0x409/configuration echo 120 > configs/c.1/MaxPower ln -s functions/uac3.0 configs/c.1 echo musb-hdrc.0 > UDC uac_3 + uac2 ------------ mkdir cfg mount none cfg -t configfs mkdir cfg/usb_gadget/g1 cd cfg/usb_gadget/g1 mkdir configs/c.1 mkdir functions/uac2.0 mkdir strings/0x409 mkdir configs/c.1/strings/0x409 echo "Test gadget" > strings/0x409/product echo "Conf 1" > configs/c.1/strings/0x409/configuration echo 120 > configs/c.1/MaxPower ln -s functions/uac2.0 configs/c.1 mkdir configs/c.2 mkdir functions/uac3.0 mkdir strings/0x409 mkdir configs/c.2/strings/0x409 echo "Conf 2" > configs/c.2/strings/0x409/configuration echo 120 > configs/c.2/MaxPower ln -s functions/uac3.0 configs/c.2 echo 0x0101 > idProduct echo 0x1d6b > idVendor echo my-serial-num > strings/0x409/serialnumber echo my-manufacturer > strings/0x409/manufacturer echo musb-hdrc.0 > UDC [1] http://www.usb.org/developers/docs/devclass_docs/USB_Audio_v3.0.zip Ruslan Bilovol (1): usb: gadget: add USB Audio Device Class 3.0 gadget support Documentation/ABI/testing/configfs-usb-gadget-uac3 | 14 + Documentation/usb/gadget-testing.txt | 41 + drivers/usb/gadget/Kconfig | 22 + drivers/usb/gadget/function/Makefile | 2 + drivers/usb/gadget/function/f_uac3.c | 1497 ++++++++++++++++++++ drivers/usb/gadget/function/u_uac3.h | 38 + drivers/usb/gadget/legacy/Kconfig | 3 +- 7 files changed, 1616 insertions(+), 1 deletion(-) create mode 100644 Documentation/ABI/testing/configfs-usb-gadget-uac3 create mode 100644 drivers/usb/gadget/function/f_uac3.c create mode 100644 drivers/usb/gadget/function/u_uac3.h -- 1.9.1 From 1586119019587951133@xxx Thu Dec 07 10:02:51 +0000 2017 X-GM-THRID: 1585854442751654631 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread