[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1613514299-20668-3-git-send-email-ruslan.bilovol@gmail.com>
Date: Wed, 17 Feb 2021 00:24:56 +0200
From: Ruslan Bilovol <ruslan.bilovol@...il.com>
To: Felipe Balbi <balbi@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Peter Chen <peter.chen@...escale.com>,
Daniel Mack <zonque@...il.com>, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org,
Ruslan Bilovol <ruslan.bilovol@...il.com>,
<stable@...r.kernel.org>
Subject: [PATCH 2/5] usb: gadget: f_uac1: stop playback on function disable
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: <stable@...r.kernel.org> # 4.13+
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@...il.com>
---
drivers/usb/gadget/function/f_uac1.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/gadget/function/f_uac1.c b/drivers/usb/gadget/function/f_uac1.c
index 00d3469..560382e 100644
--- 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_function *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);
}
--
1.9.1
Powered by blists - more mailing lists