From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] imx-ssi.c: fix I2S slave setup
Date: Thu, 27 May 2010 10:24:17 +0200 [thread overview]
Message-ID: <20100527082417.GB23664@pengutronix.de> (raw)
In-Reply-To: <1274891873-3704-1-git-send-email-eric@eukrea.com>
On Wed, May 26, 2010 at 06:37:53PM +0200, Eric B?nard wrote:
> * without this fix, the waveform on the SSI port are not real
> I2S signal (at least on i.MX27's SSI4)
>
> * original Freescale's driver has
> if (((fmt & SND_SOC_DAIFMT_FORMAT_MASK) == SND_SOC_DAIFMT_I2S)
> && ssi_mode->network_mode) {
> scr &= ~SSI_SCR_I2S_MODE_MASK;
> scr |= SSI_SCR_I2S_MODE_SLAVE;
> }
> So as now the SSI is set in network mode as a default when running in
> I2S format, it seems reasonable to also set I2S_MODE_SLAVE
>
> Signed-off-by: Eric B?nard <eric@eukrea.com>
> ---
> sound/soc/imx/imx-ssi.c | 4 +---
> 1 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/sound/soc/imx/imx-ssi.c b/sound/soc/imx/imx-ssi.c
> index 80b4fee..c5e1626 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)
> {
> @@ -98,7 +96,7 @@ static int imx_ssi_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
> case SND_SOC_DAIFMT_I2S:
> /* 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;
> + scr |= SSI_SCR_NET | SSI_SCR_I2S_MODE_SLAVE;
You should also zero out the SSI_I2S_MODE_MASK in the scr = readl()...
above.
Otherwise I'm ok with this patch.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
prev parent reply other threads:[~2010-05-27 8:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-26 16:37 [PATCH] imx-ssi.c: fix I2S slave setup Eric Bénard
2010-05-27 0:57 ` [alsa-devel] " Mark Brown
2010-05-27 1:44 ` Eric Bénard
2010-05-27 2:04 ` Mark Brown
2010-05-27 8:24 ` Sascha Hauer [this message]
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=20100527082417.GB23664@pengutronix.de \
--to=s.hauer@pengutronix.de \
--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).