Message ID | 20230725062206.9674-1-tiwai@suse.de |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp2280698vqg; Mon, 24 Jul 2023 23:53:34 -0700 (PDT) X-Google-Smtp-Source: APBJJlHh605+K81jMlsWWU3J9KL/fNh9aBsDwxmnXa/MiMImpUUTGJa9vEuFe9wRujw9tZ3z+J4o X-Received: by 2002:a17:907:75ce:b0:993:e94e:7234 with SMTP id jl14-20020a17090775ce00b00993e94e7234mr10781605ejc.77.1690268013892; Mon, 24 Jul 2023 23:53:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690268013; cv=none; d=google.com; s=arc-20160816; b=jMq+XkqiEylueln/ty+cHZY9HwKkbga9Q7k+UFn8naG5qeLaR5d2/BBFPlbfotx3jo JzDlM3LhFOeC5VjFLkvjOby7XRSZ5Ps/OwaeWk6pxIu5237KV1+7RevaPeAjiAOSZesv eXMYK8FsCeb2PyOWWd8Ke6H0DTWyTJQm/fNdlqpbdMoI9tpK3geVDZObQ4VK1PpsmfyL Il63ZKaCtTckginFbBRH9F/YkiNwqioEIU+GSHjFr3uF/pW7Bg96Hu5B7yvX2m6pi6Qq 3sBZ0KUeCFTkbYL0onQLGvl5+YoYLKELnw2hcMxXhFWivgDbNPWVmiD+88RdP74A1CwH tgOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=QaBNnA/8gpFgghYhdk/w9mp+r6Zv7/AG4oLP8HE40AM=; fh=BbVOx8xHLmKqd0mM1otOmPdkL6v0ikLC29Avu+/pNMM=; b=lEE9TLAxCblJ2Mgyvukj30lgy8Oxx5oV+au2d4mwwswhu4DoBMN5PVzdV8kwPZJlYz c00MwDF05f9G/8HIRlOIaHaHTJXPxrZd6/gwUi1ZIGQQX0SXWL9VQHxUgwoFap2Kp4nu KFRxl8QatYx5ozxW8MDA3QKOYGM3ftDJMUTRRwPniB8wsLcprR2giN8GrXcqLojMfpzp fqKf+2b06HGKdfPtRzuncQchT9WxeamuBkHFxR893UQV7rOGkWSvWs6Ihv2iIs+roPtx 8U8ttLYaZaIEYW3DraFqmfEZ1BxBFFJ6wjIAYX7OHteJPOqyd9AglBpks9Kn/aeZ3lRG YmgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Ic5ArVRf; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jp7-20020a170906f74700b00993150e5326si7120309ejb.626.2023.07.24.23.53.09; Mon, 24 Jul 2023 23:53:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Ic5ArVRf; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231406AbjGYGWQ (ORCPT <rfc822;kloczko.tomasz@gmail.com> + 99 others); Tue, 25 Jul 2023 02:22:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229499AbjGYGWO (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 25 Jul 2023 02:22:14 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DACF6CF; Mon, 24 Jul 2023 23:22:12 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 7BD8622489; Tue, 25 Jul 2023 06:22:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1690266131; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=QaBNnA/8gpFgghYhdk/w9mp+r6Zv7/AG4oLP8HE40AM=; b=Ic5ArVRfMJt9KorJR2SkOWpNNCrHNKFoYKaScO9d6EfjxaUkX72WbT49kFKNRBR0XRHsMp 66/It/FuaFUz7L3A3lEChgTyN3Y277znunXyiwzOU5H9syyxzUXjMr4k3kNBQtDD0D61Ef 5z+TarS7jEU63qeULLNxd5rc9LxLTS4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1690266131; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=QaBNnA/8gpFgghYhdk/w9mp+r6Zv7/AG4oLP8HE40AM=; b=ms3T9/AYc+/7B94Yh1vrliH7UzeI2zke2rTBcTkHYIlA9pdVzgapaaK8x+UhR5zy+KpHWm 5np1l1KXJpyIpSCA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 4997213342; Tue, 25 Jul 2023 06:22:11 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id NiT2EBNqv2S0dQAAMHmgww (envelope-from <tiwai@suse.de>); Tue, 25 Jul 2023 06:22:11 +0000 From: Takashi Iwai <tiwai@suse.de> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: alsa-devel@alsa-project.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/7] usb: Add USB MIDI 2.0 Gadget Function Driver Date: Tue, 25 Jul 2023 08:21:59 +0200 Message-Id: <20230725062206.9674-1-tiwai@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772374472996348895 X-GMAIL-MSGID: 1772374472996348895 |
Series |
usb: Add USB MIDI 2.0 Gadget Function Driver
|
|
Message
Takashi Iwai
July 25, 2023, 6:21 a.m. UTC
Hi, This is a patch set for adding a USB gadget function driver for USB MIDI 2.0 interface. The MIDI 2.0 support in the host side was already enabled since 6.5 kernel in snd-usb-audio driver. Now, this provides a similar gadget functionality using the existing ALSA UMP helper functions. The gadget driver provides both MIDI 2.0 and MIDI 1.0 fallback interfaces with one or more loopback UMP rawmidi devices. The configfs implementation is flexible enough to allow users to set up multiple UMP Endpoints and Function Blocks. The first patch adds the bare f_midi2 driver without configfs support, followed by the configfs support, MIDI 1.0 interface support and a few other extensions and documentation. Takashi === Takashi Iwai (7): usb: gadget: Add support for USB MIDI 2.0 function driver usb: gadget: midi2: Add configfs support usb: gadget: midi2: Dynamically create MIDI 1.0 altset descriptors usb: gadget: midi2: MIDI 1.0 interface (altset 0) support usb: gadget: midi2: Add testing documentation usb: gadget: midi2: Add "Operation Mode" control usb: gadget: midi2: More flexible MIDI 1.0 configuration .../ABI/testing/configfs-usb-gadget-midi2 | 54 + Documentation/usb/gadget-testing.rst | 154 + drivers/usb/gadget/Kconfig | 18 + drivers/usb/gadget/function/Makefile | 2 + drivers/usb/gadget/function/f_midi2.c | 2883 +++++++++++++++++ drivers/usb/gadget/function/u_midi2.h | 81 + 6 files changed, 3192 insertions(+) create mode 100644 Documentation/ABI/testing/configfs-usb-gadget-midi2 create mode 100644 drivers/usb/gadget/function/f_midi2.c create mode 100644 drivers/usb/gadget/function/u_midi2.h
Comments
On Tue, Jul 25, 2023 at 08:21:59AM +0200, Takashi Iwai wrote: > Hi, > > This is a patch set for adding a USB gadget function driver for USB > MIDI 2.0 interface. The MIDI 2.0 support in the host side was already > enabled since 6.5 kernel in snd-usb-audio driver. Now, this provides > a similar gadget functionality using the existing ALSA UMP helper > functions. > > The gadget driver provides both MIDI 2.0 and MIDI 1.0 fallback > interfaces with one or more loopback UMP rawmidi devices. The > configfs implementation is flexible enough to allow users to set up > multiple UMP Endpoints and Function Blocks. > > The first patch adds the bare f_midi2 driver without configfs support, > followed by the configfs support, MIDI 1.0 interface support and a few > other extensions and documentation. > Very cool, thanks for doing this! All now queued up, let's see what the builders say... greg k-h