diff options
author | Jarkko Nikula <jarkko.nikula@nokia.com> | 2008-10-23 14:27:03 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-10-23 15:57:14 +0200 |
commit | 4b7d283150b35db6e5e10f72606f603ff424c92a (patch) | |
tree | f11f7af38c5fedc65dd7d5388fb9df25e0c0f301 /sound | |
parent | da6320becf31c40b60d4b1dc6b339c9a766b671c (diff) | |
download | linux-4b7d283150b35db6e5e10f72606f603ff424c92a.tar.gz linux-4b7d283150b35db6e5e10f72606f603ff424c92a.tar.bz2 linux-4b7d283150b35db6e5e10f72606f603ff424c92a.zip |
ALSA: ASoC: tlv320aic3x: Fix DSP DAI format and signal polarities matching
- Codec doesn't support to configure bit clock and frame sync polarities
- Codec doesn't support DSP_A format but DSP_B with inverted bit clock
polarity
- Match also other formats with their signal polarities
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index 05336ed7e493..cff276ee261e 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c @@ -863,17 +863,21 @@ static int aic3x_set_dai_fmt(struct snd_soc_dai *codec_dai, return -EINVAL; } - /* interface format */ - switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { - case SND_SOC_DAIFMT_I2S: + /* + * match both interface format and signal polarities since they + * are fixed + */ + switch (fmt & (SND_SOC_DAIFMT_FORMAT_MASK | + SND_SOC_DAIFMT_INV_MASK)) { + case (SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF): break; - case SND_SOC_DAIFMT_DSP_A: + case (SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_IB_NF): iface_breg |= (0x01 << 6); break; - case SND_SOC_DAIFMT_RIGHT_J: + case (SND_SOC_DAIFMT_RIGHT_J | SND_SOC_DAIFMT_NB_NF): iface_breg |= (0x02 << 6); break; - case SND_SOC_DAIFMT_LEFT_J: + case (SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_NB_NF): iface_breg |= (0x03 << 6); break; default: |