From patchwork Mon Dec 20 21:11:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Hofman X-Patchwork-Id: 526795 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8DFF3C433FE for ; Mon, 20 Dec 2021 21:11:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230324AbhLTVLk (ORCPT ); Mon, 20 Dec 2021 16:11:40 -0500 Received: from cable.insite.cz ([84.242.75.189]:54411 "EHLO cable.insite.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230330AbhLTVLj (ORCPT ); Mon, 20 Dec 2021 16:11:39 -0500 Received: from localhost (localhost [127.0.0.1]) by cable.insite.cz (Postfix) with ESMTP id 1FDD3A1A3D40C; Mon, 20 Dec 2021 22:11:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ivitera.com; s=mail; t=1640034698; bh=4OReWYNWtGWkkIdlPU08sx5H+R+qLS85r9ZPvLOz62Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nfnEwSO7yHZSxgXpQenET45t9tTFGJM5jfY/75nVRZ3UVcH6E7bbbn07Hq+XKdLH6 kCxMjKy2dKol2x0GPFS0m7O7ZutABmmpCQtY6dLmUpDprP0RT3I/qwlsjvVVIHkznL ZQ7Ms2hDl8UYdwN/GIJ5TsFTRO+d0yyS2+MIyla0= Received: from cable.insite.cz ([84.242.75.189]) by localhost (server.insite.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WKDC1fHDHq0a; Mon, 20 Dec 2021 22:11:32 +0100 (CET) Received: from precision.doma (dustin.pilsfree.net [81.201.58.138]) (Authenticated sender: pavel) by cable.insite.cz (Postfix) with ESMTPSA id E0AA1A1A3D401; Mon, 20 Dec 2021 22:11:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ivitera.com; s=mail; t=1640034692; bh=4OReWYNWtGWkkIdlPU08sx5H+R+qLS85r9ZPvLOz62Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V/aK+/ZbdVL7UBln1jBi4OiMjqif/QNtW0yQsO/U9qKE/t8Lz6EvJSsIAXvKQ5pWe xOuR17NFM3DRqD+5MdWmFaHkZQG9ge2kgZCqWx41Az9wx8JfaHl4K+xjfA7Fey1Usa HvMnFtkkjFrWqnVaSXByk2mQNgWzzJfNoNt1ODpY= From: Pavel Hofman To: linux-usb@vger.kernel.org Cc: Pavel Hofman , Ruslan Bilovol , Felipe Balbi , Jerome Brunet , Julian Scheel , Greg Kroah-Hartman Subject: [PATCH v2 01/11] usb: gadget: u_audio: Subdevice 0 for capture ctls Date: Mon, 20 Dec 2021 22:11:20 +0100 Message-Id: <20211220211130.88590-2-pavel.hofman@ivitera.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211220211130.88590-1-pavel.hofman@ivitera.com> References: <20211220211130.88590-1-pavel.hofman@ivitera.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Both capture and playback alsa devices use subdevice 0. Yet capture-side ctls are defined for subdevice 1. The patch sets subdevice 0 for them. Signed-off-by: Pavel Hofman --- drivers/usb/gadget/function/u_audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/function/u_audio.c b/drivers/usb/gadget/function/u_audio.c index c46400be5464..4f6c0049c534 100644 --- a/drivers/usb/gadget/function/u_audio.c +++ b/drivers/usb/gadget/function/u_audio.c @@ -1145,7 +1145,7 @@ int g_audio_setup(struct g_audio *g_audio, const char *pcm_name, } kctl->id.device = pcm->device; - kctl->id.subdevice = i; + kctl->id.subdevice = 0; err = snd_ctl_add(card, kctl); if (err < 0) @@ -1168,7 +1168,7 @@ int g_audio_setup(struct g_audio *g_audio, const char *pcm_name, } kctl->id.device = pcm->device; - kctl->id.subdevice = i; + kctl->id.subdevice = 0; kctl->tlv.c = u_audio_volume_tlv;