mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user