diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2015-06-04 15:04:29 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-06-05 19:53:36 +0200 |
commit | d20b098dd98ec9e0a205ad59e32d93a636a783b3 (patch) | |
tree | b516eb33dc61304ef205c38e182c8dbee1e24811 /sound/soc/codecs/tas2552.h | |
parent | ASoC: tas2552: Implement startup/stop sequence as per TRM (diff) | |
download | linux-d20b098dd98ec9e0a205ad59e32d93a636a783b3.tar.xz linux-d20b098dd98ec9e0a205ad59e32d93a636a783b3.zip |
ASoC: tas2552: Add support for word length configuration
Configure the word length based on the params_width of the stream.
Also configure the clock per frame value which is used when tas2552 is bus
master.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/tas2552.h')
-rw-r--r-- | sound/soc/codecs/tas2552.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/codecs/tas2552.h b/sound/soc/codecs/tas2552.h index 5bdc7eaaddea..de0ab0d27520 100644 --- a/sound/soc/codecs/tas2552.h +++ b/sound/soc/codecs/tas2552.h @@ -66,11 +66,21 @@ #define TAS2552_SDOUT_TRISTATE (1 << 2) /* Serial Interface Control Register Masks */ +#define TAS2552_WORDLENGTH_16BIT (0x0 << 0) +#define TAS2552_WORDLENGTH_20BIT (0x1 << 0) +#define TAS2552_WORDLENGTH_24BIT (0x2 << 0) +#define TAS2552_WORDLENGTH_32BIT (0x3 << 0) +#define TAS2552_WORDLENGTH_MASK TAS2552_WORDLENGTH_32BIT #define TAS2552_DATAFORMAT_I2S (0x0 << 2) #define TAS2552_DATAFORMAT_DSP (0x1 << 2) #define TAS2552_DATAFORMAT_RIGHT_J (0x2 << 2) #define TAS2552_DATAFORMAT_LEFT_J (0x3 << 2) #define TAS2552_DATAFORMAT_MASK TAS2552_DATAFORMAT_LEFT_J +#define TAS2552_CLKSPERFRAME_32 (0x0 << 4) +#define TAS2552_CLKSPERFRAME_64 (0x1 << 4) +#define TAS2552_CLKSPERFRAME_128 (0x2 << 4) +#define TAS2552_CLKSPERFRAME_256 (0x3 << 4) +#define TAS2552_CLKSPERFRAME_MASK TAS2552_CLKSPERFRAME_256 #define TAS2552_BCLKDIR (1 << 6) #define TAS2552_WCLKDIR (1 << 7) |