aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuslan Bilovol <[email protected]>2021-03-01 13:49:32 +0200
committerGreg Kroah-Hartman <[email protected]>2021-03-10 09:36:12 +0100
commitcc2ac63d4cf72104e0e7f58bb846121f0f51bb19 (patch)
treedc313f6a44c050810a142aa32b07db272432714a
parent789ea77310f0200c84002884ffd628e2baf3ad8a (diff)
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: <[email protected]> # 4.13+ Signed-off-by: Ruslan Bilovol <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/usb/gadget/function/f_uac1.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/function/f_uac1.c b/drivers/usb/gadget/function/f_uac1.c
index 00d346965f7a..560382e0a8f3 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);
}