diff --git a/lib_xua/src/core/buffer/decouple/decouple.xc b/lib_xua/src/core/buffer/decouple/decouple.xc index b5405fa2..fe730776 100644 --- a/lib_xua/src/core/buffer/decouple/decouple.xc +++ b/lib_xua/src/core/buffer/decouple/decouple.xc @@ -158,11 +158,11 @@ unsigned packData = 0; static inline void SendSamples4(chanend c_mix_out) { /* Doing this checking allows us to unroll */ - if(g_numUsbChan_Out == NUM_USB_CHAN_OUT) + if(1)//(g_numUsbChan_Out == NUM_USB_CHAN_OUT) { /* Buffering not underflow condition send out some samples...*/ #pragma loop unroll - for(int i = 0; i < NUM_USB_CHAN_OUT; i++) + for(int i = 0; i < g_numUsbChan_Out; i++) { int sample; int mult; diff --git a/lib_xua/src/core/endpoint0/xua_endpoint0.c b/lib_xua/src/core/endpoint0/xua_endpoint0.c index 1f23a457..d0645380 100755 --- a/lib_xua/src/core/endpoint0/xua_endpoint0.c +++ b/lib_xua/src/core/endpoint0/xua_endpoint0.c @@ -245,7 +245,6 @@ const unsigned g_dataFormat_In[INPUT_FORMAT_COUNT] = {STREAM_FORMAT_INPUT_1 }; /* Channel count */ -/* Note, currently only input changes.. */ const unsigned g_chanCount_In_HS[INPUT_FORMAT_COUNT] = {HS_STREAM_FORMAT_INPUT_1_CHAN_COUNT, #if(INPUT_FORMAT_COUNT > 1) HS_STREAM_FORMAT_INPUT_2_CHAN_COUNT, @@ -255,6 +254,15 @@ const unsigned g_chanCount_In_HS[INPUT_FORMAT_COUNT] = {HS_STREAM_FORMAT_I #endif }; +const unsigned g_chanCount_Out_HS[OUTPUT_FORMAT_COUNT] = {HS_STREAM_FORMAT_OUTPUT_1_CHAN_COUNT, +#if(OUTPUT_FORMAT_COUNT > 1) + HS_STREAM_FORMAT_OUTPUT_2_CHAN_COUNT, +#endif +#if(OUTPUT_FORMAT_COUNT > 2) + HS_STREAM_FORMAT_OUTPUT_3_CHAN_COUNT +#endif +}; + XUD_ep ep0_out; XUD_ep ep0_in; @@ -580,7 +588,7 @@ void XUA_Endpoint0_loop(XUD_Result_t result, USB_SetupPacket_t sp, chanend c_ep0 if(g_curUsbSpeed == XUD_SPEED_HS) { - outuint(c_audioControl, NUM_USB_CHAN_OUT); /* Channel count */ + outuint(c_audioControl, g_chanCount_Out_HS[sp.wValue-1]); /* Channel count */ outuint(c_audioControl, g_subSlot_Out_HS[sp.wValue-1]); /* Subslot */ outuint(c_audioControl, g_sampRes_Out_HS[sp.wValue-1]); /* Resolution */ }