This patch adds bitfields for I2S serial formats that differ from the amount of data actually sent on the line. Some codecs (namely the cs4270) require 64 sysclks being sent during each frame period, even though the number of acutal data bits might be less.
Signed-off-by: Daniel Mack daniel@caiaq.de Cc: Mark Brown broonie@opensource.wolfsonmicro.com Cc: Liam Girdwood lrg@kernel.org Cc: Tim Ruetz tim@caiaq.de --- include/sound/soc-dai.h | 20 ++++++++++++++++---- 1 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 24247f7..83b617f 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h @@ -85,10 +85,22 @@ struct snd_pcm_substream; #define SND_SOC_DAIFMT_CBM_CFS (2 << 12) /* codec clk master & frame slave */ #define SND_SOC_DAIFMT_CBS_CFS (3 << 12) /* codec clk & frm slave */
-#define SND_SOC_DAIFMT_FORMAT_MASK 0x000f -#define SND_SOC_DAIFMT_CLOCK_MASK 0x00f0 -#define SND_SOC_DAIFMT_INV_MASK 0x0f00 -#define SND_SOC_DAIFMT_MASTER_MASK 0xf000 +/* + * DAI hardware frame formats. + * + * Independently, these bits the define the audio format on the + * pysical channel in case it differs from the audio sample the + * DAI is configured to + */ +#define SND_SOC_DAIFMT_FF_SAMPLE (0 << 16) +#define SND_SOC_DAIFMT_FF_I2S_16 (1 << 16) +#define SND_SOC_DAIFMT_FF_I2S_32 (2 << 16) + +#define SND_SOC_DAIFMT_FORMAT_MASK 0x0000f +#define SND_SOC_DAIFMT_CLOCK_MASK 0x000f0 +#define SND_SOC_DAIFMT_INV_MASK 0x00f00 +#define SND_SOC_DAIFMT_MASTER_MASK 0x0f000 +#define SND_SOC_DAIFMT_FRAME_FORMAT_MASK 0xf0000
/* * Master Clock Directions