Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 132930
b: refs/heads/master
c: 0ce36c5
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Mar 14, 2009
1 parent a9cdb4d commit f88af11
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 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: 72d7466468b471f99cefae3c5f4a414bbbaa0bdd
refs/heads/master: 0ce36c5f7f87632f26c8fbefe68b5116eda152d2
19 changes: 14 additions & 5 deletions trunk/sound/soc/pxa/pxa-ssp.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define DEBUG
/*
* pxa-ssp.c -- ALSA Soc Audio Layer
*
Expand Down Expand Up @@ -561,14 +560,15 @@ static int pxa_ssp_set_dai_fmt(struct snd_soc_dai *cpu_dai,
sscr0 |= SSCR0_PSP;
sscr1 |= SSCR1_RWOT | SSCR1_TRAIL;

/* See hw_params() */
switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
case SND_SOC_DAIFMT_NB_NF:
sspsp |= SSPSP_SFRMP;
break;
case SND_SOC_DAIFMT_NB_IF:
sspsp |= SSPSP_SFRMP;
break;
case SND_SOC_DAIFMT_IB_IF:
sspsp |= SSPSP_SFRMP | SSPSP_SCMODE(3);
sspsp |= SSPSP_SCMODE(3);
break;
default:
return -EINVAL;
Expand Down Expand Up @@ -691,8 +691,17 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream,
#else
return -EINVAL;
#endif
} else
sspsp |= SSPSP_SFRMWDTH(width);
} else {
/* The frame width is the width the LRCLK is
* asserted for; the delay is expressed in
* half cycle units. We need the extra cycle
* because the data starts clocking out one BCLK
* after LRCLK changes polarity.
*/
sspsp |= SSPSP_SFRMWDTH(width + 1);
sspsp |= SSPSP_SFRMDLY((width + 1) * 2);
sspsp |= SSPSP_DMYSTRT(1);
}

ssp_write_reg(ssp, SSPSP, sspsp);
break;
Expand Down

0 comments on commit f88af11

Please sign in to comment.