From 118fbca85804706f3a83086ee73400d1781ddc67 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Mon, 20 Jan 2014 20:31:01 +0000 Subject: [PATCH] MCLK_STABILITY_DELAY renamed and updated --- module_usb_audio/devicedefines.h | 7 ++++--- module_usb_audio/endpoint0/audiorequests.xc | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/module_usb_audio/devicedefines.h b/module_usb_audio/devicedefines.h index 57e00175..1fb98a1c 100644 --- a/module_usb_audio/devicedefines.h +++ b/module_usb_audio/devicedefines.h @@ -209,9 +209,10 @@ #error Bad DEFAULT_MCLK_FREQ #endif -/* The number of clock ticks to wait for the audio PLL to lock */ -#ifndef MCLK_STABILITY_DELAY -#define MCLK_STABILITY_DELAY (40000000) +/* The number of clock ticks to wait for the audio feeback to stabalise */ +#ifndef FEEDBACK_STABILITY_DELAY +/* Note, feedback always counts 128 SOFs (16ms @ HS, 128ms @ FS) */ +#define FEEDBACK_STABILITY_DELAY (20000000) #endif /* Vendor String */ diff --git a/module_usb_audio/endpoint0/audiorequests.xc b/module_usb_audio/endpoint0/audiorequests.xc index ebd93690..6ffb629e 100644 --- a/module_usb_audio/endpoint0/audiorequests.xc +++ b/module_usb_audio/endpoint0/audiorequests.xc @@ -318,7 +318,7 @@ int AudioClassRequests_2(XUD_ep ep0_out, XUD_ep ep0_in, USB_SetupPacket_t &sp, c timer t; unsigned time; t :> time; - t when timerafter(time+5000000+MCLK_STABILITY_DELAY):> void; + t when timerafter(time+FEEDBACK_STABILITY_DELAY):> void; } } @@ -1049,7 +1049,7 @@ int AudioEndpointRequests_1(XUD_ep ep0_out, XUD_ep ep0_in, USB_SetupPacket_t &sp timer t; unsigned time; t :> time; - t when timerafter(time+50000000+MCLK_STABILTY_DELAY):> void; + t when timerafter(time+FEEDBACK_STABILTY_DELAY):> void; } } }