From: eric@eukrea.com (Eric Bénard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/4] imx-ssi.c: add new choices to platform configuration
Date: Thu, 27 May 2010 10:58:54 +0200 [thread overview]
Message-ID: <1274950737-26498-1-git-send-email-eric@eukrea.com> (raw)
* introduce 3 new flags to allow a more detailed configuration
of the SSI link :
IMX_SSI_NET : enable Network Mode
IMX_SSI_SYN : enable Synchronous Mode
IMX_SSI_USE_I2S_SLAVE : enable I2S Slave Mode
* new platform can use these settings without breaking actual
platforms.
Signed-off-by: Eric B?nard <eric@eukrea.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
---
arch/arm/plat-mxc/include/mach/ssi.h | 3 +++
sound/soc/imx/imx-ssi.c | 11 +++++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/arch/arm/plat-mxc/include/mach/ssi.h b/arch/arm/plat-mxc/include/mach/ssi.h
index c34ded5..63f3c28 100644
--- a/arch/arm/plat-mxc/include/mach/ssi.h
+++ b/arch/arm/plat-mxc/include/mach/ssi.h
@@ -10,6 +10,9 @@ struct imx_ssi_platform_data {
unsigned int flags;
#define IMX_SSI_DMA (1 << 0)
#define IMX_SSI_USE_AC97 (1 << 1)
+#define IMX_SSI_NET (1 << 2)
+#define IMX_SSI_SYN (1 << 3)
+#define IMX_SSI_USE_I2S_SLAVE (1 << 4)
void (*ac97_reset) (struct snd_ac97 *ac97);
void (*ac97_warm_reset)(struct snd_ac97 *ac97);
};
diff --git a/sound/soc/imx/imx-ssi.c b/sound/soc/imx/imx-ssi.c
index 80b4fee..50f5162 100644
--- a/sound/soc/imx/imx-ssi.c
+++ b/sound/soc/imx/imx-ssi.c
@@ -83,8 +83,6 @@ static int imx_ssi_set_dai_tdm_slot(struct snd_soc_dai *cpu_dai,
/*
* SSI DAI format configuration.
* Should only be called when port is inactive (i.e. SSIEN = 0).
- * Note: We don't use the I2S modes but instead manually configure the
- * SSI for I2S because the I2S mode is only a register preset.
*/
static int imx_ssi_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
{
@@ -99,6 +97,10 @@ static int imx_ssi_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
/* data on rising edge of bclk, frame low 1clk before data */
strcr |= SSI_STCR_TFSI | SSI_STCR_TEFS | SSI_STCR_TXBIT0;
scr |= SSI_SCR_NET;
+ if (ssi->flags & IMX_SSI_USE_I2S_SLAVE) {
+ scr &= ~SSI_I2S_MODE_MASK;
+ scr |= SSI_SCR_I2S_MODE_SLAVE;
+ }
break;
case SND_SOC_DAIFMT_LEFT_J:
/* data on rising edge of bclk, frame high with data */
@@ -143,6 +145,11 @@ static int imx_ssi_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
strcr |= SSI_STCR_TFEN0;
+ if (ssi->flags & IMX_SSI_NET)
+ scr |= SSI_SCR_NET;
+ if (ssi->flags & IMX_SSI_SYN)
+ scr |= SSI_SCR_SYN;
+
writel(strcr, ssi->base + SSI_STCR);
writel(strcr, ssi->base + SSI_SRCR);
writel(scr, ssi->base + SSI_SCR);
--
1.6.3.3
next reply other threads:[~2010-05-27 8:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-27 8:58 Eric Bénard [this message]
2010-05-27 8:58 ` [PATCH v2 2/4] soc/imx: add eukrea-tlv320 Eric Bénard
2010-05-27 8:58 ` [PATCH v2 3/4] eukrea_mbimx27: add audio codec Eric Bénard
2010-05-27 8:58 ` [PATCH v2 4/4] mx27_defconfig: add audio support for eukrea_mbimx27 Eric Bénard
2010-05-27 13:51 ` [PATCH v2 3/4] eukrea_mbimx27: add audio codec Liam Girdwood
2010-05-28 6:58 ` Sascha Hauer
2010-05-28 9:17 ` Eric Bénard
2010-05-27 13:50 ` [PATCH v2 2/4] soc/imx: add eukrea-tlv320 Liam Girdwood
2010-05-27 14:04 ` Eric Bénard
2010-05-27 14:14 ` [alsa-devel] " Liam Girdwood
2010-05-27 13:49 ` [alsa-devel] [PATCH v2 1/4] imx-ssi.c: add new choices to platform configuration Liam Girdwood
2010-06-01 18:05 ` Mark Brown
2010-06-03 8:19 ` Sascha Hauer
2010-06-03 16:52 ` 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=1274950737-26498-1-git-send-email-eric@eukrea.com \
--to=eric@eukrea.com \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).