From: Daniel Ribeiro <drwyrm@gmail.com>
To: alsa-devel <alsa-devel@alsa-project.org>
Cc: openezx-devel <openezx-devel@lists.openezx.org>,
Eric Miao <eric.y.miao@gmail.com>,
Mark Brown <broonie@sirena.org.uk>,
linux-arm-kernel <linux-arm-kernel@lists.arm.linux.org.uk>
Subject: [PATCH] ASoC: pxa-ssp.c fix clock/frame invert
Date: Wed, 08 Apr 2009 10:51:24 -0300 [thread overview]
Message-ID: <1239198684.20192.8.camel@brutus> (raw)
>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.
Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
---
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 308a657..6768e4e 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,
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;
--
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.
next reply other threads:[~2009-04-08 13:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-08 13:51 Daniel Ribeiro [this message]
2009-04-08 18:13 ` [PATCH] ASoC: pxa-ssp.c fix clock/frame invert Mark Brown
2009-04-13 12:22 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1239198684.20192.8.camel@brutus \
--to=drwyrm@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@sirena.org.uk \
--cc=eric.y.miao@gmail.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=openezx-devel@lists.openezx.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox