From 73b2e5f27e41534499fcfc7917d3a51d7eadfa9e Mon Sep 17 00:00:00 2001 From: Sam Chesney Date: Tue, 29 Jul 2014 15:25:32 +0100 Subject: [PATCH] Endpoint0 now sends notification that the EA Native Transport interface alternative setting has changed --- module_usb_audio/endpoint0/endpoint0.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/module_usb_audio/endpoint0/endpoint0.c b/module_usb_audio/endpoint0/endpoint0.c index e1591a55..cfd28db4 100755 --- a/module_usb_audio/endpoint0/endpoint0.c +++ b/module_usb_audio/endpoint0/endpoint0.c @@ -335,8 +335,24 @@ void Endpoint0(chanend c_ep0_out, chanend c_ep0_in, chanend c_audioControl, } } break; +#ifdef IAP_EA_NATIVE_TRANS + case INTERFACE_NUMBER_IAP_EA_NATIVE_TRANS: + /* Check the alt is in range */ + if (sp.wValue <= IAP_EA_NATIVE_TRANS_ALT_COUNT) //FIXME is this check required? + /* Alt 0 is EA Protocol stop */ + /* Only send change if we need to */ + //TODO if ((sp.wValue > 0) && g_eaNativeTransportAlt != sp.wValue))? { + //TODO g_eaNativeTransportAlt = sp.wValue;? + /* Send selected Alt interface number onto EA Native EP manager */ + outuint(c_EANativeTransport_ctrl, sp.wValue); + + /* Handshake */ + chkct(c_EANativeTransport_ctrl, XS1_CT_END); + } + break; +#endif default: /* Unhandled interface */ break;