From: Nicolin Chen <Guangyu.Chen@freescale.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>
Cc: Mark Brown <broonie@kernel.org>,
moinejf@free.fr, alsa-devel@alsa-project.org,
kuninori.morimoto.gx@renesas.com, linux-kernel@vger.kernel.org,
lgirdwood@gmail.com, Li.Xiubo@freescale.com
Subject: Re: [alsa-devel] [PATCH] ASoC: simple-card: overwrite DAIFMT_MASTER of cpu_dai->fmt
Date: Wed, 12 Mar 2014 11:26:58 +0800 [thread overview]
Message-ID: <20140312032657.GF1177@MrMyself> (raw)
In-Reply-To: <874n34rsul.wl%kuninori.morimoto.gx@gmail.com>
Hi Morimoto-san,
On Tue, Mar 11, 2014 at 08:36:22PM -0700, Kuninori Morimoto wrote:
>
> Hi Mark
>
> > > > asoc-simple-card sound-cs42888.12: cpu : 2024000.esai / 4003 / 132000000
> > > > asoc-simple-card sound-cs42888.12: codec : cs42888 / 1003 / 24576000
> > > > asoc-simple-card sound-cs42888.12: cs42888 <-> 2024000.esai mapping ok
> >
> > > cpu = 4003 : SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_LEFT_J
> > > codec = 1003 : SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_LEFT_J
> >
> > > codec is master, cpu is slave...
> > > what is problem ??
> > > Am I misunderstanding ?
> >
> > The C in those constants stands for CODEC and the values should be
> > identical for both ends of the link.
>
> Wow ! really ??
> Then, is this settiting wrong ??
>
> ${LINUX}/arch/arm/mach-shmobile/board-armadillo800eva.c :: fsi_wm8978_info
>
> static struct asoc_simple_card_info fsi_wm8978_info = {
> ...
> .daifmt = SND_SOC_DAIFMT_I2S,
> .cpu_dai = {
> ...
> .fmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_NF,
> },
> .codec_dai = {
> ...
> .fmt = SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_NB_NF,
> },
> };
>
> It should be like this ?
>
> static struct asoc_simple_card_info fsi_wm8978_info = {
> ...
> .daifmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBM_CFM,
> .cpu_dai = {
> ...
> .fmt = SND_SOC_DAIFMT_IB_NF,
> },
> .codec_dai = {
> ...
> .fmt = SND_SOC_DAIFMT_NB_NF,
> },
> };
This would be better imo.
And ideally we should also keep the xB_xF identical like Mark said _identical_.
Just some cpu dai drivers might do an incorrect settings for it, like regarding
NB as sampling on rising edge and IF as active low (I'm saying this without a
careful check though), which results people need to re-set bitclock-invert and
frame-invert if they switch the DAI format from left_j to i2s for example.
Thank you,
Nicolin Chen
next prev parent reply other threads:[~2014-03-12 3:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-11 12:54 [PATCH] ASoC: simple-card: overwrite DAIFMT_MASTER of cpu_dai->fmt Nicolin Chen
2014-03-11 13:25 ` Mark Brown
2014-03-12 2:01 ` Nicolin Chen
2014-03-12 1:32 ` [alsa-devel] " Kuninori Morimoto
2014-03-12 1:49 ` Mark Brown
2014-03-12 3:36 ` Kuninori Morimoto
2014-03-12 3:26 ` Nicolin Chen [this message]
2014-03-12 4:01 ` Kuninori Morimoto
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=20140312032657.GF1177@MrMyself \
--to=guangyu.chen@freescale.com \
--cc=Li.Xiubo@freescale.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=kuninori.morimoto.gx@gmail.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=moinejf@free.fr \
/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).