Skip to content

Commit 1bc5506

Browse files
committed
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
1 parent 7da9c1a commit 1bc5506

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/usb/gadget/function/u_audio.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -909,6 +909,9 @@ void g_audio_cleanup(struct g_audio *g_audio)
909909
if (card)
910910
snd_card_free(card);
911911

912+
free_ep(&uac->c_prm, g_audio->out_ep);
913+
free_ep(&uac->p_prm, g_audio->in_ep);
914+
912915
kfree(uac->p_prm.ureq);
913916
kfree(uac->c_prm.ureq);
914917
kfree(uac->p_prm.rbuf);

0 commit comments

Comments
 (0)