aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/soc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound/soc.h')
-rw-r--r--include/sound/soc.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index ecdd1fac94b6..3dfe052e0788 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -21,7 +21,7 @@
21#include <sound/control.h> 21#include <sound/control.h>
22#include <sound/ac97_codec.h> 22#include <sound/ac97_codec.h>
23 23
24#define SND_SOC_VERSION "0.11.8" 24#define SND_SOC_VERSION "0.12"
25 25
26/* 26/*
27 * Convenience kcontrol builders 27 * Convenience kcontrol builders
@@ -141,19 +141,24 @@
141/* bit clock dividers */ 141/* bit clock dividers */
142#define SND_SOC_FSBD(x) (1 << (x - 1)) /* ratio mclk:bclk */ 142#define SND_SOC_FSBD(x) (1 << (x - 1)) /* ratio mclk:bclk */
143#define SND_SOC_FSBD_REAL(x) (ffs(x)) 143#define SND_SOC_FSBD_REAL(x) (ffs(x))
144#define SND_SOC_FSBD_ALL 0xffff /* all bit clock dividers supported */
145 144
146/* bit clock ratio to sample rate */ 145/* bit clock ratio to (sample rate * channels * word size) */
147#define SND_SOC_FSB(x) (1 << ((x - 16) / 16)) 146#define SND_SOC_FSBW(x) (1 << (x - 1))
148#define SND_SOC_FSB_REAL(x) (((ffs(x) - 1) * 16) + 16) 147#define SND_SOC_FSBW_REAL(x) (ffs(x))
149/* all bclk ratios supported */ 148/* all bclk ratios supported */
150#define SND_SOC_FSB_ALL SND_SOC_FSBD_ALL 149#define SND_SOC_FSB_ALL ~0ULL
151 150
152/* 151/*
153 * DAI hardware flags 152 * DAI hardware flags
154 */ 153 */
155/* use bfs mclk divider mode, else sample rate ratio */ 154/* use bfs mclk divider mode (BCLK = MCLK / x) */
156#define SND_SOC_DAI_BFS_DIV 0x1 155#define SND_SOC_DAI_BFS_DIV 0x1
156/* use bfs rate mulitplier (BCLK = RATE * x)*/
157#define SND_SOC_DAI_BFS_RATE 0x2
158/* use bfs rcw multiplier (BCLK = RATE * CHN * WORD SIZE) */
159#define SND_SOC_DAI_BFS_RCW 0x4
160/* capture and playback can use different clocks */
161#define SND_SOC_DAI_ASYNC 0x8
157 162
158/* 163/*
159 * AC97 codec ID's bitmask 164 * AC97 codec ID's bitmask
@@ -264,7 +269,7 @@ struct snd_soc_dai_mode {
264 u16 pcmdir:2; /* SND_SOC_HWDIR_* */ 269 u16 pcmdir:2; /* SND_SOC_HWDIR_* */
265 u16 flags:8; /* hw flags */ 270 u16 flags:8; /* hw flags */
266 u16 fs; /* mclk to rate divider */ 271 u16 fs; /* mclk to rate divider */
267 u32 bfs; /* mclk to bclk dividers */ 272 u64 bfs; /* mclk to bclk dividers */
268 unsigned long priv; /* private mode data */ 273 unsigned long priv; /* private mode data */
269}; 274};
270 275