From 2e927ad7981db6765a2a0e8694371e0154b6e820 Mon Sep 17 00:00:00 2001 From: David Lin Date: Mon, 10 Jun 2019 11:05:23 +0800 Subject: ASoC: nau8822: support master mode The driver selects the proper BCLK divide through the BCLK and FS at the hardware parameter when the I2S master mode. Signed-off-by: David Lin Signed-off-by: John Hsu Signed-off-by: Mark Brown --- sound/soc/codecs/nau8822.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sound/soc/codecs/nau8822.h') diff --git a/sound/soc/codecs/nau8822.h b/sound/soc/codecs/nau8822.h index 9c552983a293..489191ff187e 100644 --- a/sound/soc/codecs/nau8822.h +++ b/sound/soc/codecs/nau8822.h @@ -107,10 +107,17 @@ /* NAU8822_REG_CLOCKING (0x6) */ #define NAU8822_CLKIOEN_MASK 0x1 +#define NAU8822_CLK_MASTER 0x1 +#define NAU8822_CLK_SLAVE 0x0 #define NAU8822_MCLKSEL_SFT 5 #define NAU8822_MCLKSEL_MASK (0x7 << 5) #define NAU8822_BCLKSEL_SFT 2 #define NAU8822_BCLKSEL_MASK (0x7 << 2) +#define NAU8822_BCLKDIV_1 (0x0 << 2) +#define NAU8822_BCLKDIV_2 (0x1 << 2) +#define NAU8822_BCLKDIV_4 (0x2 << 2) +#define NAU8822_BCLKDIV_8 (0x3 << 2) +#define NAU8822_BCLKDIV_16 (0x4 << 2) #define NAU8822_CLKM_MASK (0x1 << 8) #define NAU8822_CLKM_MCLK (0x0 << 8) #define NAU8822_CLKM_PLL (0x1 << 8) -- cgit v1.2.3