Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3527340pxf; Mon, 15 Mar 2021 11:32:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyK6DjKOH6nlY6w6PdVQIHWRo5Xg/f9JZwaf7EycBJQneoGOA+T+FQ8c0SX+YKtv8+z0Kp4 X-Received: by 2002:a05:6402:13ce:: with SMTP id a14mr31619819edx.365.1615833153289; Mon, 15 Mar 2021 11:32:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615833153; cv=none; d=google.com; s=arc-20160816; b=gYhE/TVLt/07HQo+XeHRX6Vncj4eZ/37WNeMOmAv5+MhZaeCUvElGNURGEfZ6ePqim 8dLDoIaNhokigR8wganDfExkBQOTf7Nm+K6URJO7xwgqZPU6kRhGEEcBHtXelTV/m4nX YdBBMWSEPTerqurwZd4QbmHIkUzJO5HYvrcw6eIU57PcXCVHl1RkwUwX8+hpkIjXDEQB ISlrgfIrPMQ0Y+q+CA01WuOBo1tklTnyCb2j0H3C/Imkk+C98zSbHUqubOBCLjenEN2d D0mnaDfBp4mQBHio92co8Tm6+ieT8cv/oQo/FCNbRtyRkYrLrbygVuz/QPvbztn76feR /4wA== 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=FukpCysI0j4ohR3+lTpSKShfhfmqxV4oPqRxnYWlKqIvgzsFfqAJl0AY5//gclupRS cO7zMzyZffQlI7pwr/edL5EiTk0H3/W7wswwmqgouyKd/j3vZD1ws4yhj2e8HD6Q2bVX MdCGelh+Kzl3hfMEuB8sWibV1cVV7q7WkGETi6Yj0PxJijuztS79qP9AuqFGqhp+LZ+T x+cOAVXX0JTI9uWqkYk08o76io1o8gQL5MwUGOwu01ECEC/vG7V71yOcavaadQQewuD3 lPkzMAy7OM1Ub8WfJIQBbiJAT/cP4SC4ZOFBtSZWsP7fZ483PuzMZxjl6pcFmJYjQGWx 3JOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AWfC0o80; 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 l14si10500549eji.711.2021.03.15.11.32.10; Mon, 15 Mar 2021 11:32:33 -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=AWfC0o80; 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 S236993AbhCOOj1 (ORCPT + 99 others); Mon, 15 Mar 2021 10:39:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:49010 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233723AbhCOOCW (ORCPT ); Mon, 15 Mar 2021 10:02:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 10D3E64EF3; Mon, 15 Mar 2021 14:02:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816941; bh=198ZG1tjpE0eJK8e0iIWR6GPw4Ku9YEGd3F79jUu4mA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AWfC0o80CkgYi2ZUC5VYP8gzxjgcSPSTJ9NPI+53d3awzGl/t9yW3tqr/ymzHy9my gpdQoYzvCkAmIwMbQ6tau18dFF5jNS1toM3Y5utD/dWEYKm01l8H8SMa0SBgPJFRHp AU+1D+pQj27ybnjdPpCX68EMGC+BNBsdWa4Sb7vc= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ruslan Bilovol Subject: [PATCH 5.10 201/290] usb: gadget: f_uac1: stop playback on function disable Date: Mon, 15 Mar 2021 14:54:54 +0100 Message-Id: <20210315135548.709145884@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135541.921894249@linuxfoundation.org> References: <20210315135541.921894249@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); }