diff options
Diffstat (limited to 'sound/soc/codecs/tlv320aic3x.c')
-rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index 566a427c928f..cff276ee261e 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c | |||
@@ -48,7 +48,6 @@ | |||
48 | 48 | ||
49 | #include "tlv320aic3x.h" | 49 | #include "tlv320aic3x.h" |
50 | 50 | ||
51 | #define AUDIO_NAME "aic3x" | ||
52 | #define AIC3X_VERSION "0.2" | 51 | #define AIC3X_VERSION "0.2" |
53 | 52 | ||
54 | /* codec private data */ | 53 | /* codec private data */ |
@@ -864,17 +863,21 @@ static int aic3x_set_dai_fmt(struct snd_soc_dai *codec_dai, | |||
864 | return -EINVAL; | 863 | return -EINVAL; |
865 | } | 864 | } |
866 | 865 | ||
867 | /* interface format */ | 866 | /* |
868 | switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { | 867 | * match both interface format and signal polarities since they |
869 | 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): | ||
870 | break; | 873 | break; |
871 | case SND_SOC_DAIFMT_DSP_A: | 874 | case (SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_IB_NF): |
872 | iface_breg |= (0x01 << 6); | 875 | iface_breg |= (0x01 << 6); |
873 | break; | 876 | break; |
874 | case SND_SOC_DAIFMT_RIGHT_J: | 877 | case (SND_SOC_DAIFMT_RIGHT_J | SND_SOC_DAIFMT_NB_NF): |
875 | iface_breg |= (0x02 << 6); | 878 | iface_breg |= (0x02 << 6); |
876 | break; | 879 | break; |
877 | case SND_SOC_DAIFMT_LEFT_J: | 880 | case (SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_NB_NF): |
878 | iface_breg |= (0x03 << 6); | 881 | iface_breg |= (0x03 << 6); |
879 | break; | 882 | break; |
880 | default: | 883 | default: |
@@ -991,7 +994,7 @@ EXPORT_SYMBOL_GPL(aic3x_headset_detected); | |||
991 | SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S32_LE) | 994 | SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S32_LE) |
992 | 995 | ||
993 | struct snd_soc_dai aic3x_dai = { | 996 | struct snd_soc_dai aic3x_dai = { |
994 | .name = "aic3x", | 997 | .name = "tlv320aic3x", |
995 | .playback = { | 998 | .playback = { |
996 | .stream_name = "Playback", | 999 | .stream_name = "Playback", |
997 | .channels_min = 1, | 1000 | .channels_min = 1, |
@@ -1055,7 +1058,7 @@ static int aic3x_init(struct snd_soc_device *socdev) | |||
1055 | struct aic3x_setup_data *setup = socdev->codec_data; | 1058 | struct aic3x_setup_data *setup = socdev->codec_data; |
1056 | int reg, ret = 0; | 1059 | int reg, ret = 0; |
1057 | 1060 | ||
1058 | codec->name = "aic3x"; | 1061 | codec->name = "tlv320aic3x"; |
1059 | codec->owner = THIS_MODULE; | 1062 | codec->owner = THIS_MODULE; |
1060 | codec->read = aic3x_read_reg_cache; | 1063 | codec->read = aic3x_read_reg_cache; |
1061 | codec->write = aic3x_write; | 1064 | codec->write = aic3x_write; |