From: Lars-Peter Clausen <lars@metafoo.de>
To: Anatol Pomozov <anatol.pomozov@gmail.com>,
Mark Brown <broonie@kernel.org>
Cc: 陳立峰 <albertchen@realtek.com>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"Ben Zhang" <benzh@google.com>, "Dylan Reid" <dgreid@google.com>,
lengo@google.com
Subject: Re: What is exact definition of "normal/inverted" FSYNC signal polarity?
Date: Mon, 31 Aug 2015 21:17:51 +0200 [thread overview]
Message-ID: <55E4A85F.7010208@metafoo.de> (raw)
In-Reply-To: <CAOMFOmVfE2qiXN=h7i1pJ38JJL3J94UgrN_q+ratYTu=nr372w@mail.gmail.com>
On 08/31/2015 09:05 PM, Anatol Pomozov wrote:
> Hi
>
> Thanks.
>
> On Mon, Aug 31, 2015 at 11:02 AM, Mark Brown <broonie@kernel.org> wrote:
>> The simplest thing to do is look at the datasheets for Wolfson parts
>> like the wm8731, they have some very clear diagrams of all the data
>> modes we support.
>
> I looked at http://www.rockbox.org/wiki/pub/Main/DataSheets/WM8731_8731L.pdf
> spec and it is what I see
>
> "normal" bitclock means data sensing happens at rising edge of BCLK.
> It is the same as TegraX1 and rt5677 examples above.
>
> As of FSYNC - the wm8731 driver uses Reg0x7[4] to set FSYNC polarity.
> If FSYNC is inverted then bit set to 1. According to the spec:
>
> DACLRC phase control (in left, right or I2S modes)
> 1 = Right Channel DAC data when DACLRC high
> 0 = Right Channel DAC data when DACLRC low
> (opposite phasing in I2S mode)
> or
> DSP mode A/B select (in DSP mode only)
> 1 = MSB is available on 2nd BCLK rising edge after DACLRC rising edge
> 0 = MSB is available on 1st BCLK rising edge after DACLRC rising edge
>
>
> Thus "normal" FSYNC for this driver means that the frame (L channel)
> starts at rising edge of FSYNC (wm8731 datasheet calls it DACLRC).
> "inverted" means frame starts at the falling edge. It differs both
> from TegraX1 and rt5677 above.
>
> For TDM mode A the chip seems always expect to see "normal" polarity
> FSYNC (frame starts at rising edge of FSYNC).
>
>
>
>
> It looks like each driver uses its own definition of FSYNC polarity.
> To avoid compatibility problems between different codecs/socs there
> should be a clean definition of what is FSYNC polarity is. I would
> propose something simple like:
> **** "normal" FSYNC means frame starts at rising edge of FSYNC,
> and "inverted" frame starts at falling FSYNC edge ****
> i.e. the same as for 8731.
The modes supported by the wm8731 is DSP A (framesync precedes first data by
1 bit clock cycle) and DSP B(framesync happens during the first bit clock
cycle).
But otherwise agreed rising edge = normal framesync, falling edge = inverted
framesync
next prev parent reply other threads:[~2015-08-31 19:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-31 16:40 What is exact definition of "normal/inverted" FSYNC signal polarity? Anatol Pomozov
2015-08-31 18:02 ` Mark Brown
2015-08-31 19:05 ` Anatol Pomozov
2015-08-31 19:17 ` Lars-Peter Clausen [this message]
2015-09-01 12:14 ` Mark Brown
2015-09-12 5:48 ` Anatol Pomozov
2015-09-12 10:18 ` 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=55E4A85F.7010208@metafoo.de \
--to=lars@metafoo.de \
--cc=albertchen@realtek.com \
--cc=alsa-devel@alsa-project.org \
--cc=anatol.pomozov@gmail.com \
--cc=benzh@google.com \
--cc=broonie@kernel.org \
--cc=dgreid@google.com \
--cc=lengo@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.