forked from PAWPAW-Mirror/lib_xua
c_clk_int param (and associated functionality) removed from decouple
This commit is contained in:
@@ -6,10 +6,8 @@
|
|||||||
* Audio I/O driver.
|
* Audio I/O driver.
|
||||||
*
|
*
|
||||||
* \param c_audio_out Channel connected to the audio() or mixer() threads
|
* \param c_audio_out Channel connected to the audio() or mixer() threads
|
||||||
* \param c_clk_int Optional chanend connected to the clockGen() thread if present
|
|
||||||
*/
|
*/
|
||||||
void decouple(chanend c_audio_out,
|
void decouple(chanend c_audio_out
|
||||||
chanend ?c_clk_int
|
|
||||||
#ifdef CHAN_BUFF_CTRL
|
#ifdef CHAN_BUFF_CTRL
|
||||||
, chanend c_buff_ctrl
|
, chanend c_buff_ctrl
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ void GetADCCounts(unsigned samFreq, int &min, int &mid, int &max);
|
|||||||
/* Globals for EP types */
|
/* Globals for EP types */
|
||||||
XUD_ep aud_from_host_usb_ep = 0;
|
XUD_ep aud_from_host_usb_ep = 0;
|
||||||
XUD_ep aud_to_host_usb_ep = 0;
|
XUD_ep aud_to_host_usb_ep = 0;
|
||||||
XUD_ep int_usb_ep = 0;
|
|
||||||
|
|
||||||
/* Shared global audio buffering variables */
|
/* Shared global audio buffering variables */
|
||||||
unsigned g_aud_from_host_buffer;
|
unsigned g_aud_from_host_buffer;
|
||||||
@@ -570,8 +569,7 @@ __builtin_unreachable();
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
unsigned g_intFlag = 0;
|
#if 0
|
||||||
|
|
||||||
extern unsigned char g_intData[8];
|
extern unsigned char g_intData[8];
|
||||||
|
|
||||||
static void check_for_interrupt(chanend ?c_clk_int) {
|
static void check_for_interrupt(chanend ?c_clk_int) {
|
||||||
@@ -596,8 +594,10 @@ static void check_for_interrupt(chanend ?c_clk_int) {
|
|||||||
/* Make request to send to XUD endpoint - response handled in usb_buffer */
|
/* Make request to send to XUD endpoint - response handled in usb_buffer */
|
||||||
//XUD_SetReady(int_usb_ep, 0);
|
//XUD_SetReady(int_usb_ep, 0);
|
||||||
|
|
||||||
//asm("ldaw %0, dp[g_intData]":"=r"(x));
|
// printstrln("interrupt");
|
||||||
//XUD_SetReady_In(int_usb_ep, g_intData, 6);
|
|
||||||
|
asm("ldaw %0, dp[g_intData]":"=r"(x));
|
||||||
|
XUD_SetReady_In(int_usb_ep, g_intData, 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -605,6 +605,8 @@ static void check_for_interrupt(chanend ?c_clk_int) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Mark Endpoint (IN) ready with an appropriately sized zero buffer */
|
/* Mark Endpoint (IN) ready with an appropriately sized zero buffer */
|
||||||
static inline void SetupZerosSendBuffer(XUD_ep aud_to_host_usb_ep, unsigned sampFreq, unsigned slotSize)
|
static inline void SetupZerosSendBuffer(XUD_ep aud_to_host_usb_ep, unsigned sampFreq, unsigned slotSize)
|
||||||
@@ -636,8 +638,7 @@ static inline void SetupZerosSendBuffer(XUD_ep aud_to_host_usb_ep, unsigned samp
|
|||||||
unsigned char tmpBuffer[1026];
|
unsigned char tmpBuffer[1026];
|
||||||
|
|
||||||
#pragma unsafe arrays
|
#pragma unsafe arrays
|
||||||
void decouple(chanend c_mix_out,
|
void decouple(chanend c_mix_out
|
||||||
chanend ?c_clk_int
|
|
||||||
#ifdef CHAN_BUFF_CTRL
|
#ifdef CHAN_BUFF_CTRL
|
||||||
, chanend c_buf_ctrl
|
, chanend c_buf_ctrl
|
||||||
#endif
|
#endif
|
||||||
@@ -680,14 +681,6 @@ void decouple(chanend c_mix_out,
|
|||||||
t = array_to_xc_ptr(inZeroBuff);
|
t = array_to_xc_ptr(inZeroBuff);
|
||||||
g_aud_to_host_zeros = t;
|
g_aud_to_host_zeros = t;
|
||||||
|
|
||||||
/* Init interrupt report */
|
|
||||||
g_intData[0] = 0; // Class-specific, caused by interface
|
|
||||||
g_intData[1] = 1; // attribute: CUR
|
|
||||||
g_intData[2] = 0; // CN/ MCN
|
|
||||||
g_intData[3] = 0; // CS
|
|
||||||
g_intData[4] = 0; // interface
|
|
||||||
g_intData[5] = 0; // ID of entity causing interrupt - this will get modified
|
|
||||||
|
|
||||||
/* Init vol mult tables */
|
/* Init vol mult tables */
|
||||||
#ifndef OUT_VOLUME_IN_MIXER
|
#ifndef OUT_VOLUME_IN_MIXER
|
||||||
for (int i = 0; i < NUM_USB_CHAN_OUT + 1; i++)
|
for (int i = 0; i < NUM_USB_CHAN_OUT + 1; i++)
|
||||||
@@ -749,10 +742,10 @@ void decouple(chanend c_mix_out,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!isnull(c_clk_int))
|
//if (!isnull(c_clk_int))
|
||||||
{
|
// {
|
||||||
check_for_interrupt(c_clk_int);
|
// check_for_interrupt(c_clk_int);
|
||||||
}
|
// }
|
||||||
|
|
||||||
{
|
{
|
||||||
asm("#decouple-default");
|
asm("#decouple-default");
|
||||||
|
|||||||
Reference in New Issue
Block a user