Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3522607pxf; Mon, 15 Mar 2021 11:26:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLrapN7Lpo+MHmfVO29KRi39yZ58B7FUpH5pVH/JNbE7sqgbCV8IMhU4jwynyxgNob5Zg5 X-Received: by 2002:a17:906:3b47:: with SMTP id h7mr24870115ejf.377.1615832778303; Mon, 15 Mar 2021 11:26:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832778; cv=none; d=google.com; s=arc-20160816; b=lYm1lS4utTSZwjr2mllpWikc/ISXDI5nWIT6H/Bn/Wm8KxrgiqfbU/+BL9c6+D5OjC V5Uaj6OyIsI84mtE9dzNHnAz0pvK7fg0WaavSHHz/+s72zpZOFK/AiRztjB9bS1xnCmM EoV1iYVbLVMMY5JYS7I0F0/9Bzz7gcCiEGygbDrtPELAAXsJT8GJPwYYWbU+91g7X/H4 NpiMDei2I374kdUQxnXYH+TRztszHAuow2JdRMe7EB+icEEfpL2xV0EWPtFpyRF/xl5N EezDWSNHdzX2bbthHggEYD8vvqvU6M1LqqZ0+GC3vf85fXVHHtcoCu/UNPBavDl97Yoj JleA== 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=n40lU4zAVJNaQoSGI7tHwtyNfyVSHN+vu4y6mHpt6rI=; b=MyRgfElehw8WTnUWohZTPGUtXTdqB4YHaZ0mCAvW9H2Uq6Hhr0BJxqiFk1UuO73uBt 6WWRPItKpgxhNImZbllLKwSQSihX34SaVJCGEq1t1mOMBNgqwI8yYb1lsEdA3i+c408O jpRaX/Y6SBENcDiv64ySTpshp0L9P76N4qnaj+bO/eFnhyzlebCE4ztNCHgi0WpKo+KA I0daA/m5Yluji0wdheAbY0MF1P0AcjpUBDH0wqeay3pehzSiyAkttZW3T8lng3wuigPO d64ULdVi31MepNoUbP1Vg/bY3sfCwjIkAsv7Q/HRrXvHDLSLsyMx/+rMdOxx9mHjHt42 tUXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KVfeuiLL; 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 24si12153695edv.533.2021.03.15.11.25.54; Mon, 15 Mar 2021 11:26:18 -0700 (PDT) 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=KVfeuiLL; 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 S230159AbhCOOXu (ORCPT + 99 others); Mon, 15 Mar 2021 10:23:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:37522 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231688AbhCOOAB (ORCPT ); Mon, 15 Mar 2021 10:00:01 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0A96D64DAD; Mon, 15 Mar 2021 13:59:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816782; bh=198ZG1tjpE0eJK8e0iIWR6GPw4Ku9YEGd3F79jUu4mA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KVfeuiLLPuNhFTjFZzNZjjkgVwiUQfKWY87nLA1rNWRENYnUDWoOrlu+B+VWstdkZ MOqFRkEB5Z6hykk4b4NGGx/WAJgK/RAaZo6kToCvFbswy9SF9D0DAxufL2wEgvOFMQ qm455MIYO3lNalaTvh2ivTV6P2/YNlwWmHWft0Dc= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ruslan Bilovol Subject: [PATCH 5.4 106/168] usb: gadget: f_uac1: stop playback on function disable Date: Mon, 15 Mar 2021 14:55:38 +0100 Message-Id: <20210315135553.848590368@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135550.333963635@linuxfoundation.org> References: <20210315135550.333963635@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: Greg Kroah-Hartman From: Ruslan Bilovol commit cc2ac63d4cf72104e0e7f58bb846121f0f51bb19 upstream. There is missing playback stop/cleanup in case of gadget's ->disable callback that happens on events like USB host resetting or gadget disconnection Fixes: 0591bc236015 ("usb: gadget: add f_uac1 variant based on a new u_audio api") Cc: # 4.13+ Signed-off-by: Ruslan Bilovol Link: https://lore.kernel.org/r/1614599375-8803-3-git-send-email-ruslan.bilovol@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/function/f_uac1.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/usb/gadget/function/f_uac1.c +++ b/drivers/usb/gadget/function/f_uac1.c @@ -499,6 +499,7 @@ static void f_audio_disable(struct usb_f uac1->as_out_alt = 0; uac1->as_in_alt = 0; + u_audio_stop_playback(&uac1->g_audio); u_audio_stop_capture(&uac1->g_audio); }