diff options
author | Jarkko Nikula <jarkko.nikula@nokia.com> | 2008-10-23 07:27:03 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-10-23 09:57:14 -0400 |
commit | 4b7d283150b35db6e5e10f72606f603ff424c92a (patch) | |
tree | f11f7af38c5fedc65dd7d5388fb9df25e0c0f301 /sound | |
parent | da6320becf31c40b60d4b1dc6b339c9a766b671c (diff) |
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, | |||
863 | return -EINVAL; | 863 | return -EINVAL; |
864 | } | 864 | } |
865 | 865 | ||
866 | /* interface format */ | 866 | /* |
867 | switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { | 867 | * match both interface format and signal polarities since they |
868 | case SND_SOC_DAIFMT_I2S: | 868 | * are fixed |
869 | */ | ||
870 | switch (fmt & (SND_SOC_DAIFMT_FORMAT_MASK | | ||
871 | SND_SOC_DAIFMT_INV_MASK)) { | ||
872 | case (SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF): | ||
869 | break; | 873 | break; |
870 | case SND_SOC_DAIFMT_DSP_A: | 874 | case (SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_IB_NF): |
871 | iface_breg |= (0x01 << 6); | 875 | iface_breg |= (0x01 << 6); |
872 | break; | 876 | break; |
873 | case SND_SOC_DAIFMT_RIGHT_J: | 877 | case (SND_SOC_DAIFMT_RIGHT_J | SND_SOC_DAIFMT_NB_NF): |
874 | iface_breg |= (0x02 << 6); | 878 | iface_breg |= (0x02 << 6); |
875 | break; | 879 | break; |
876 | case SND_SOC_DAIFMT_LEFT_J: | 880 | case (SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_NB_NF): |
877 | iface_breg |= (0x03 << 6); | 881 | iface_breg |= (0x03 << 6); |
878 | break; | 882 | break; |
879 | default: | 883 | default: |