forked from PAWPAW-Mirror/lib_xua
Set ADAT format channel counts based on min and max frequency
This commit is contained in:
@@ -435,6 +435,18 @@
|
|||||||
#define XUA_SPDIF_RX_EN (0)
|
#define XUA_SPDIF_RX_EN (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if XUA_ADAT_RX_EN
|
||||||
|
#if (MIN_FREQ < 88200)
|
||||||
|
#define ADAT_RX_MAX_CHANS (8)
|
||||||
|
#elif (MIN_FREQ < 176400)
|
||||||
|
#define ADAT_RX_MAX_CHANS (4)
|
||||||
|
#else
|
||||||
|
#define ADAT_RX_MAX_CHANS (2)
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#define ADAT_RX_MAX_CHANS (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Enables ADAT Rx. Default: 0 (Disabled)
|
* @brief Enables ADAT Rx. Default: 0 (Disabled)
|
||||||
*/
|
*/
|
||||||
@@ -467,7 +479,7 @@
|
|||||||
#define ADAT_RX_INDEX (0) /* Default define for doxygen */
|
#define ADAT_RX_INDEX (0) /* Default define for doxygen */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (ADAT_RX_INDEX + 8 > NUM_USB_CHAN_IN)
|
#if (ADAT_RX_INDEX + ADAT_RX_MAX_CHANS > NUM_USB_CHAN_IN)
|
||||||
#error Not enough channels for ADAT
|
#error Not enough channels for ADAT
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -476,17 +488,34 @@
|
|||||||
|
|
||||||
/* Setup input stream formats for ADAT */
|
/* Setup input stream formats for ADAT */
|
||||||
#if (MAX_FREQ > 96000)
|
#if (MAX_FREQ > 96000)
|
||||||
#define INPUT_FORMAT_COUNT 3
|
#if (MIN_FREQ > 96000)
|
||||||
#elif(MAX_FREQ > 48000)
|
|
||||||
#define INPUT_FORMAT_COUNT 2
|
|
||||||
#else
|
|
||||||
#define INPUT_FORMAT_COUNT 1
|
#define INPUT_FORMAT_COUNT 1
|
||||||
#endif
|
#define HS_STREAM_FORMAT_INPUT_1_CHAN_COUNT NUM_USB_CHAN_IN
|
||||||
|
#elif (MIN_FREQ > 48000)
|
||||||
|
#define INPUT_FORMAT_COUNT 2
|
||||||
|
#define HS_STREAM_FORMAT_INPUT_1_CHAN_COUNT NUM_USB_CHAN_IN
|
||||||
|
#define HS_STREAM_FORMAT_INPUT_2_CHAN_COUNT (NUM_USB_CHAN_IN - 2)
|
||||||
|
#else
|
||||||
|
#define INPUT_FORMAT_COUNT 3
|
||||||
#define HS_STREAM_FORMAT_INPUT_1_CHAN_COUNT NUM_USB_CHAN_IN
|
#define HS_STREAM_FORMAT_INPUT_1_CHAN_COUNT NUM_USB_CHAN_IN
|
||||||
#define HS_STREAM_FORMAT_INPUT_2_CHAN_COUNT (NUM_USB_CHAN_IN - 4)
|
#define HS_STREAM_FORMAT_INPUT_2_CHAN_COUNT (NUM_USB_CHAN_IN - 4)
|
||||||
#define HS_STREAM_FORMAT_INPUT_3_CHAN_COUNT (NUM_USB_CHAN_IN - 6)
|
#define HS_STREAM_FORMAT_INPUT_3_CHAN_COUNT (NUM_USB_CHAN_IN - 6)
|
||||||
#endif
|
#endif
|
||||||
|
#elif (MAX_FREQ > 48000)
|
||||||
|
#if (MIN_FREQ > 48000)
|
||||||
|
#define INPUT_FORMAT_COUNT 1
|
||||||
|
#define HS_STREAM_FORMAT_INPUT_1_CHAN_COUNT NUM_USB_CHAN_IN
|
||||||
|
#else
|
||||||
|
#define INPUT_FORMAT_COUNT 2
|
||||||
|
#define HS_STREAM_FORMAT_INPUT_1_CHAN_COUNT NUM_USB_CHAN_IN
|
||||||
|
#define HS_STREAM_FORMAT_INPUT_2_CHAN_COUNT (NUM_USB_CHAN_IN - 4)
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#define INPUT_FORMAT_COUNT 1
|
||||||
|
#define HS_STREAM_FORMAT_INPUT_1_CHAN_COUNT NUM_USB_CHAN_IN
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Enable DFU functionality. A driver required for Windows operation.
|
* @brief Enable DFU functionality. A driver required for Windows operation.
|
||||||
|
|||||||
Reference in New Issue
Block a user