Class 1 FS - noise + occasional overflow

This commit is contained in:
Ed Clarke
2018-10-29 13:09:10 +00:00
parent fc68acae6e
commit 12327505e5
4 changed files with 5 additions and 4 deletions

View File

@@ -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,

View File

@@ -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;
}
}

View File

@@ -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

View File

@@ -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