aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorTroy Kisky <troy.kisky@boundarydevices.com>2008-12-19 15:05:23 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2008-12-20 08:05:39 -0500
commit9e031624d50c82a47671e09cc996eebb9e36f698 (patch)
tree78aaade35f344b92298f6159e7c32b5df2a1dcac /sound/soc
parenta24f4f682661b8069d374a9197bc491525a7c799 (diff)
ALSA: ASoC: DaVinci: i2s, evm, pass same value to codec and cpu_dai
Fix the meaning of SND_SOC_DAIFMT_NB_NF to match that used in the codec. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/davinci/davinci-evm.c10
-rw-r--r--sound/soc/davinci/davinci-i2s.c8
2 files changed, 8 insertions, 10 deletions
diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c
index 5c041bf05f31..d2476e206a87 100644
--- a/sound/soc/davinci/davinci-evm.c
+++ b/sound/soc/davinci/davinci-evm.c
@@ -28,6 +28,8 @@
28 28
29#define EVM_CODEC_CLOCK 22579200 29#define EVM_CODEC_CLOCK 22579200
30 30
31#define AUDIO_FORMAT (SND_SOC_DAIFMT_I2S | \
32 SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_NB_NF)
31static int evm_hw_params(struct snd_pcm_substream *substream, 33static int evm_hw_params(struct snd_pcm_substream *substream,
32 struct snd_pcm_hw_params *params) 34 struct snd_pcm_hw_params *params)
33{ 35{
@@ -37,16 +39,12 @@ static int evm_hw_params(struct snd_pcm_substream *substream,
37 int ret = 0; 39 int ret = 0;
38 40
39 /* set codec DAI configuration */ 41 /* set codec DAI configuration */
40 ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | 42 ret = snd_soc_dai_set_fmt(codec_dai, AUDIO_FORMAT);
41 SND_SOC_DAIFMT_CBM_CFM |
42 SND_SOC_DAIFMT_NB_NF);
43 if (ret < 0) 43 if (ret < 0)
44 return ret; 44 return ret;
45 45
46 /* set cpu DAI configuration */ 46 /* set cpu DAI configuration */
47 ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | 47 ret = snd_soc_dai_set_fmt(cpu_dai, AUDIO_FORMAT);
48 SND_SOC_DAIFMT_CBM_CFM |
49 SND_SOC_DAIFMT_IB_NF);
50 if (ret < 0) 48 if (ret < 0)
51 return ret; 49 return ret;
52 50
diff --git a/sound/soc/davinci/davinci-i2s.c b/sound/soc/davinci/davinci-i2s.c
index 51ceded8a245..0fee779e3c76 100644
--- a/sound/soc/davinci/davinci-i2s.c
+++ b/sound/soc/davinci/davinci-i2s.c
@@ -271,7 +271,7 @@ static int davinci_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai,
271 } 271 }
272 272
273 switch (fmt & SND_SOC_DAIFMT_INV_MASK) { 273 switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
274 case SND_SOC_DAIFMT_IB_NF: 274 case SND_SOC_DAIFMT_NB_NF:
275 /* CLKRP Receive clock polarity, 275 /* CLKRP Receive clock polarity,
276 * 1 - sampled on rising edge of CLKR 276 * 1 - sampled on rising edge of CLKR
277 * valid on rising edge 277 * valid on rising edge
@@ -283,7 +283,7 @@ static int davinci_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai,
283 */ 283 */
284 pcr |= (DAVINCI_MCBSP_PCR_CLKXP | DAVINCI_MCBSP_PCR_CLKRP); 284 pcr |= (DAVINCI_MCBSP_PCR_CLKXP | DAVINCI_MCBSP_PCR_CLKRP);
285 break; 285 break;
286 case SND_SOC_DAIFMT_NB_IF: 286 case SND_SOC_DAIFMT_IB_IF:
287 /* CLKRP Receive clock polarity, 287 /* CLKRP Receive clock polarity,
288 * 0 - sampled on falling edge of CLKR 288 * 0 - sampled on falling edge of CLKR
289 * valid on falling edge 289 * valid on falling edge
@@ -295,7 +295,7 @@ static int davinci_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai,
295 */ 295 */
296 pcr |= (DAVINCI_MCBSP_PCR_FSXP | DAVINCI_MCBSP_PCR_FSRP); 296 pcr |= (DAVINCI_MCBSP_PCR_FSXP | DAVINCI_MCBSP_PCR_FSRP);
297 break; 297 break;
298 case SND_SOC_DAIFMT_IB_IF: 298 case SND_SOC_DAIFMT_NB_IF:
299 /* CLKRP Receive clock polarity, 299 /* CLKRP Receive clock polarity,
300 * 1 - sampled on rising edge of CLKR 300 * 1 - sampled on rising edge of CLKR
301 * valid on rising edge 301 * valid on rising edge
@@ -308,7 +308,7 @@ static int davinci_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai,
308 pcr |= (DAVINCI_MCBSP_PCR_CLKXP | DAVINCI_MCBSP_PCR_CLKRP | 308 pcr |= (DAVINCI_MCBSP_PCR_CLKXP | DAVINCI_MCBSP_PCR_CLKRP |
309 DAVINCI_MCBSP_PCR_FSXP | DAVINCI_MCBSP_PCR_FSRP); 309 DAVINCI_MCBSP_PCR_FSXP | DAVINCI_MCBSP_PCR_FSRP);
310 break; 310 break;
311 case SND_SOC_DAIFMT_NB_NF: 311 case SND_SOC_DAIFMT_IB_NF:
312 /* CLKRP Receive clock polarity, 312 /* CLKRP Receive clock polarity,
313 * 0 - sampled on falling edge of CLKR 313 * 0 - sampled on falling edge of CLKR
314 * valid on falling edge 314 * valid on falling edge