ASoC: pxa-ssp.c fix clock/frame invert
Subsystems (3)
PATCH 1/1 ASoC: pxa-ssp.c fix clock/frame invert
Quoted 1 line
From the pxa27x developers manual, Table 8-8 SSPSP Bit Definitions:
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.
--- sound/soc/pxa/pxa-ssp.c | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-)
sound/soc/pxa/pxa-ssp.c +10 -1
@@ -568,7 +568,10 @@ static int pxa_ssp_set_dai_fmt(struct snd_soc_dai *cpu_dai,case SND_SOC_DAIFMT_NB_IF :break ;case SND_SOC_DAIFMT_IB_IF : - sspsp |=SSPSP_SCMODE (3 ); + sspsp |=SSPSP_SCMODE (2 ); +break ; +case SND_SOC_DAIFMT_IB_NF : + sspsp |=SSPSP_SCMODE (2 ) |SSPSP_SFRMP ;break ;default :return -EINVAL ;
@@ -585,7 +588,13 @@ static int pxa_ssp_set_dai_fmt(struct snd_soc_dai *cpu_dai,case SND_SOC_DAIFMT_NB_NF : sspsp |=SSPSP_SFRMP ;break ; +case SND_SOC_DAIFMT_NB_IF : +break ;case SND_SOC_DAIFMT_IB_IF : + sspsp |=SSPSP_SCMODE (2 ); +break ; +case SND_SOC_DAIFMT_IB_NF : + sspsp |=SSPSP_SCMODE (2 ) |SSPSP_SFRMP ;break ;default :return -EINVAL ;
Signature · 4 lines
tg: (577c9c4..) asoc/pxa-ssp-invert-clock.patch (depends on: master) total: 0 errors, 0 warnings, 24 lines checked asoc-pxa-ssp-invert-clock.patch has no obvious style problems and is ready for submission.
Quoted 2 lines · Daniel Ribeiro
This patch also adds all possible NF/IF, NB/IB combinations to the
DSP_AandDSP_Bmodes.
Thanks - it'll be tomorrow or possibly Monday before I get a chance to test this.
Mark Brown
AppliedQuoted 7 lines · Daniel Ribeiro
Quoted 1 line
From the pxa27x developers manual, Table 8-8 SSPSP Bit Definitions:
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)
Applied, thanks.