diff options
author | Daniel Ribeiro <drwyrm@gmail.com> | 2009-04-08 09:51:24 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-04-13 08:23:03 -0400 |
commit | a820532002e70e3a06f1ea7133e9b02443d07382 (patch) | |
tree | ebbbf3422c03e0608b2b56cdb76f06c84be25f80 | |
parent | 6bbcb459cd50807511491ddf96bca1ef92006bf8 (diff) |
ASoC: pxa-ssp.c fix clock/frame invert
SCMODE(0): Data Driven (Falling), Data Sampled (Rising), Idle State (Low)
SCMODE(1): Data Driven (Rising), Data Sampled (Falling), Idle State (Low)
SCMODE(2): Data Driven (Rising), Data Sampled (Falling), Idle State (High)
SCMODE(3): Data Driven (Falling), Data Sampled (Rising), Idle State (High)
SCMODE(3) does not invert the clock polarity compared to the default SCMODE(0).
This patch also adds all possible NF/IF, NB/IB combinations to the DSP_A and
DSP_B modes.
Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | sound/soc/pxa/pxa-ssp.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c index c7c1996a5447..176af7ff234b 100644 --- a/sound/soc/pxa/pxa-ssp.c +++ b/sound/soc/pxa/pxa-ssp.c | |||
@@ -568,7 +568,10 @@ static int pxa_ssp_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
568 | case SND_SOC_DAIFMT_NB_IF: | 568 | case SND_SOC_DAIFMT_NB_IF: |
569 | break; | 569 | break; |
570 | case SND_SOC_DAIFMT_IB_IF: | 570 | case SND_SOC_DAIFMT_IB_IF: |
571 | sspsp |= SSPSP_SCMODE(3); | 571 | sspsp |= SSPSP_SCMODE(2); |
572 | break; | ||
573 | case SND_SOC_DAIFMT_IB_NF: | ||
574 | sspsp |= SSPSP_SCMODE(2) | SSPSP_SFRMP; | ||
572 | break; | 575 | break; |
573 | default: | 576 | default: |
574 | return -EINVAL; | 577 | return -EINVAL; |
@@ -585,7 +588,13 @@ static int pxa_ssp_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
585 | case SND_SOC_DAIFMT_NB_NF: | 588 | case SND_SOC_DAIFMT_NB_NF: |
586 | sspsp |= SSPSP_SFRMP; | 589 | sspsp |= SSPSP_SFRMP; |
587 | break; | 590 | break; |
591 | case SND_SOC_DAIFMT_NB_IF: | ||
592 | break; | ||
588 | case SND_SOC_DAIFMT_IB_IF: | 593 | case SND_SOC_DAIFMT_IB_IF: |
594 | sspsp |= SSPSP_SCMODE(2); | ||
595 | break; | ||
596 | case SND_SOC_DAIFMT_IB_NF: | ||
597 | sspsp |= SSPSP_SCMODE(2) | SSPSP_SFRMP; | ||
589 | break; | 598 | break; |
590 | default: | 599 | default: |
591 | return -EINVAL; | 600 | return -EINVAL; |