Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Xuebing Wang <xbing6@gmail.com>
To: Nicolin Chen <nicoleotsuka@gmail.com>, alsa-devel@alsa-project.org
Cc: niranjan Patil <Niranjan.Patil@infocus.com>,
	fabio Estevam <festevam@gmail.com>,
	richard Jiang <Richard.Jiang@infocus.com>
Subject: Freescale iMX6SL SSI (I2S master mode) Rising edge vs Falling edge
Date: Thu, 28 May 2015 15:02:31 +0800	[thread overview]
Message-ID: <5566BD87.6040505@gmail.com> (raw)

Nicolin and alsa-devel community:

Source code in fsl_ssi.c shows below in function fsl_ssi_set_dai_fmt():
-----------
     switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
     case SND_SOC_DAIFMT_I2S:
... ...
         /* Data on rising edge of bclk, frame low, 1clk before data */
         strcr |= CCSR_SSI_STCR_TFSI | CCSR_SSI_STCR_TSCKP
             | CCSR_SSI_STCR_TXBIT0 | CCSR_SSI_STCR_TEFS;
         break;
-----------

According to iMX6SL reference manual, 'TSCKP = 1' means "Data clocked 
out on *falling* edge of bit clock." (for I2S master mode), rather than 
"Data on rising edge of bclk in the comments". This means this comment 
in the source code is *partially* WRONG, am I correct?

However, RSCKP is = 1 (for receiving), it means "Data latched on rising 
edge of bit clock", which is correct.

Also, I am not sure why there is inconsistency in iMX6SL reference 
manual (48.9 SSI Memory Map/Register Definition), that TSCKP = 1 (for 
transmitting) is FALLING_EDGE, but RSCKP = 1 (for receiving) is RISING_EDGE.

Note: SSI (I2S master mode) works perfect on my hardware, I did not 
observe anything wrong.

Thanks.

-- 
Xuebing

             reply	other threads:[~2015-05-28  7:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-28  7:02 Xuebing Wang [this message]
2015-05-28  7:09 ` Freescale iMX6SL SSI (I2S master mode) Rising edge vs Falling edge Nicolin Chen
2015-05-28  7:15   ` Xuebing Wang

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=5566BD87.6040505@gmail.com \
    --to=xbing6@gmail.com \
    --cc=Niranjan.Patil@infocus.com \
    --cc=Richard.Jiang@infocus.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=festevam@gmail.com \
    --cc=nicoleotsuka@gmail.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