|
|
@@ -186,6 +186,11 @@
|
|
|
#define CFG_TUD_AUDIO_ENABLE_FEEDBACK_EP 0 // Feedback - 0 or 1
|
|
|
#endif
|
|
|
|
|
|
+// Enable/disable conversion from 16.16 to 10.14 format on full-speed devices. See tud_audio_n_fb_set().
|
|
|
+#ifndef CFG_TUD_AUDIO_ENABLE_FEEDBACK_FORMAT_CORRECTION
|
|
|
+#define CFG_TUD_AUDIO_ENABLE_FEEDBACK_FORMAT_CORRECTION 0 // 0 or 1
|
|
|
+#endif
|
|
|
+
|
|
|
// Audio interrupt control EP size - disabled if 0
|
|
|
#ifndef CFG_TUD_AUDIO_INT_CTR_EPSIZE_IN
|
|
|
#define CFG_TUD_AUDIO_INT_CTR_EPSIZE_IN 0 // Audio interrupt control - if required - 6 Bytes according to UAC 2 specification (p. 74)
|
|
|
@@ -454,10 +459,15 @@ TU_ATTR_WEAK bool tud_audio_rx_done_post_read_cb(uint8_t rhport, uint16_t n_byte
|
|
|
|
|
|
#if CFG_TUD_AUDIO_ENABLE_EP_OUT && CFG_TUD_AUDIO_ENABLE_FEEDBACK_EP
|
|
|
TU_ATTR_WEAK bool tud_audio_fb_done_cb(uint8_t rhport);
|
|
|
-// User code should call this function with feedback value in 16.16 format for FS and HS.
|
|
|
-// Value will be corrected for FS to 10.14 format automatically.
|
|
|
-// (see Universal Serial Bus Specification Revision 2.0 5.12.4.2).
|
|
|
-// Feedback value will be sent at FB endpoint interval till it's changed.
|
|
|
+
|
|
|
+// This function is used to provide data rate feedback from an asynchronous sink. Feedback value will be sent at FB endpoint interval till it's changed.
|
|
|
+//
|
|
|
+// The feedback format is specified to be 16.16 for HS and 10.14 for FS devices (see Universal Serial Bus Specification Revision 2.0 5.12.4.2). By default,
|
|
|
+// the choice of format is left to the caller and feedback argument is sent as-is. If CFG_TUD_AUDIO_ENABLE_FEEDBACK_FORMAT_CORRECTION is set, then tinyusb
|
|
|
+// expects 16.16 format and handles the conversion to 10.14 on FS.
|
|
|
+//
|
|
|
+// Note that due to a bug in its USB Audio 2.0 driver, Windows currently requires 16.16 format for _all_ USB 2.0 devices. On Linux and macOS it seems the
|
|
|
+// driver can work with either format. So a good compromise is to keep format correction disabled and stick to 16.16 format.
|
|
|
bool tud_audio_n_fb_set(uint8_t func_id, uint32_t feedback);
|
|
|
static inline bool tud_audio_fb_set(uint32_t feedback);
|
|
|
#endif
|