From 9402f12e1a19d025c9c5997c32f8b5989ed55554 Mon Sep 17 00:00:00 2001 From: asterix Date: Fri, 16 Sep 2011 12:33:19 +0000 Subject: [PATCH] Add some preset to configure sampling rate for codec. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@5055 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/drv/wm8731.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bertos/drv/wm8731.h b/bertos/drv/wm8731.h index 34d1a008..4d469ddd 100644 --- a/bertos/drv/wm8731.h +++ b/bertos/drv/wm8731.h @@ -161,6 +161,13 @@ #define WM8731_SR_BITS_MASK 0x3C // Sample rate control #define WM8731_CLKIDIV2_BIT 6 // Core clock divider select #define WM8731_CLKODIV2_BIT 7 // CLKOUT divider select +/** + * Sampling rate control + * $WIZ$ wm8731_sample_rate = "WM8731_NORMAL_256FS_48KHZ", "WM8731_NORMAL_256FS_44_1KHZ", "WM8731_NORMAL_384FS_44_1KHZ" + */ +#define WM8731_NORMAL_256FS_48KHZ 0 +#define WM8731_NORMAL_256FS_44_1KHZ 0x20 +#define WM8731_NORMAL_384FS_44_1KHZ 0x22 /* Active control register*/ #define WM8731_REG_ACTIVE_CTRL 0x9 -- 2.25.1