Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3701249pxb; Mon, 24 Jan 2022 15:46:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJxvyhe11zJcv4P6dRT8WtocxvGs/Dpvf+QA9iSnd2l53MxTHQ6dp37+4eI7veJ9LdndUQFO X-Received: by 2002:a17:902:a60f:b0:14b:63db:9bc1 with SMTP id u15-20020a170902a60f00b0014b63db9bc1mr3479715plq.60.1643067979607; Mon, 24 Jan 2022 15:46:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643067979; cv=none; d=google.com; s=arc-20160816; b=M7hLWytXrippFrUIjKrn3+gyPrBk9KEEL4s6k3sitj0zeiTuZeX2UNMRR/keELkEAx 55jsE0JyJVZTSTrK4FTG8KoCIf1XVJQ829YYWzcMULt8pD6uH04BxhWsn3foMAzgZ0nI yqzPOG9TvN7K/BWFDZpnGeeIzDGBwehMoKoparld2NHoCwcSpmhqOrgK2AYDoh3RO2sN YhthCu8mGgVSOtr5WvkvH7xGbF6WUE/emTEccw2i6+CbghvqvbQ9JYnuluDCuWgkJwYO F1QDSBSTEv2a3OkzS1UMZUWspw0sCLM4lg0QVuCJyWdlgOBCwD58kUkQOCyvRITIK5IR aHHg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Ys1sc+bArtqUHKWNSWvRftLQwFWqVId1BGaca9H1jFw=; b=qIwOTAIX7KxegpgTLs03/Qla4wXsyjfenTHjxhNF1QQkch879KUx3F0CMOUzfH5Lat O3LMHEBtY5v8jIW3PhbAlcUAAIAcKcL8xvIrkzbu2WKK9LL0pI3EMNIeS76155mZRqoB JAEAq7BJ+m9GKCnVWTPv6qgEgkoPTYXABIQWDF/gIAoObfmG+MIh8zMyuFZ6l/7WZYck BdWWvV5IYjqekoWuGlda/0TNk7YmrMVv2k7NSys27/LwvqofheoFcJtBdJBwQPjioqdw ZYm2zqHlSRR73Nc23BSCU3W6wrn0rJUQTa9/dGL/FWZnadqA0wYWeeTbs0Szz+30YV/4 Q+5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="OXuajE/5"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x1si537075pjr.181.2022.01.24.15.46.06; Mon, 24 Jan 2022 15:46:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="OXuajE/5"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2361356AbiAXXjv (ORCPT + 99 others); Mon, 24 Jan 2022 18:39:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1841169AbiAXW5q (ORCPT ); Mon, 24 Jan 2022 17:57:46 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85EDBC03463F; Mon, 24 Jan 2022 13:12:42 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 4C90AB80FA3; Mon, 24 Jan 2022 21:12:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E762C340E5; Mon, 24 Jan 2022 21:12:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643058760; bh=IixZNRqrC7fA+CC4osZInDTPVqKj2ZTmVK4/tN2viaQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OXuajE/5/YK/kjk4AiTKnXlQLCGC2HHoMPHaUJo2z44kY3SVr2o6yJgOBlJzCkWCJ YGTbLDRtqIBtflMIYtuqqFbprbOOiwn3QKi3a6qtx7GbHe7it8b56sTxD+K7XAX3ln 8EXR1sqlnKyb4XkTqXqhF7ek8K43HZFwfCk6CL1Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pavel Hofman , Sasha Levin Subject: [PATCH 5.16 0393/1039] usb: gadget: u_audio: Subdevice 0 for capture ctls Date: Mon, 24 Jan 2022 19:36:22 +0100 Message-Id: <20220124184138.534127053@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pavel Hofman [ Upstream commit 601a5bc1aeef772ab1f47582fd322957799f5ab5 ] 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. Fixes: 02de698ca812 ("usb: gadget: u_audio: add bi-directional volume and mute support") Signed-off-by: Pavel Hofman Link: https://lore.kernel.org/r/20220105104643.90125-1-pavel.hofman@ivitera.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- 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 4fb05f9576a67..4561d7a183ff4 100644 --- a/drivers/usb/gadget/function/u_audio.c +++ b/drivers/usb/gadget/function/u_audio.c @@ -1147,7 +1147,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) @@ -1170,7 +1170,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; -- 2.34.1