mirror of
https://github.com/apache/nuttx.git
synced 2026-05-26 10:46:28 +08:00
WM8904: Add logic to program the FLL to achieve the bitrate
This commit is contained in:
+395
-42
File diff suppressed because it is too large
Load Diff
@@ -814,6 +814,7 @@
|
||||
# define WM8904_FLL_CTRL_RATE(n) ((uint16_t)((n)-1) << WM8904_FLL_CTRL_RATE_SHIFT)
|
||||
#define WM8904_FLL_FRATIO_SHIFT (0) /* Bits 0-2: FVCO clock divider */
|
||||
#define WM8904_FLL_FRATIO_MASK (7 << WM8904_FLL_FRATIO_SHIFT)
|
||||
# define WM8904_FLL_FRATIO(n) ((uint32_t)(n) << WM8904_FLL_FRATIO_SHIFT)
|
||||
# define WM8904_FLL_FRATIO_DIV1 (0 << WM8904_FLL_FRATIO_SHIFT) /* Divide by 1 */
|
||||
# define WM8904_FLL_FRATIO_DIV2 (1 << WM8904_FLL_FRATIO_SHIFT) /* Divide by 2 */
|
||||
# define WM8904_FLL_FRATIO_DIV4 (2 << WM8904_FLL_FRATIO_SHIFT) /* Divide by 4 */
|
||||
|
||||
@@ -161,7 +161,7 @@ struct wm8904_lower_s
|
||||
* the frequency of MCLK in order to generate the correct bitrates.
|
||||
*/
|
||||
|
||||
uint32_t mcclk; /* W8904 Master clock frequency */
|
||||
uint32_t mclk; /* W8904 Master clock frequency */
|
||||
|
||||
/* IRQ/GPIO access callbacks. These operations all hidden behind
|
||||
* callbacks to isolate the WM8904 driver from differences in GPIO
|
||||
|
||||
Reference in New Issue
Block a user