From c25dd063a333c19020f164a4cd3d2bb11bde9f12 Mon Sep 17 00:00:00 2001 From: Sam Chesney Date: Fri, 5 Sep 2014 13:38:33 +0100 Subject: [PATCH 1/2] Enable XUD status notifications on EA Native Transport IN endpoint --- module_usb_audio/main.xc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module_usb_audio/main.xc b/module_usb_audio/main.xc index 8666c2da..19468478 100755 --- a/module_usb_audio/main.xc +++ b/module_usb_audio/main.xc @@ -222,7 +222,7 @@ XUD_EpType epTypeTableIn[ENDPOINT_COUNT_IN] = { XUD_EPTYPE_CTL | XUD_STATUS_ENAB XUD_EPTYPE_BUL | XUD_STATUS_ENABLE, #endif #ifdef IAP_EA_NATIVE_TRANS - XUD_EPTYPE_BUL /*| XUD_STATUS_ENABLE*/, + XUD_EPTYPE_BUL | XUD_STATUS_ENABLE, #endif #endif }; From 31bfa779bb71583096a8c39dd64db095713f1d56 Mon Sep 17 00:00:00 2001 From: Sam Chesney Date: Thu, 11 Sep 2014 10:39:44 +0100 Subject: [PATCH 2/2] Reset state of endpoints associated with EA Native interface when changing an alternative setting. --- module_usb_audio/endpoint0/endpoint0.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module_usb_audio/endpoint0/endpoint0.c b/module_usb_audio/endpoint0/endpoint0.c index 744a7dcf..016468c0 100755 --- a/module_usb_audio/endpoint0/endpoint0.c +++ b/module_usb_audio/endpoint0/endpoint0.c @@ -342,6 +342,11 @@ void Endpoint0(chanend c_ep0_out, chanend c_ep0_in, chanend c_audioControl, /* Check the alt is in range */ if (sp.wValue <= IAP_EA_NATIVE_TRANS_ALT_COUNT) { + /* Reset all state of endpoints associated with this interface + * when changing an alternative setting. See USB 2.0 Spec 9.1.1.5 */ + XUD_ResetEpStateByAddr(ENDPOINT_ADDRESS_IN_IAP_EA_NATIVE_TRANS); + XUD_ResetEpStateByAddr(ENDPOINT_ADDRESS_OUT_IAP_EA_NATIVE_TRANS); + /* Send selected Alt interface number onto EA Native EP manager */ outuint(c_EANativeTransport_ctrl, (unsigned)sp.wValue);