forked from PAWPAW-Mirror/lib_xua
Update g_numUsbChan_Out to the selected interface out channel count
This commit is contained in:
@@ -158,11 +158,11 @@ unsigned packData = 0;
|
|||||||
static inline void SendSamples4(chanend c_mix_out)
|
static inline void SendSamples4(chanend c_mix_out)
|
||||||
{
|
{
|
||||||
/* Doing this checking allows us to unroll */
|
/* 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...*/
|
/* Buffering not underflow condition send out some samples...*/
|
||||||
#pragma loop unroll
|
#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 sample;
|
||||||
int mult;
|
int mult;
|
||||||
|
|||||||
@@ -245,7 +245,6 @@ const unsigned g_dataFormat_In[INPUT_FORMAT_COUNT] = {STREAM_FORMAT_INPUT_1
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* Channel count */
|
/* Channel count */
|
||||||
/* Note, currently only input changes.. */
|
|
||||||
const unsigned g_chanCount_In_HS[INPUT_FORMAT_COUNT] = {HS_STREAM_FORMAT_INPUT_1_CHAN_COUNT,
|
const unsigned g_chanCount_In_HS[INPUT_FORMAT_COUNT] = {HS_STREAM_FORMAT_INPUT_1_CHAN_COUNT,
|
||||||
#if(INPUT_FORMAT_COUNT > 1)
|
#if(INPUT_FORMAT_COUNT > 1)
|
||||||
HS_STREAM_FORMAT_INPUT_2_CHAN_COUNT,
|
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
|
#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_out;
|
||||||
XUD_ep ep0_in;
|
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)
|
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_subSlot_Out_HS[sp.wValue-1]); /* Subslot */
|
||||||
outuint(c_audioControl, g_sampRes_Out_HS[sp.wValue-1]); /* Resolution */
|
outuint(c_audioControl, g_sampRes_Out_HS[sp.wValue-1]); /* Resolution */
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user