aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/soc-dai.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound/soc-dai.h')
-rw-r--r--include/sound/soc-dai.h37
1 files changed, 20 insertions, 17 deletions
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index 5ad5f3a50c68..2413acc54883 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -24,13 +24,13 @@ struct snd_pcm_substream;
24 * Describes the physical PCM data formating and clocking. Add new formats 24 * Describes the physical PCM data formating and clocking. Add new formats
25 * to the end. 25 * to the end.
26 */ 26 */
27#define SND_SOC_DAIFMT_I2S 0 /* I2S mode */ 27#define SND_SOC_DAIFMT_I2S 1 /* I2S mode */
28#define SND_SOC_DAIFMT_RIGHT_J 1 /* Right Justified mode */ 28#define SND_SOC_DAIFMT_RIGHT_J 2 /* Right Justified mode */
29#define SND_SOC_DAIFMT_LEFT_J 2 /* Left Justified mode */ 29#define SND_SOC_DAIFMT_LEFT_J 3 /* Left Justified mode */
30#define SND_SOC_DAIFMT_DSP_A 3 /* L data MSB after FRM LRC */ 30#define SND_SOC_DAIFMT_DSP_A 4 /* L data MSB after FRM LRC */
31#define SND_SOC_DAIFMT_DSP_B 4 /* L data MSB during FRM LRC */ 31#define SND_SOC_DAIFMT_DSP_B 5 /* L data MSB during FRM LRC */
32#define SND_SOC_DAIFMT_AC97 5 /* AC97 */ 32#define SND_SOC_DAIFMT_AC97 6 /* AC97 */
33#define SND_SOC_DAIFMT_PDM 6 /* Pulse density modulation */ 33#define SND_SOC_DAIFMT_PDM 7 /* Pulse density modulation */
34 34
35/* left and right justified also known as MSB and LSB respectively */ 35/* left and right justified also known as MSB and LSB respectively */
36#define SND_SOC_DAIFMT_MSB SND_SOC_DAIFMT_LEFT_J 36#define SND_SOC_DAIFMT_MSB SND_SOC_DAIFMT_LEFT_J
@@ -42,8 +42,8 @@ struct snd_pcm_substream;
42 * DAI bit clocks can be be gated (disabled) when the DAI is not 42 * DAI bit clocks can be be gated (disabled) when the DAI is not
43 * sending or receiving PCM data in a frame. This can be used to save power. 43 * sending or receiving PCM data in a frame. This can be used to save power.
44 */ 44 */
45#define SND_SOC_DAIFMT_CONT (0 << 4) /* continuous clock */ 45#define SND_SOC_DAIFMT_CONT (1 << 4) /* continuous clock */
46#define SND_SOC_DAIFMT_GATED (1 << 4) /* clock is gated */ 46#define SND_SOC_DAIFMT_GATED (2 << 4) /* clock is gated */
47 47
48/* 48/*
49 * DAI hardware signal inversions. 49 * DAI hardware signal inversions.
@@ -51,10 +51,10 @@ struct snd_pcm_substream;
51 * Specifies whether the DAI can also support inverted clocks for the specified 51 * Specifies whether the DAI can also support inverted clocks for the specified
52 * format. 52 * format.
53 */ 53 */
54#define SND_SOC_DAIFMT_NB_NF (0 << 8) /* normal bit clock + frame */ 54#define SND_SOC_DAIFMT_NB_NF (1 << 8) /* normal bit clock + frame */
55#define SND_SOC_DAIFMT_NB_IF (1 << 8) /* normal BCLK + inv FRM */ 55#define SND_SOC_DAIFMT_NB_IF (2 << 8) /* normal BCLK + inv FRM */
56#define SND_SOC_DAIFMT_IB_NF (2 << 8) /* invert BCLK + nor FRM */ 56#define SND_SOC_DAIFMT_IB_NF (3 << 8) /* invert BCLK + nor FRM */
57#define SND_SOC_DAIFMT_IB_IF (3 << 8) /* invert BCLK + FRM */ 57#define SND_SOC_DAIFMT_IB_IF (4 << 8) /* invert BCLK + FRM */
58 58
59/* 59/*
60 * DAI hardware clock masters. 60 * DAI hardware clock masters.
@@ -63,10 +63,10 @@ struct snd_pcm_substream;
63 * i.e. if the codec is clk and FRM master then the interface is 63 * i.e. if the codec is clk and FRM master then the interface is
64 * clk and frame slave. 64 * clk and frame slave.
65 */ 65 */
66#define SND_SOC_DAIFMT_CBM_CFM (0 << 12) /* codec clk & FRM master */ 66#define SND_SOC_DAIFMT_CBM_CFM (1 << 12) /* codec clk & FRM master */
67#define SND_SOC_DAIFMT_CBS_CFM (1 << 12) /* codec clk slave & FRM master */ 67#define SND_SOC_DAIFMT_CBS_CFM (2 << 12) /* codec clk slave & FRM master */
68#define SND_SOC_DAIFMT_CBM_CFS (2 << 12) /* codec clk master & frame slave */ 68#define SND_SOC_DAIFMT_CBM_CFS (3 << 12) /* codec clk master & frame slave */
69#define SND_SOC_DAIFMT_CBS_CFS (3 << 12) /* codec clk & FRM slave */ 69#define SND_SOC_DAIFMT_CBS_CFS (4 << 12) /* codec clk & FRM slave */
70 70
71#define SND_SOC_DAIFMT_FORMAT_MASK 0x000f 71#define SND_SOC_DAIFMT_FORMAT_MASK 0x000f
72#define SND_SOC_DAIFMT_CLOCK_MASK 0x00f0 72#define SND_SOC_DAIFMT_CLOCK_MASK 0x00f0
@@ -242,6 +242,9 @@ struct snd_soc_dai {
242 void *playback_dma_data; 242 void *playback_dma_data;
243 void *capture_dma_data; 243 void *capture_dma_data;
244 244
245 /* Symmetry data - only valid if symmetry is being enforced */
246 unsigned int rate;
247
245 /* parent platform/codec */ 248 /* parent platform/codec */
246 union { 249 union {
247 struct snd_soc_platform *platform; 250 struct snd_soc_platform *platform;