linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mpa@pengutronix.de (Markus Pargmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 10/17] ASoC: fsl-ssi: Transmit enable synchronization
Date: Mon, 28 Apr 2014 12:54:51 +0200	[thread overview]
Message-ID: <1398682498-24357-11-git-send-email-mpa@pengutronix.de> (raw)
In-Reply-To: <1398682498-24357-1-git-send-email-mpa@pengutronix.de>

When the fsl-ssi unit is used in i2s slave mode, it is possible that the
SSI unit starts transmitting data on the wrong channel. This happens
because the SSI does not synchronize with the left-right-clock by
default.

This patch enables transmit enable synchronization.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
 sound/soc/fsl/fsl_ssi.c | 1 +
 sound/soc/fsl/fsl_ssi.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 3821dac..8fc0a504 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -576,6 +576,7 @@ static int _fsl_ssi_set_dai_fmt(struct fsl_ssi_private *ssi_private,
 	fsl_ssi_setup_reg_vals(ssi_private);
 
 	scr = read_ssi(&ssi->scr) & ~(CCSR_SSI_SCR_SYN | CCSR_SSI_SCR_I2S_MODE_MASK);
+	scr |= CCSR_SSI_SCR_SYNC_TX_FS;
 
 	mask = CCSR_SSI_STCR_TXBIT0 | CCSR_SSI_STCR_TFDIR | CCSR_SSI_STCR_TXDIR |
 		CCSR_SSI_STCR_TSCKP | CCSR_SSI_STCR_TFSI | CCSR_SSI_STCR_TFSL |
diff --git a/sound/soc/fsl/fsl_ssi.h b/sound/soc/fsl/fsl_ssi.h
index 2e95dd7..71c3e7e 100644
--- a/sound/soc/fsl/fsl_ssi.h
+++ b/sound/soc/fsl/fsl_ssi.h
@@ -39,6 +39,7 @@ struct ccsr_ssi {
 	__be32 saccdis; /* 0x.0058 - SSI AC97 Channel Disable Register */
 };
 
+#define CCSR_SSI_SCR_SYNC_TX_FS		0x00001000
 #define CCSR_SSI_SCR_RFR_CLK_DIS	0x00000800
 #define CCSR_SSI_SCR_TFR_CLK_DIS	0x00000400
 #define CCSR_SSI_SCR_TCH_EN		0x00000100
-- 
1.9.1

  parent reply	other threads:[~2014-04-28 10:54 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-28 10:54 [PATCH v4 00/17] ASoC: fsl-ssi: Driver cleanup Markus Pargmann
2014-04-28 10:54 ` [PATCH v4 01/17] ASoC: fsl-ssi: Fix register values when disabling Markus Pargmann
2014-04-28 10:54 ` [PATCH v4 02/17] ASoC: fsl-ssi: Move debugging to seperate file Markus Pargmann
2014-04-28 10:54 ` [PATCH v4 03/17] ASoC: fsl-ssi: Use dev_name for DAI driver struct Markus Pargmann
2014-04-28 10:54 ` [PATCH v4 04/17] ASoC: fsl-ssi: Move imx-specific probe to seperate function Markus Pargmann
2014-04-28 10:54 ` [PATCH v4 05/17] ASoC: fsl-ssi: Remove useless DMA code Markus Pargmann
2014-04-28 10:54 ` [PATCH v4 06/17] ASoC: fsl-ssi: Cleanup probe function Markus Pargmann
2014-04-28 10:54 ` [PATCH v4 07/17] ASoC: fsl-ssi: Remove unnecessary variables from ssi_private Markus Pargmann
2014-04-28 10:54 ` [PATCH v4 08/17] ASoC: fsl-ssi: introduce SoC specific data Markus Pargmann
2014-05-20 22:02   ` Mark Brown
2014-05-27  6:21     ` Markus Pargmann
2014-04-28 10:54 ` [PATCH v4 09/17] ASoC: fsl-ssi: make fsl,mode property optional Markus Pargmann
2014-04-28 10:54 ` Markus Pargmann [this message]
2014-05-20 22:04   ` [PATCH v4 10/17] ASoC: fsl-ssi: Transmit enable synchronization Mark Brown
2014-04-28 10:54 ` [PATCH v4 11/17] ASoC: fsl-ssi: Move fsl_ssi_set_dai_sysclk above fsl_ssi_hw_params Markus Pargmann
2014-05-20 22:05   ` Mark Brown
2014-04-28 10:54 ` [PATCH v4 12/17] ASoC: fsl-ssi: set bitclock in master mode from hw_params Markus Pargmann
2014-05-20 22:08   ` Mark Brown
2014-05-27  7:05     ` Markus Pargmann
2014-04-28 10:54 ` [PATCH v4 13/17] ASoC: fsl-ssi: remove unnecessary spinlock Markus Pargmann
2014-04-28 10:54 ` [PATCH v4 14/17] ASoC: fsl-ssi: Set framerate divider correctly for i2s master mode Markus Pargmann
2014-04-28 10:54 ` [PATCH v4 15/17] ASoC: fsl-ssi: Fix baudclock handling Markus Pargmann
2014-04-28 10:54 ` [PATCH v4 16/17] ASoC: fsl-ssi: reorder and document fsl_ssi_private Markus Pargmann
2014-04-28 10:54 ` [PATCH v4 17/17] ASoC: fsl-ssi: Use regmap Markus Pargmann
2014-04-28 21:43 ` [PATCH v4 00/17] ASoC: fsl-ssi: Driver cleanup Michael Grzeschik
2014-05-20 22:10 ` 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=1398682498-24357-11-git-send-email-mpa@pengutronix.de \
    --to=mpa@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).