diff options
author | Ladislav Michl <ladis@linux-mips.org> | 2018-03-01 15:21:30 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-03-01 17:56:36 +0000 |
commit | 79e139744508105bd749300f364563934bff23f2 (patch) | |
tree | 35f2cd0771d25f7193960eb453714286cdf9be9a /sound/soc/codecs/max9867.c | |
parent | e6ceb922ca802711db4b48639a9c73f9dc412f87 (diff) | |
download | lwn-79e139744508105bd749300f364563934bff23f2.tar.gz lwn-79e139744508105bd749300f364563934bff23f2.zip |
ASoC: max9867: DSP mode
Add configuration for DSP mode.
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/max9867.c')
-rw-r--r-- | sound/soc/codecs/max9867.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sound/soc/codecs/max9867.c b/sound/soc/codecs/max9867.c index 367c0329d5c8..0dbf3136e3ef 100644 --- a/sound/soc/codecs/max9867.c +++ b/sound/soc/codecs/max9867.c @@ -325,10 +325,16 @@ static int max9867_dai_set_fmt(struct snd_soc_dai *codec_dai, return -EINVAL; } - /* for i2s compatible mode */ - iface1A |= MAX9867_I2S_DLY; - /* SDOUT goes to hiz state after all data is transferred */ - iface1A |= MAX9867_SDOUT_HIZ; + switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { + case SND_SOC_DAIFMT_I2S: + iface1A |= MAX9867_I2S_DLY; + break; + case SND_SOC_DAIFMT_DSP_A: + iface1A |= MAX9867_TDM_MODE | MAX9867_SDOUT_HIZ; + break; + default: + return -EINVAL; + } /* Clock inversion bits, BCI and WCI */ switch (fmt & SND_SOC_DAIFMT_INV_MASK) { |