Skip to content

Commit f292667

Browse files
committed
comment out fifo count method for now
1 parent dce2ad4 commit f292667

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

src/class/audio/audio_device.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -305,13 +305,12 @@ typedef struct
305305
#endif
306306

307307
#if CFG_TUD_AUDIO_ENABLE_FEEDBACK_EP
308-
309308
struct {
310-
uint32_t value; // Feedback value for asynchronous mode (in 16.16 format).
311-
uint32_t min_value; // min value according to UAC2 FMT-2.0 section 2.3.1.1.
312-
uint32_t max_value; // max value according to UAC2 FMT-2.0 section 2.3.1.1.
309+
uint32_t value; // Feedback value for asynchronous mode (in 16.16 format).
310+
uint32_t min_value; // min value according to UAC2 FMT-2.0 section 2.3.1.1.
311+
uint32_t max_value; // max value according to UAC2 FMT-2.0 section 2.3.1.1.
313312

314-
uint8_t frame_shift; // bInterval-1 in unit of frame (FS), micro-frame (HS)
313+
uint8_t frame_shift; // bInterval-1 in unit of frame (FS), micro-frame (HS)
315314
uint8_t compute_method;
316315

317316
union {
@@ -323,15 +322,17 @@ typedef struct
323322
uint32_t mclk_freq;
324323
}fixed;
325324

325+
#if 0 // implement later
326326
struct {
327327
uint32_t nominal_value;
328328
uint32_t threshold_bytes;
329329
}fifo_count;
330+
#endif
330331
}compute;
331332

332333
} feedback;
333-
334334
#endif // CFG_TUD_AUDIO_ENABLE_FEEDBACK_EP
335+
335336
#endif // CFG_TUD_AUDIO_ENABLE_EP_OUT
336337

337338
#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 *
17291730
set_fb_params_freq(audio, fb_param.sample_freq, fb_param.frequency.mclk_freq);
17301731
break;
17311732

1732-
case AUDIO_FEEDBACK_METHOD_FIFO_COUNT_FIXED:
1733-
case AUDIO_FEEDBACK_METHOD_FIFO_COUNT_FLOAT:
1733+
#if 0 // implement later
1734+
case AUDIO_FEEDBACK_METHOD_FIFO_COUNT:
17341735
{
17351736
uint64_t fb64 = ((uint64_t) fb_param.sample_freq) << 16;
17361737
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 *
17391740
tud_audio_fb_set(audio->feedback.compute.fifo_count.nominal_value);
17401741
}
17411742
break;
1743+
#endif
17421744

17431745
// nothing to do
17441746
default: break;

src/class/audio/audio_device.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,8 +498,9 @@ enum {
498498
AUDIO_FEEDBACK_METHOD_FREQUENCY_FIXED,
499499
AUDIO_FEEDBACK_METHOD_FREQUENCY_FLOAT,
500500
AUDIO_FEEDBACK_METHOD_FREQUENCY_POWER_OF_2,
501-
AUDIO_FEEDBACK_METHOD_FIFO_COUNT_FIXED,
502-
AUDIO_FEEDBACK_METHOD_FIFO_COUNT_FLOAT
501+
502+
// impelemnt later
503+
// AUDIO_FEEDBACK_METHOD_FIFO_COUNT
503504
};
504505

505506
typedef struct {
@@ -511,9 +512,11 @@ typedef struct {
511512
uint32_t mclk_freq; // Main clock frequency in Hz i.e. master clock to which sample clock is based on
512513
}frequency;
513514

515+
#if 0 // implement later
514516
struct {
515517
uint32_t threshold_bytes; // minimum number of bytes received to be considered as filled/ready
516518
}fifo_count;
519+
#endif
517520
};
518521
}audio_feedback_params_t;
519522

0 commit comments

Comments
 (0)