diff options
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 16 | ||||
-rw-r--r-- | sound/soc/omap/omap-mcbsp.c | 7 |
2 files changed, 12 insertions, 11 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: |
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index 853b33ae3435..8485a8a9d0ff 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c | |||
@@ -265,7 +265,7 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream, | |||
265 | break; | 265 | break; |
266 | case SND_SOC_DAIFMT_DSP_A: | 266 | case SND_SOC_DAIFMT_DSP_A: |
267 | regs->srgr2 |= FPER(wlen * 2 - 1); | 267 | regs->srgr2 |= FPER(wlen * 2 - 1); |
268 | regs->srgr1 |= FWID(0); | 268 | regs->srgr1 |= FWID(wlen * 2 - 2); |
269 | break; | 269 | break; |
270 | } | 270 | } |
271 | 271 | ||
@@ -284,7 +284,6 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
284 | { | 284 | { |
285 | struct omap_mcbsp_data *mcbsp_data = to_mcbsp(cpu_dai->private_data); | 285 | struct omap_mcbsp_data *mcbsp_data = to_mcbsp(cpu_dai->private_data); |
286 | struct omap_mcbsp_reg_cfg *regs = &mcbsp_data->regs; | 286 | struct omap_mcbsp_reg_cfg *regs = &mcbsp_data->regs; |
287 | unsigned int temp_fmt = fmt; | ||
288 | 287 | ||
289 | if (mcbsp_data->configured) | 288 | if (mcbsp_data->configured) |
290 | return 0; | 289 | return 0; |
@@ -307,8 +306,6 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
307 | /* 0-bit data delay */ | 306 | /* 0-bit data delay */ |
308 | regs->rcr2 |= RDATDLY(0); | 307 | regs->rcr2 |= RDATDLY(0); |
309 | regs->xcr2 |= XDATDLY(0); | 308 | regs->xcr2 |= XDATDLY(0); |
310 | /* Invert bit clock and FS polarity configuration for DSP_A */ | ||
311 | temp_fmt ^= SND_SOC_DAIFMT_IB_IF; | ||
312 | break; | 309 | break; |
313 | default: | 310 | default: |
314 | /* Unsupported data format */ | 311 | /* Unsupported data format */ |
@@ -332,7 +329,7 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
332 | } | 329 | } |
333 | 330 | ||
334 | /* Set bit clock (CLKX/CLKR) and FS polarities */ | 331 | /* Set bit clock (CLKX/CLKR) and FS polarities */ |
335 | switch (temp_fmt & SND_SOC_DAIFMT_INV_MASK) { | 332 | switch (fmt & SND_SOC_DAIFMT_INV_MASK) { |
336 | case SND_SOC_DAIFMT_NB_NF: | 333 | case SND_SOC_DAIFMT_NB_NF: |
337 | /* | 334 | /* |
338 | * Normal BCLK + FS. | 335 | * Normal BCLK + FS. |