comment out fifo count method for now

This commit is contained in:
hathach 2022-05-31 20:26:37 +07:00
parent dce2ad4ffb
commit f2926670cc
2 changed files with 15 additions and 10 deletions

View File

@ -305,13 +305,12 @@ typedef struct
#endif #endif
#if CFG_TUD_AUDIO_ENABLE_FEEDBACK_EP #if CFG_TUD_AUDIO_ENABLE_FEEDBACK_EP
struct { struct {
uint32_t value; // Feedback value for asynchronous mode (in 16.16 format). uint32_t value; // Feedback value for asynchronous mode (in 16.16 format).
uint32_t min_value; // min value according to UAC2 FMT-2.0 section 2.3.1.1. uint32_t min_value; // min value according to UAC2 FMT-2.0 section 2.3.1.1.
uint32_t max_value; // max value according to UAC2 FMT-2.0 section 2.3.1.1. uint32_t max_value; // max value according to UAC2 FMT-2.0 section 2.3.1.1.
uint8_t frame_shift; // bInterval-1 in unit of frame (FS), micro-frame (HS) uint8_t frame_shift; // bInterval-1 in unit of frame (FS), micro-frame (HS)
uint8_t compute_method; uint8_t compute_method;
union { union {
@ -323,15 +322,17 @@ typedef struct
uint32_t mclk_freq; uint32_t mclk_freq;
}fixed; }fixed;
#if 0 // implement later
struct { struct {
uint32_t nominal_value; uint32_t nominal_value;
uint32_t threshold_bytes; uint32_t threshold_bytes;
}fifo_count; }fifo_count;
#endif
}compute; }compute;
} feedback; } feedback;
#endif // CFG_TUD_AUDIO_ENABLE_FEEDBACK_EP #endif // CFG_TUD_AUDIO_ENABLE_FEEDBACK_EP
#endif // CFG_TUD_AUDIO_ENABLE_EP_OUT #endif // CFG_TUD_AUDIO_ENABLE_EP_OUT
#if CFG_TUD_AUDIO_ENABLE_EP_IN && !CFG_TUD_AUDIO_ENABLE_ENCODING #if CFG_TUD_AUDIO_ENABLE_EP_IN && !CFG_TUD_AUDIO_ENABLE_ENCODING
@ -1729,8 +1730,8 @@ static bool audiod_set_interface(uint8_t rhport, tusb_control_request_t const *
set_fb_params_freq(audio, fb_param.sample_freq, fb_param.frequency.mclk_freq); set_fb_params_freq(audio, fb_param.sample_freq, fb_param.frequency.mclk_freq);
break; break;
case AUDIO_FEEDBACK_METHOD_FIFO_COUNT_FIXED: #if 0 // implement later
case AUDIO_FEEDBACK_METHOD_FIFO_COUNT_FLOAT: case AUDIO_FEEDBACK_METHOD_FIFO_COUNT:
{ {
uint64_t fb64 = ((uint64_t) fb_param.sample_freq) << 16; uint64_t fb64 = ((uint64_t) fb_param.sample_freq) << 16;
audio->feedback.compute.fifo_count.nominal_value = (uint32_t) (fb64 / frame_div); audio->feedback.compute.fifo_count.nominal_value = (uint32_t) (fb64 / frame_div);
@ -1739,6 +1740,7 @@ static bool audiod_set_interface(uint8_t rhport, tusb_control_request_t const *
tud_audio_fb_set(audio->feedback.compute.fifo_count.nominal_value); tud_audio_fb_set(audio->feedback.compute.fifo_count.nominal_value);
} }
break; break;
#endif
// nothing to do // nothing to do
default: break; default: break;

View File

@ -498,8 +498,9 @@ enum {
AUDIO_FEEDBACK_METHOD_FREQUENCY_FIXED, AUDIO_FEEDBACK_METHOD_FREQUENCY_FIXED,
AUDIO_FEEDBACK_METHOD_FREQUENCY_FLOAT, AUDIO_FEEDBACK_METHOD_FREQUENCY_FLOAT,
AUDIO_FEEDBACK_METHOD_FREQUENCY_POWER_OF_2, AUDIO_FEEDBACK_METHOD_FREQUENCY_POWER_OF_2,
AUDIO_FEEDBACK_METHOD_FIFO_COUNT_FIXED,
AUDIO_FEEDBACK_METHOD_FIFO_COUNT_FLOAT // impelemnt later
// AUDIO_FEEDBACK_METHOD_FIFO_COUNT
}; };
typedef struct { typedef struct {
@ -511,9 +512,11 @@ typedef struct {
uint32_t mclk_freq; // Main clock frequency in Hz i.e. master clock to which sample clock is based on uint32_t mclk_freq; // Main clock frequency in Hz i.e. master clock to which sample clock is based on
}frequency; }frequency;
#if 0 // implement later
struct { struct {
uint32_t threshold_bytes; // minimum number of bytes received to be considered as filled/ready uint32_t threshold_bytes; // minimum number of bytes received to be considered as filled/ready
}fifo_count; }fifo_count;
#endif
}; };
}audio_feedback_params_t; }audio_feedback_params_t;