diff options
| author | HiFiPhile <[email protected]> | 2023-11-19 15:55:24 +0100 |
|---|---|---|
| committer | HiFiPhile <[email protected]> | 2024-04-26 20:06:19 +0200 |
| commit | 1b66c148cce2699c3f5e470fa82f0efb192eb00a (patch) | |
| tree | 070e3982a4794d40944d64929ab2cb68312faed2 /src/class/audio/audio_device.h | |
| parent | ee9ad0f184752e4006ccfa6ae49b7ac83707d771 (diff) | |
UAC2: Implement feedback by fifo counting.
Diffstat (limited to 'src/class/audio/audio_device.h')
| -rw-r--r-- | src/class/audio/audio_device.h | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/class/audio/audio_device.h b/src/class/audio/audio_device.h index b16514fd4..9c95ce1a9 100644 --- a/src/class/audio/audio_device.h +++ b/src/class/audio/audio_device.h @@ -3,6 +3,7 @@ * * Copyright (c) 2020 Ha Thach (tinyusb.org) * Copyright (c) 2020 Reinhard Panhuber + * Copyright (c) 2023 HiFiPhile * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -487,7 +488,6 @@ TU_ATTR_WEAK void tud_audio_fb_done_cb(uint8_t func_id); // feedback = n_cycles / n_frames * f_s / f_m in 16.16 format, where n_cycles are the number of main clock cycles within fb_n_frames bool tud_audio_n_fb_set(uint8_t func_id, uint32_t feedback); -static inline bool tud_audio_fb_set(uint32_t feedback); // Update feedback value with passed cycles since last time this update function is called. // Typically called within tud_audio_sof_isr(). Required tud_audio_feedback_params_cb() is implemented @@ -500,9 +500,7 @@ enum { AUDIO_FEEDBACK_METHOD_FREQUENCY_FIXED, AUDIO_FEEDBACK_METHOD_FREQUENCY_FLOAT, AUDIO_FEEDBACK_METHOD_FREQUENCY_POWER_OF_2, - - // impelemnt later - // AUDIO_FEEDBACK_METHOD_FIFO_COUNT + AUDIO_FEEDBACK_METHOD_FIFO_COUNT }; typedef struct { @@ -514,11 +512,6 @@ typedef struct { uint32_t mclk_freq; // Main clock frequency in Hz i.e. master clock to which sample clock is based on }frequency; -#if 0 // implement later - struct { - uint32_t threshold_bytes; // minimum number of bytes received to be considered as filled/ready - }fifo_count; -#endif }; }audio_feedback_params_t; |
