Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3521598pxf; Mon, 15 Mar 2021 11:24:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyDC4Oh6AmZtJC2Jm0/XYaiVd87goj/hLoqPoUke5YjVgbTXAefn+Tz+OEm3+P2j4qm2oH X-Received: by 2002:a17:906:1712:: with SMTP id c18mr25548024eje.417.1615832682095; Mon, 15 Mar 2021 11:24:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832682; cv=none; d=google.com; s=arc-20160816; b=Z1J9piuN0S9spfo+a5AI2CXuLuo/MZGe6wESGTOjlLaSLB+XmF3/K70Ns4cJsIzN3/ OZi6cJQh5kxWjiFLaExuOfdAD3MW/TF16J9+7h6gWWLoAkNo5FSpE16SkB8gshSZ7ANM 29NsxpO9fN77fn3CnLoNGpqbC0Jg1LyXlG4ZsdL3Bw0a9u1Blaphkpm5GUblOBx0ehfH ejVCJsxw5rxKmva846P7uLwNIT7Bkpotw+RoehYxgUP3xn1AzmEsow9pAZaa5brHUrHi uY1g3c8RhuQ9sNQtcg3wt9e4qeYRSbAnf2WyIGN8cxjyI7ncPUmEDPM4YO1o1dL46PQt OJHA== 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=nt6eSrpqdPP8KL2PWR8wWqMPc3lvh5Jh9OPF7JDJXegkYgviLWcbOR2k40Qtx4J0NB sMbBylWnnPs3yZrMFVi0xsvBYfFN8BpQEEE92YtwpdQZ5ZO9XnewJLbF9Np+krMSChTu jK7uGia9vOFzOZc7rbVPSRJoORAeo3G8Amf68hQ31WNtu08LQUW6r9jOyi/JPLOXgz2s vahP4MB6IHPecH10G+5qGIy9Jy6AUhQ/6UmrqoIGL5bfpB+suqWJaWWDQ5XRcO3WzUxV 7QhKRFBOWBe0Tb0T0r8GvyWV4YH1DeW/KV1G6NIgiRTRKZz/pFOUds5NHs8j3WOUkMkT njKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Vvq6RgzQ; 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 11si6727958ejy.63.2021.03.15.11.24.19; Mon, 15 Mar 2021 11:24:42 -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=Vvq6RgzQ; 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 S237974AbhCOOW1 (ORCPT + 99 others); Mon, 15 Mar 2021 10:22:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:35904 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232916AbhCOOAK (ORCPT ); Mon, 15 Mar 2021 10:00:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C146164F6A; Mon, 15 Mar 2021 13:59:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816795; bh=198ZG1tjpE0eJK8e0iIWR6GPw4Ku9YEGd3F79jUu4mA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vvq6RgzQ2KFD4WKB/7DfwJSvEifZC3pQj8ljCr28DHw3tOsZ24sy/JdSy4t/u8PIH XoiT0CbCzk6qwCm92ITfUzdl/SFkqfWJwaqLyGeDHZAUf0cyuTT++Qd9YSu3yT/I7Z hMQp7YnKQdpoD9dzzG/V2bheGIS/gUSGBGQ1zgH8= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ruslan Bilovol Subject: [PATCH 4.19 073/120] usb: gadget: f_uac1: stop playback on function disable Date: Mon, 15 Mar 2021 14:57:04 +0100 Message-Id: <20210315135722.369346145@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135720.002213995@linuxfoundation.org> References: <20210315135720.002213995@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); }