usb: gadget: u_audio: disable eps when usb disconnect

UAC gadget disable eps only when receiving set_alt_0. If USB is
unplugged before the packet of set_alt_0, the corresponding eps
will not be released and leading to UAC dysfunction when the next
time the usb is plugged.

Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: I476ef8ce64a5b04cc3fec32a28126e2eb9d5ad78
This commit is contained in:
Ren Jianing
2021-03-12 09:31:10 +08:00
committed by Tao Huang
parent 2b48a7268d
commit 0b82f4909b

View File

@@ -1022,6 +1022,9 @@ void g_audio_cleanup(struct g_audio *g_audio)
if (card)
snd_card_free(card);
free_ep(&uac->c_prm, g_audio->out_ep);
free_ep(&uac->p_prm, g_audio->in_ep);
kfree(uac->p_prm.ureq);
kfree(uac->c_prm.ureq);
kfree(uac->p_prm.rbuf);