Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 120327
b: refs/heads/master
c: 9e03162
h: refs/heads/master
i:
  120325: e386bcb
  120323: 2945caa
  120319: e3a4434
v: v3
  • Loading branch information
Troy Kisky authored and Mark Brown committed Dec 20, 2008
1 parent f01c376 commit a942ee1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a24f4f682661b8069d374a9197bc491525a7c799
refs/heads/master: 9e031624d50c82a47671e09cc996eebb9e36f698
10 changes: 4 additions & 6 deletions trunk/sound/soc/davinci/davinci-evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@

#define EVM_CODEC_CLOCK 22579200

#define AUDIO_FORMAT (SND_SOC_DAIFMT_I2S | \
SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_NB_NF)
static int evm_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
Expand All @@ -37,16 +39,12 @@ static int evm_hw_params(struct snd_pcm_substream *substream,
int ret = 0;

/* set codec DAI configuration */
ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S |
SND_SOC_DAIFMT_CBM_CFM |
SND_SOC_DAIFMT_NB_NF);
ret = snd_soc_dai_set_fmt(codec_dai, AUDIO_FORMAT);
if (ret < 0)
return ret;

/* set cpu DAI configuration */
ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S |
SND_SOC_DAIFMT_CBM_CFM |
SND_SOC_DAIFMT_IB_NF);
ret = snd_soc_dai_set_fmt(cpu_dai, AUDIO_FORMAT);
if (ret < 0)
return ret;

Expand Down
8 changes: 4 additions & 4 deletions trunk/sound/soc/davinci/davinci-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ static int davinci_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai,
}

switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
case SND_SOC_DAIFMT_IB_NF:
case SND_SOC_DAIFMT_NB_NF:
/* CLKRP Receive clock polarity,
* 1 - sampled on rising edge of CLKR
* valid on rising edge
Expand All @@ -283,7 +283,7 @@ static int davinci_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai,
*/
pcr |= (DAVINCI_MCBSP_PCR_CLKXP | DAVINCI_MCBSP_PCR_CLKRP);
break;
case SND_SOC_DAIFMT_NB_IF:
case SND_SOC_DAIFMT_IB_IF:
/* CLKRP Receive clock polarity,
* 0 - sampled on falling edge of CLKR
* valid on falling edge
Expand All @@ -295,7 +295,7 @@ static int davinci_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai,
*/
pcr |= (DAVINCI_MCBSP_PCR_FSXP | DAVINCI_MCBSP_PCR_FSRP);
break;
case SND_SOC_DAIFMT_IB_IF:
case SND_SOC_DAIFMT_NB_IF:
/* CLKRP Receive clock polarity,
* 1 - sampled on rising edge of CLKR
* valid on rising edge
Expand All @@ -308,7 +308,7 @@ static int davinci_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai,
pcr |= (DAVINCI_MCBSP_PCR_CLKXP | DAVINCI_MCBSP_PCR_CLKRP |
DAVINCI_MCBSP_PCR_FSXP | DAVINCI_MCBSP_PCR_FSRP);
break;
case SND_SOC_DAIFMT_NB_NF:
case SND_SOC_DAIFMT_IB_NF:
/* CLKRP Receive clock polarity,
* 0 - sampled on falling edge of CLKR
* valid on falling edge
Expand Down

0 comments on commit a942ee1

Please sign in to comment.