stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Songjun Wu <songjun.wu@atmel.com>,
	Bo Shen <voice.shen@atmel.com>, Mark Brown <broonie@kernel.org>
Subject: [PATCH 3.14 16/20] ASoC: atmel_ssc_dai: fix start event for I2S mode
Date: Mon,  9 Feb 2015 16:34:08 +0800	[thread overview]
Message-ID: <20150209083043.166738970@linuxfoundation.org> (raw)
In-Reply-To: <20150209083042.033412726@linuxfoundation.org>

3.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Bo Shen <voice.shen@atmel.com>

commit a43bd7e125143b875caae6d4f9938855b440faaf upstream.

According to the I2S specification information as following:
  - WS = 0, channel 1 (left)
  - WS = 1, channel 2 (right)
So, the start event should be TF/RF falling edge.

Reported-by: Songjun Wu <songjun.wu@atmel.com>
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/soc/atmel/atmel_ssc_dai.c |   18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)

--- a/sound/soc/atmel/atmel_ssc_dai.c
+++ b/sound/soc/atmel/atmel_ssc_dai.c
@@ -344,7 +344,6 @@ static int atmel_ssc_hw_params(struct sn
 	struct atmel_pcm_dma_params *dma_params;
 	int dir, channels, bits;
 	u32 tfmr, rfmr, tcmr, rcmr;
-	int start_event;
 	int ret;
 
 	/*
@@ -451,19 +450,10 @@ static int atmel_ssc_hw_params(struct sn
 		 * The SSC transmit clock is obtained from the BCLK signal on
 		 * on the TK line, and the SSC receive clock is
 		 * generated from the transmit clock.
-		 *
-		 *  For single channel data, one sample is transferred
-		 * on the falling edge of the LRC clock.
-		 * For two channel data, one sample is
-		 * transferred on both edges of the LRC clock.
 		 */
-		start_event = ((channels == 1)
-				? SSC_START_FALLING_RF
-				: SSC_START_EDGE_RF);
-
 		rcmr =	  SSC_BF(RCMR_PERIOD, 0)
 			| SSC_BF(RCMR_STTDLY, START_DELAY)
-			| SSC_BF(RCMR_START, start_event)
+			| SSC_BF(RCMR_START, SSC_START_FALLING_RF)
 			| SSC_BF(RCMR_CKI, SSC_CKI_RISING)
 			| SSC_BF(RCMR_CKO, SSC_CKO_NONE)
 			| SSC_BF(RCMR_CKS, SSC_CKS_CLOCK);
@@ -471,14 +461,14 @@ static int atmel_ssc_hw_params(struct sn
 		rfmr =	  SSC_BF(RFMR_FSEDGE, SSC_FSEDGE_POSITIVE)
 			| SSC_BF(RFMR_FSOS, SSC_FSOS_NONE)
 			| SSC_BF(RFMR_FSLEN, 0)
-			| SSC_BF(RFMR_DATNB, 0)
+			| SSC_BF(RFMR_DATNB, (channels - 1))
 			| SSC_BIT(RFMR_MSBF)
 			| SSC_BF(RFMR_LOOP, 0)
 			| SSC_BF(RFMR_DATLEN, (bits - 1));
 
 		tcmr =	  SSC_BF(TCMR_PERIOD, 0)
 			| SSC_BF(TCMR_STTDLY, START_DELAY)
-			| SSC_BF(TCMR_START, start_event)
+			| SSC_BF(TCMR_START, SSC_START_FALLING_RF)
 			| SSC_BF(TCMR_CKI, SSC_CKI_FALLING)
 			| SSC_BF(TCMR_CKO, SSC_CKO_NONE)
 			| SSC_BF(TCMR_CKS, SSC_CKS_PIN);
@@ -487,7 +477,7 @@ static int atmel_ssc_hw_params(struct sn
 			| SSC_BF(TFMR_FSDEN, 0)
 			| SSC_BF(TFMR_FSOS, SSC_FSOS_NONE)
 			| SSC_BF(TFMR_FSLEN, 0)
-			| SSC_BF(TFMR_DATNB, 0)
+			| SSC_BF(TFMR_DATNB, (channels - 1))
 			| SSC_BIT(TFMR_MSBF)
 			| SSC_BF(TFMR_DATDEF, 0)
 			| SSC_BF(TFMR_DATLEN, (bits - 1));



  parent reply	other threads:[~2015-02-09  8:34 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-09  8:33 [PATCH 3.14 00/20] 3.14.33-stable review Greg Kroah-Hartman
2015-02-09  8:33 ` [PATCH 3.14 01/20] gpio: sysfs: fix memory leak in gpiod_export_link Greg Kroah-Hartman
2015-02-09  8:33 ` [PATCH 3.14 02/20] gpio: sysfs: fix memory leak in gpiod_sysfs_set_active_low Greg Kroah-Hartman
2015-02-09  8:33 ` [PATCH 3.14 03/20] PCI: Add NEC variants to Stratus ftServer PCIe DMI check Greg Kroah-Hartman
2015-02-09  8:33 ` [PATCH 3.14 04/20] MIPS: IRQ: Fix disable_irq on CPU IRQs Greg Kroah-Hartman
2015-02-09  8:33 ` [PATCH 3.14 05/20] MIPS: OCTEON: fix kernel crash when offlining a CPU Greg Kroah-Hartman
2015-02-09  8:33 ` [PATCH 3.14 06/20] MIPS: Fix kernel lockup or crash after CPU offline/online Greg Kroah-Hartman
2015-02-09  8:33 ` [PATCH 3.14 07/20] ARM: 8299/1: mm: ensure local active ASID is marked as allocated on rollover Greg Kroah-Hartman
2015-02-09  8:34 ` [PATCH 3.14 08/20] Complete oplock break jobs before closing file handle Greg Kroah-Hartman
2015-02-09  8:34 ` [PATCH 3.14 09/20] mm: pagewalk: call pte_hole() for VM_PFNMAP during walk_page_range Greg Kroah-Hartman
2015-02-09  8:34 ` [PATCH 3.14 10/20] lib/checksum.c: fix carry in csum_tcpudp_nofold Greg Kroah-Hartman
2015-02-09  8:34 ` [PATCH 3.14 11/20] nilfs2: fix deadlock of segment constructor over I_SYNC flag Greg Kroah-Hartman
2015-02-09  8:34 ` [PATCH 3.14 13/20] arm64: Fix up /proc/cpuinfo Greg Kroah-Hartman
2015-02-09  8:34 ` [PATCH 3.14 14/20] ext4: prevent bugon on race between write/fcntl Greg Kroah-Hartman
2015-02-09  8:34 ` [PATCH 3.14 15/20] lib/checksum.c: fix build for generic csum_tcpudp_nofold Greg Kroah-Hartman
2015-02-09  8:34 ` Greg Kroah-Hartman [this message]
2015-02-09  8:34 ` [PATCH 3.14 17/20] ASoC: sgtl5000: add delay before first I2C access Greg Kroah-Hartman
2015-02-09  8:34 ` [PATCH 3.14 18/20] ALSA: ak411x: Fix stall in work callback Greg Kroah-Hartman
2015-02-09  8:34 ` [PATCH 3.14 19/20] smpboot: Add missing get_online_cpus() in smpboot_register_percpu_thread() Greg Kroah-Hartman
2015-02-09  8:34 ` [PATCH 3.14 20/20] x86,kvm,vmx: Preserve CR4 across VM entry Greg Kroah-Hartman
2015-02-09 16:39 ` [PATCH 3.14 00/20] 3.14.33-stable review Guenter Roeck
2015-02-09 18:23 ` Shuah Khan

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=20150209083043.166738970@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=songjun.wu@atmel.com \
    --cc=stable@vger.kernel.org \
    --cc=voice.shen@atmel.com \
    /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).