forked from PAWPAW-Mirror/lib_xua
Manually fix decouple merge
This commit is contained in:
@@ -68,18 +68,18 @@ static xc_ptr p_multIn;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (AUDIO_CLASS == 2)
|
#if (AUDIO_CLASS == 2)
|
||||||
unsigned g_numUsbChan_In = NUM_USB_CHAN_IN; /* Number of channels to/from the USB bus - initialised to HS for UAC2.0 */
|
int g_numUsbChan_In = NUM_USB_CHAN_IN; /* Number of channels to/from the USB bus - initialised to HS for UAC2.0 */
|
||||||
unsigned g_numUsbChan_Out = NUM_USB_CHAN_OUT;
|
int g_numUsbChan_Out = NUM_USB_CHAN_OUT;
|
||||||
unsigned g_curSubSlot_Out = HS_STREAM_FORMAT_OUTPUT_1_SUBSLOT_BYTES;
|
int g_curSubSlot_Out = HS_STREAM_FORMAT_OUTPUT_1_SUBSLOT_BYTES;
|
||||||
unsigned g_curSubSlot_In = HS_STREAM_FORMAT_INPUT_1_SUBSLOT_BYTES;
|
int g_curSubSlot_In = HS_STREAM_FORMAT_INPUT_1_SUBSLOT_BYTES;
|
||||||
int sampsToWrite = DEFAULT_FREQ/8000; /* HS assumed here. Expect to be junked during a overflow before stream start */
|
int sampsToWrite = DEFAULT_FREQ/8000; /* HS assumed here. Expect to be junked during a overflow before stream start */
|
||||||
int totalSampsToWrite = DEFAULT_FREQ/8000;
|
int totalSampsToWrite = DEFAULT_FREQ/8000;
|
||||||
int g_maxPacketSize = MAX_DEVICE_AUD_PACKET_SIZE_IN_HS; /* IN packet size. Init to something sensible, but expect to be re-set before stream start */
|
int g_maxPacketSize = MAX_DEVICE_AUD_PACKET_SIZE_IN_HS; /* IN packet size. Init to something sensible, but expect to be re-set before stream start */
|
||||||
#else
|
#else
|
||||||
unsigned g_numUsbChan_In = NUM_USB_CHAN_IN_FS; /* Number of channels to/from the USB bus - initialised to FS for UAC1.0 */
|
int g_numUsbChan_In = NUM_USB_CHAN_IN_FS; /* Number of channels to/from the USB bus - initialised to FS for UAC1.0 */
|
||||||
unsigned g_numUsbChan_Out = NUM_USB_CHAN_OUT_FS;
|
int g_numUsbChan_Out = NUM_USB_CHAN_OUT_FS;
|
||||||
unsigned g_curSubSlot_Out = FS_STREAM_FORMAT_OUTPUT_1_SUBSLOT_BYTES;
|
int g_curSubSlot_Out = FS_STREAM_FORMAT_OUTPUT_1_SUBSLOT_BYTES;
|
||||||
unsigned g_curSubSlot_In = FS_STREAM_FORMAT_INPUT_1_SUBSLOT_BYTES;
|
int g_curSubSlot_In = FS_STREAM_FORMAT_INPUT_1_SUBSLOT_BYTES;
|
||||||
int sampsToWrite = DEFAULT_FREQ/1000; /* FS assumed here. Expect to be junked during a overflow before stream start */
|
int sampsToWrite = DEFAULT_FREQ/1000; /* FS assumed here. Expect to be junked during a overflow before stream start */
|
||||||
int totalSampsToWrite = DEFAULT_FREQ/1000;
|
int totalSampsToWrite = DEFAULT_FREQ/1000;
|
||||||
int g_maxPacketSize = MAX_DEVICE_AUD_PACKET_SIZE_IN_FS; /* IN packet size. Init to something sensible, but expect to be re-set before stream start */
|
int g_maxPacketSize = MAX_DEVICE_AUD_PACKET_SIZE_IN_FS; /* IN packet size. Init to something sensible, but expect to be re-set before stream start */
|
||||||
@@ -459,7 +459,7 @@ __builtin_unreachable();
|
|||||||
packState = 0;
|
packState = 0;
|
||||||
|
|
||||||
/* Write last packet length into FIFO */
|
/* Write last packet length into FIFO */
|
||||||
unsigned datasize = totalSampsToWrite * g_curSubSlot_In * g_numUsbChan_In;
|
int datasize = totalSampsToWrite * g_curSubSlot_In * g_numUsbChan_In;
|
||||||
|
|
||||||
GET_SHARED_GLOBAL(wrPtr, g_aud_to_host_wrptr);
|
GET_SHARED_GLOBAL(wrPtr, g_aud_to_host_wrptr);
|
||||||
write_via_xc_ptr(wrPtr, datasize);
|
write_via_xc_ptr(wrPtr, datasize);
|
||||||
@@ -515,7 +515,6 @@ __builtin_unreachable();
|
|||||||
GET_SHARED_GLOBAL(sampFreq, g_freqChange_sampFreq);
|
GET_SHARED_GLOBAL(sampFreq, g_freqChange_sampFreq);
|
||||||
int min, mid, max;
|
int min, mid, max;
|
||||||
GetADCCounts(sampFreq, min, mid, max);
|
GetADCCounts(sampFreq, min, mid, max);
|
||||||
|
|
||||||
const int max_pkt_size = ((max * g_curSubSlot_In * g_numUsbChan_In + 3) & ~0x3) + 4;
|
const int max_pkt_size = ((max * g_curSubSlot_In * g_numUsbChan_In + 3) & ~0x3) + 4;
|
||||||
int rdPtr;
|
int rdPtr;
|
||||||
GET_SHARED_GLOBAL(rdPtr, g_aud_to_host_rdptr);
|
GET_SHARED_GLOBAL(rdPtr, g_aud_to_host_rdptr);
|
||||||
|
|||||||
Reference in New Issue
Block a user