forked from PAWPAW-Mirror/lib_xua
Class 1 FS - noise + occasional overflow
This commit is contained in:
@@ -96,7 +96,7 @@ int main()
|
||||
AudioHwConfigure(DEFAULT_FREQ, i_i2c[0]);
|
||||
}
|
||||
|
||||
debug_printf("XUD SPEED: %d\n", (AUDIO_CLASS == 1) ? XUD_SPEED_FS : XUD_SPEED_HS);
|
||||
debug_printf("XUD SPEED: %d\n", (AUDIO_CLASS == 1) ? XUD_SPEED_FS : XUD_SPEED_HS); //FS = 1, HS = 2
|
||||
par{
|
||||
// Low level USB device layer core
|
||||
XUD_Main(c_ep_out, 2, c_ep_in, 3,
|
||||
|
||||
@@ -43,7 +43,7 @@ void AudioHub(server i2s_frame_callback_if i2s,
|
||||
restart = I2S_NO_RESTART; // Keep on looping
|
||||
for (int i = 0; i < NUM_USB_CHAN_IN; i++) c_audio_hub <: samples_in[i];
|
||||
for (int i = 0; i < NUM_USB_CHAN_OUT; i++) c_audio_hub :> samples_out[i];
|
||||
delay_microseconds(5); //Test backpressure tolerance
|
||||
//delay_microseconds(5); //Test backpressure tolerance
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -253,7 +253,7 @@ void XUA_Buffer_lite(chanend c_ep0_out, chanend c_ep0_in, chanend c_aud_out, cha
|
||||
unpack_buff_to_samples(buffer_aud_out, num_samples_received_from_host, out_subslot_size, loopback_samples);
|
||||
|
||||
fifo_ret_t ret = fifo_block_push(host_to_device_fifo_ptr, loopback_samples, num_samples_received_from_host);
|
||||
if (ret != FIFO_SUCCESS) debug_printf("host_to_device_fifo full\n");
|
||||
if (ret != FIFO_SUCCESS) debug_printf("h2f full\n");
|
||||
num_samples_to_send_to_host = num_samples_received_from_host;
|
||||
|
||||
//Mark EP as ready for next frame from host
|
||||
@@ -263,6 +263,7 @@ void XUA_Buffer_lite(chanend c_ep0_out, chanend c_ep0_in, chanend c_aud_out, cha
|
||||
//Send asynch explicit feedback value
|
||||
case XUD_SetData_Select(c_feedback, ep_feedback, result):
|
||||
XUD_SetReady_In(ep_feedback, (fb_clocks, unsigned char[]), (AUDIO_CLASS == 2) ? 4 : 3);
|
||||
//debug_printf("0x%x\n", fb_clocks[0]);
|
||||
break;
|
||||
|
||||
//Send samples to host
|
||||
|
||||
@@ -29,6 +29,6 @@
|
||||
|
||||
#define UAC_FORCE_FEEDBACK_EP 1
|
||||
#define XUA_LITE 1 // Use simple/optimised USB buffer tasks
|
||||
#define AUDIO_CLASS 2
|
||||
#define AUDIO_CLASS 1
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user