[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b1d8cfcf6cfa48fa83dc06016ae2ff70@BY2PR0301MB0613.namprd03.prod.outlook.com>
Date: Wed, 3 Sep 2014 08:39:53 +0000
From: "Li.Xiubo@...escale.com" <Li.Xiubo@...escale.com>
To: Jyri Sarha <jsarha@...com>,
"broonie@...nel.org" <broonie@...nel.org>,
"perex@...ex.cz" <perex@...ex.cz>,
"lgirdwood@...il.com" <lgirdwood@...il.com>,
"tiwai@...e.de" <tiwai@...e.de>,
"moinejf@...e.fr" <moinejf@...e.fr>,
"andrew@...n.ch" <andrew@...n.ch>,
"kuninori.morimoto.gx@...esas.com" <kuninori.morimoto.gx@...esas.com>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
"robh+dt@...nel.org" <robh+dt@...nel.org>,
"pawel.moll@....com" <pawel.moll@....com>,
"mark.rutland@....com" <mark.rutland@....com>,
"ijc+devicetree@...lion.org.uk" <ijc+devicetree@...lion.org.uk>,
"galak@...eaurora.org" <galak@...eaurora.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCHv2 1/4] ASoC: simple-card: add
asoc_simple_card_fmt_master() to simplify the code.
> Subject: Re: [PATCHv2 1/4] ASoC: simple-card: add asoc_simple_card_fmt_master()
> to simplify the code.
>
> On 09/03/2014 05:37 AM, Li.Xiubo@...escale.com wrote:
> >> Subject: Re: [PATCHv2 1/4] ASoC: simple-card: add
> asoc_simple_card_fmt_master()
> ...
> >>
> >> This won't work. The logic for cpu node needs to be negated for codec node.
> >>
> >
> > Yes, actually it should be.
> >
> > As my previous patches about this:
> > ----
> > Since from the DAI format micro SND_SOC_DAIFMT_CBx_CFx, the 'CBx'
> > mean Codec's bit clock is as master/slave and the 'CFx' mean Codec's
> > frame clock is as master/slave.
> >
> > So these same DAI formats should be informed to CPU and CODE DAIs at
> > the same time. For the Codec driver will set the bit clock and frame
> > clock as the DAI formats said, but for the CPU driver, if the the
> > bit clock or frame clock is as Codec master, so it should be set CPU
> > DAI device as bit clock or frame clock as slave, and vice versa.
> >
> > The old code will cause confusion, and we should be clear that the
> > letter 'C' here mean to Codec.
> > ----
> >
> > For the master format, no matter for CPU or CODEC, it always means Codec
> > is master or slave for bit/frame clock, not means the local DAI device's
> > bit/frame clock as master or slave.
> >
> > So your CPU DAI device driver should negate this locally as the existed
> > Ones do.
> >
>
>
> Yes, but there is double negation in this patch. The switch-case
> assignments depend on whether the bitclkmaster and framemaster
> DT-node pointers are compared to a cpu-dai-node or
> codec-dai-node. When your patch compares the codec-node, it does
> the decisions like it was a cpu-node, which produces inverted CBM
> and CFM setting.
>
> However, Kurinori-san's patch fixes this problem because it just
> uses the daifmt generated by comparing to codec node for both cpu
> and codec nodes.
>
> The reason why I did the comparison per node basis, was to make
> the code more ready for tdm setups with multiple codecs on a same
> wire. But writing code for something that is not really needed
> yet is usually a bad idea, like it was this time too.
>
> Kurinori-san's version of the fix should be fine and it cleans up
> the code quite nicely.
>
Yes, agree.
So I just removed this patch from my patch series list.
Kuninori-san will post his local patch about this later.
Thanks,
BRs
Xiubo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists