Hi Liam,<br><br><div class="gmail_quote">2010/6/23 Liam Girdwood <span dir="ltr">&lt;<a href="mailto:lrg@slimlogic.co.uk">lrg@slimlogic.co.uk</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On Wed, 2010-06-23 at 16:33 +0200, Raffaele Recalcati wrote:<br>
&gt; From: Raffaele Recalcati &lt;<a href="mailto:raffaele.recalcati@bticino.it">raffaele.recalcati@bticino.it</a>&gt;<br>
&gt;<br>
&gt;       Added audio playback support with [frame sync master - clock master] mode<br>
&gt;       and with [frame sync master - clock slave].<br>
&gt;       Clock slave can be important when the external codec need system clock<br>
&gt;       and bit clock synchronized.<br>
&gt;       In the clock master case there is a FIXME message in the source code, because we<br>
&gt;       (Davide and myself) have guessed a frequency of 122000000 that seems the base<br>
&gt;       to be divided.<br>
&gt;       This patch has been developed against the<br>
&gt;               <a href="http://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci.git" target="_blank">http://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci.git</a><br>
&gt;       git tree and has been tested on bmx board (similar to dm365 evm, but using<br>
&gt;       uda1345 as external audio codec).<br>
&gt;<br>
&gt; Signed-off-by: Raffaele Recalcati &lt;<a href="mailto:raffaele.recalcati@bticino.it">raffaele.recalcati@bticino.it</a>&gt;<br>
&gt; Signed-off-by: Davide Bonfanti &lt;<a href="mailto:davide.bonfanti@bticino.it">davide.bonfanti@bticino.it</a>&gt;<br>
<br>
</div>Had a quick check, it looks like you have made some unintended<br>
formatting changes that make the patch look more complex than necessary.<br></blockquote><div><br>I was making correction for keeping aligned my lines like these...<br>+                       srgr = DAVINCI_MCBSP_SRGR_FSGM |<br>
+                              DAVINCI_MCBSP_SRGR_CLKSM;<br><br>and so I changed some existing ones...<br>but looking at CodingStyle and Greg notes, seems that, when breaking lines, we need to keep alignment.<br>So maybe, if I&#39;m right, in the future, we&#39;ll need to re-align all the file with another patch..<br>
I&#39;ll change anyway the code back to be simpler to be understood.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5"><br>
&gt; ---<br>
&gt;  arch/arm/mach-davinci/include/mach/asp.h |    7 ++<br>
&gt;  sound/soc/davinci/davinci-i2s.c          |  141 ++++++++++++++++++++++++++----<br>
&gt;  2 files changed, 129 insertions(+), 19 deletions(-)<br>
&gt;<br>
&gt; diff --git a/arch/arm/mach-davinci/include/mach/asp.h b/arch/arm/mach-davinci/include/mach/asp.h<br>
&gt; index 834725f..b1faeb9 100644<br>
&gt; --- a/arch/arm/mach-davinci/include/mach/asp.h<br>
&gt; +++ b/arch/arm/mach-davinci/include/mach/asp.h<br>
&gt; @@ -63,6 +63,13 @@ struct snd_platform_data {<br>
&gt;       unsigned sram_size_playback;<br>
&gt;       unsigned sram_size_capture;<br>
&gt;<br>
&gt; +     /*<br>
&gt; +      * This define works when both clock and FS are output for the cpu<br>
&gt; +      * and makes clock very fast (FS is not simmetrical, but sampling<br>
&gt; +      * frequency is better approximated<br>
&gt; +      */<br>
&gt; +     int i2s_fast_clock;<br>
&gt; +<br>
&gt;       /* McASP specific fields */<br>
&gt;       int tdm_slots;<br>
&gt;       u8 op_mode;<br>
&gt; diff --git a/sound/soc/davinci/davinci-i2s.c b/sound/soc/davinci/davinci-i2s.c<br>
&gt; index adadcd3..8811d25 100644<br>
&gt; --- a/sound/soc/davinci/davinci-i2s.c<br>
&gt; +++ b/sound/soc/davinci/davinci-i2s.c<br>
&gt; @@ -68,16 +68,23 @@<br>
&gt;  #define DAVINCI_MCBSP_RCR_RDATDLY(v) ((v) &lt;&lt; 16)<br>
&gt;  #define DAVINCI_MCBSP_RCR_RFIG               (1 &lt;&lt; 18)<br>
&gt;  #define DAVINCI_MCBSP_RCR_RWDLEN2(v) ((v) &lt;&lt; 21)<br>
&gt; +#define DAVINCI_MCBSP_RCR_RFRLEN2(v) ((v) &lt;&lt; 24)<br>
&gt; +#define DAVINCI_MCBSP_RCR_RPHASE             (1 &lt;&lt; 31)<br>
&gt;<br>
&gt;  #define DAVINCI_MCBSP_XCR_XWDLEN1(v) ((v) &lt;&lt; 5)<br>
&gt;  #define DAVINCI_MCBSP_XCR_XFRLEN1(v) ((v) &lt;&lt; 8)<br>
&gt;  #define DAVINCI_MCBSP_XCR_XDATDLY(v) ((v) &lt;&lt; 16)<br>
&gt;  #define DAVINCI_MCBSP_XCR_XFIG               (1 &lt;&lt; 18)<br>
&gt;  #define DAVINCI_MCBSP_XCR_XWDLEN2(v) ((v) &lt;&lt; 21)<br>
&gt; +#define DAVINCI_MCBSP_XCR_XFRLEN2(v) ((v) &lt;&lt; 24)<br>
&gt; +#define DAVINCI_MCBSP_XCR_XPHASE     (1 &lt;&lt; 31)<br>
&gt;<br>
&gt; +<br>
&gt; +#define CLKGDV(v)                            (v)     /* Bits 0:7 */<br>
<br>
</div></div>Should you not have a DAVINCI prefix here too ?<br></blockquote><div><br>Sorry, CLKGDV was not more used.<br>So I&#39;m deleting it in the new patch coming today.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div class="im"><br>
&gt;  #define DAVINCI_MCBSP_SRGR_FWID(v)   ((v) &lt;&lt; 8)<br>
&gt;  #define DAVINCI_MCBSP_SRGR_FPER(v)   ((v) &lt;&lt; 16)<br>
&gt;  #define DAVINCI_MCBSP_SRGR_FSGM              (1 &lt;&lt; 28)<br>
&gt; +#define DAVINCI_MCBSP_SRGR_CLKSM     (1 &lt;&lt; 29)<br>
&gt;<br>
&gt;  #define DAVINCI_MCBSP_PCR_CLKRP              (1 &lt;&lt; 0)<br>
&gt;  #define DAVINCI_MCBSP_PCR_CLKXP              (1 &lt;&lt; 1)<br>
&gt; @@ -144,8 +151,17 @@ struct davinci_mcbsp_dev {<br>
&gt;        * won&#39;t end up being swapped because of the underrun.<br>
&gt;        */<br>
&gt;       unsigned enable_channel_combine:1;<br>
&gt; +<br>
&gt; +     int i2s_fast_clock;<br>
&gt; +};<br>
&gt; +<br>
&gt; +struct davinci_mcbsp_data {<br>
&gt; +     unsigned int    fmt;<br>
&gt; +     int             clk_div;<br>
&gt;  };<br>
&gt;<br>
&gt; +static struct davinci_mcbsp_data mcbsp_data;<br>
&gt; +<br>
<br>
</div>This struct should be part of the dai private data.<br></blockquote><div><br>done.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div><div></div><div class="h5"><br>
&gt;  static inline void davinci_mcbsp_write_reg(struct davinci_mcbsp_dev *dev,<br>
&gt;                                          int reg, u32 val)<br>
&gt;  {<br>
&gt; @@ -255,24 +271,27 @@ static int davinci_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai,<br>
&gt;       unsigned int pcr;<br>
&gt;       unsigned int srgr;<br>
&gt;       srgr = DAVINCI_MCBSP_SRGR_FSGM |<br>
&gt; -             DAVINCI_MCBSP_SRGR_FPER(DEFAULT_BITPERSAMPLE * 2 - 1) |<br>
&gt; -             DAVINCI_MCBSP_SRGR_FWID(DEFAULT_BITPERSAMPLE - 1);<br>
&gt; +            DAVINCI_MCBSP_SRGR_FPER(DEFAULT_BITPERSAMPLE * 2 - 1) |<br>
&gt; +            DAVINCI_MCBSP_SRGR_FWID(DEFAULT_BITPERSAMPLE - 1);<br>
&gt; +     /* Attention srgr is updated by hw_params! */<br>
&gt;<br>
&gt; +     mcbsp_data.fmt = fmt;<br>
&gt;       /* set master/slave audio interface */<br>
&gt;       switch (fmt &amp; SND_SOC_DAIFMT_MASTER_MASK) {<br>
&gt; +     case SND_SOC_DAIFMT_CBS_CFM:<br>
&gt;       case SND_SOC_DAIFMT_CBS_CFS:<br>
&gt;               /* cpu is master */<br>
&gt;               pcr = DAVINCI_MCBSP_PCR_FSXM |<br>
&gt; -                     DAVINCI_MCBSP_PCR_FSRM |<br>
&gt; -                     DAVINCI_MCBSP_PCR_CLKXM |<br>
&gt; -                     DAVINCI_MCBSP_PCR_CLKRM;<br>
&gt; +                   DAVINCI_MCBSP_PCR_FSRM |<br>
&gt; +                   DAVINCI_MCBSP_PCR_CLKXM |<br>
&gt; +                   DAVINCI_MCBSP_PCR_CLKRM;<br>
&gt;               break;<br>
&gt;       case SND_SOC_DAIFMT_CBM_CFS:<br>
&gt;               /* McBSP CLKR pin is the input for the Sample Rate Generator.<br>
&gt;                * McBSP FSR and FSX are driven by the Sample Rate Generator. */<br>
&gt;               pcr = DAVINCI_MCBSP_PCR_SCLKME |<br>
&gt; -                     DAVINCI_MCBSP_PCR_FSXM |<br>
&gt; -                     DAVINCI_MCBSP_PCR_FSRM;<br>
&gt; +                   DAVINCI_MCBSP_PCR_FSXM |<br>
&gt; +                   DAVINCI_MCBSP_PCR_FSRM;<br>
<br>
</div></div>These two just look like unintended formatting changes.<br></blockquote><div><br>in next patch I&#39;ll remove these changes.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div><div></div><div class="h5"><br>
&gt;               break;<br>
&gt;       case SND_SOC_DAIFMT_CBM_CFM:<br>
&gt;               /* codec is master */<br>
&gt; @@ -372,6 +391,17 @@ static int davinci_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai,<br>
&gt;       return 0;<br>
&gt;  }<br>
&gt;<br>
&gt; +static int davinci_i2s_dai_set_clkdiv(struct snd_soc_dai *cpu_dai,<br>
&gt; +                             int div_id, int div)<br>
&gt; +{<br>
&gt; +     struct davinci_mcbsp_dev *dev = cpu_dai-&gt;private_data;<br>
&gt; +     int srgr;<br>
&gt; +<br>
&gt; +     mcbsp_data.clk_div = div;<br>
&gt; +     return 0;<br>
&gt; +}<br>
&gt; +<br>
&gt; +<br>
&gt;  static int davinci_i2s_hw_params(struct snd_pcm_substream *substream,<br>
&gt;                                struct snd_pcm_hw_params *params,<br>
&gt;                                struct snd_soc_dai *dai)<br>
&gt; @@ -380,11 +410,12 @@ static int davinci_i2s_hw_params(struct snd_pcm_substream *substream,<br>
&gt;       struct davinci_pcm_dma_params *dma_params =<br>
&gt;                                       &amp;dev-&gt;dma_params[substream-&gt;stream];<br>
&gt;       struct snd_interval *i = NULL;<br>
&gt; -     int mcbsp_word_length;<br>
&gt; -     unsigned int rcr, xcr, srgr;<br>
&gt; +     int mcbsp_word_length, master;<br>
&gt; +     unsigned int rcr, xcr, srgr, clk_div, freq, framesize;<br>
&gt;       u32 spcr;<br>
&gt;       snd_pcm_format_t fmt;<br>
&gt;       unsigned element_cnt = 1;<br>
&gt; +     struct clk *clk;<br>
&gt;<br>
&gt;       /* general line settings */<br>
&gt;       spcr = davinci_mcbsp_read_reg(dev, DAVINCI_MCBSP_SPCR_REG);<br>
&gt; @@ -396,12 +427,60 @@ static int davinci_i2s_hw_params(struct snd_pcm_substream *substream,<br>
&gt;               davinci_mcbsp_write_reg(dev, DAVINCI_MCBSP_SPCR_REG, spcr);<br>
&gt;       }<br>
&gt;<br>
&gt; -     i = hw_param_interval(params, SNDRV_PCM_HW_PARAM_SAMPLE_BITS);<br>
&gt; -     srgr = DAVINCI_MCBSP_SRGR_FSGM;<br>
&gt; -     srgr |= DAVINCI_MCBSP_SRGR_FWID(snd_interval_value(i) - 1);<br>
&gt; +     master = mcbsp_data.fmt &amp; SND_SOC_DAIFMT_MASTER_MASK;<br>
&gt; +     fmt = params_format(params);<br>
&gt; +     mcbsp_word_length = asp_word_length[fmt];<br>
&gt;<br>
&gt; -     i = hw_param_interval(params, SNDRV_PCM_HW_PARAM_FRAME_BITS);<br>
&gt; -     srgr |= DAVINCI_MCBSP_SRGR_FPER(snd_interval_value(i) - 1);<br>
&gt; +     if (master == SND_SOC_DAIFMT_CBS_CFS) {<br>
&gt; +             clk = clk_get(NULL, &quot;pll1_sysclk6&quot;);<br>
&gt; +             if (clk)<br>
&gt; +                     freq = clk_get_rate(clk);<br>
&gt; +             freq = 122000000; /* FIXME ask to Texas */<br>
<br>
</div></div>This frequency should either be passed in as platform data or by your<br>
machine driver calling snd_soc_dai_set_sysclk().<br></blockquote><div><br>First I need to understand its meaning.<br>Reading sprufi3a-1.pdf (TMS320DM36x DMSoC Multichannel Buffered Serial Port (McBSP) Interface) at &quot;2.5.3 Data Clock Generation&quot; paragraph this info not appears really clear if we are in the case of &quot;McBSP internal input clock&quot;.<br>
I hope some Ti developer can help me.<br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im"><br>
&gt; +             if (dev-&gt;i2s_fast_clock) {<br>
&gt; +                     clk_div = 256;<br>
&gt; +                     do {<br>
&gt; +                             framesize = (freq / (--clk_div)) /<br>
&gt; +                                         params-&gt;rate_num *<br>
&gt; +                                         params-&gt;rate_den;<br>
&gt; +                     } while (((framesize &lt; 33) || (framesize &gt; 4095)) &amp;&amp;<br>
&gt; +                              (clk_div));<br>
&gt; +                     clk_div--;<br>
&gt; +                     srgr = DAVINCI_MCBSP_SRGR_FSGM |<br>
&gt; +                            DAVINCI_MCBSP_SRGR_CLKSM;<br>
&gt; +                     srgr |= DAVINCI_MCBSP_SRGR_FWID(mcbsp_word_length *<br>
&gt; +                                                     8 - 1);<br>
&gt; +                     srgr |= DAVINCI_MCBSP_SRGR_FPER(framesize - 1);<br>
&gt; +             } else {<br>
&gt; +                     /* simmetric waveforms */<br>
<br>
</div>symmetric<br></blockquote><div><br>thx<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5"><br>
&gt; +                     srgr = DAVINCI_MCBSP_SRGR_FSGM |<br>
&gt; +                            DAVINCI_MCBSP_SRGR_CLKSM;<br>
&gt; +                     srgr |= DAVINCI_MCBSP_SRGR_FWID(mcbsp_word_length *<br>
&gt; +                                                     8 - 1);<br>
&gt; +                     srgr |= DAVINCI_MCBSP_SRGR_FPER(mcbsp_word_length *<br>
&gt; +                                                     16 - 1);<br>
&gt; +                     clk_div = freq / (mcbsp_word_length * 16) /<br>
&gt; +                               params-&gt;rate_num * params-&gt;rate_den;<br>
&gt; +             }<br>
&gt; +             clk_div &amp;= 0xFF;<br>
&gt; +             srgr |= clk_div;<br>
&gt; +     } else if (master == SND_SOC_DAIFMT_CBS_CFM) {<br>
&gt; +             /* Clock given on CLKS */<br>
&gt; +             srgr = DAVINCI_MCBSP_SRGR_FSGM;<br>
&gt; +             clk_div = mcbsp_data.clk_div - 1;<br>
&gt; +             srgr |= DAVINCI_MCBSP_SRGR_FWID(mcbsp_word_length * 8 - 1);<br>
&gt; +             srgr |= DAVINCI_MCBSP_SRGR_FPER(mcbsp_word_length * 16 - 1);<br>
&gt; +             clk_div &amp;= 0xFF;<br>
&gt; +             srgr |= clk_div;<br>
&gt; +     } else {<br>
&gt; +             i = hw_param_interval(params, SNDRV_PCM_HW_PARAM_SAMPLE_BITS);<br>
&gt; +             srgr = DAVINCI_MCBSP_SRGR_FSGM;<br>
&gt; +             srgr |= DAVINCI_MCBSP_SRGR_FWID(snd_interval_value(i) - 1);<br>
&gt; +             pr_debug(&quot;%s - %d  FWID set: re-read srgr = %X\n&quot;,<br>
&gt; +                     __func__, __LINE__, snd_interval_value(i) - 1);<br>
&gt; +<br>
&gt; +             i = hw_param_interval(params, SNDRV_PCM_HW_PARAM_FRAME_BITS);<br>
&gt; +             srgr |= DAVINCI_MCBSP_SRGR_FPER(snd_interval_value(i) - 1);<br>
&gt; +     }<br>
&gt;       davinci_mcbsp_write_reg(dev, DAVINCI_MCBSP_SRGR_REG, srgr);<br>
&gt;<br>
&gt;       rcr = DAVINCI_MCBSP_RCR_RFIG;<br>
&gt; @@ -426,22 +505,45 @@ static int davinci_i2s_hw_params(struct snd_pcm_substream *substream,<br>
&gt;                       element_cnt = 1;<br>
&gt;                       fmt = double_fmt[fmt];<br>
&gt;               }<br>
&gt; +             if (master == SND_SOC_DAIFMT_CBS_CFS ||<br>
&gt; +                             master == SND_SOC_DAIFMT_CBS_CFM) {<br>
&gt; +                     rcr |= DAVINCI_MCBSP_RCR_RFRLEN2(0);<br>
&gt; +                     xcr |= DAVINCI_MCBSP_XCR_XFRLEN2(0);<br>
&gt; +                     rcr |= DAVINCI_MCBSP_RCR_RPHASE;<br>
&gt; +                     xcr |= DAVINCI_MCBSP_XCR_XPHASE;<br>
&gt; +             } else {<br>
&gt; +                     /* FIXME ask to Texas */<br>
&gt; +                     rcr |= DAVINCI_MCBSP_RCR_RFRLEN2(element_cnt - 1);<br>
&gt; +                     xcr |= DAVINCI_MCBSP_XCR_XFRLEN2(element_cnt - 1);<br>
&gt; +             }<br>
&gt;       }<br>
&gt;       dma_params-&gt;acnt = dma_params-&gt;data_type = data_type[fmt];<br>
&gt;       dma_params-&gt;fifo_level = 0;<br>
&gt;       mcbsp_word_length = asp_word_length[fmt];<br>
&gt; -     rcr |= DAVINCI_MCBSP_RCR_RFRLEN1(element_cnt - 1);<br>
&gt; -     xcr |= DAVINCI_MCBSP_XCR_XFRLEN1(element_cnt - 1);<br>
&gt; +<br>
&gt; +     if (master == SND_SOC_DAIFMT_CBS_CFS ||<br>
&gt; +                     master == SND_SOC_DAIFMT_CBS_CFM) {<br>
&gt; +             rcr |= DAVINCI_MCBSP_RCR_RFRLEN1(0);<br>
&gt; +             xcr |= DAVINCI_MCBSP_XCR_XFRLEN1(0);<br>
&gt; +     } else {<br>
&gt; +             /* FIXME ask to Texas */<br>
&gt; +             rcr |= DAVINCI_MCBSP_RCR_RFRLEN1(element_cnt - 1);<br>
&gt; +             xcr |= DAVINCI_MCBSP_XCR_XFRLEN1(element_cnt - 1);<br>
&gt; +     }<br>
&gt;<br>
&gt;       rcr |= DAVINCI_MCBSP_RCR_RWDLEN1(mcbsp_word_length) |<br>
&gt; -             DAVINCI_MCBSP_RCR_RWDLEN2(mcbsp_word_length);<br>
&gt; +            DAVINCI_MCBSP_RCR_RWDLEN2(mcbsp_word_length);<br>
<br>
</div></div>more unintended formatting ?<br>
<div class="im"><br>
&gt;       xcr |= DAVINCI_MCBSP_XCR_XWDLEN1(mcbsp_word_length) |<br>
&gt; -             DAVINCI_MCBSP_XCR_XWDLEN2(mcbsp_word_length);<br>
&gt; +            DAVINCI_MCBSP_XCR_XWDLEN2(mcbsp_word_length);<br>
<br>
</div>ditto<br></blockquote><div><br><br>I&#39;ll remove these changes.<br><br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im"><br>
&gt;<br>
&gt;       if (substream-&gt;stream == SNDRV_PCM_STREAM_PLAYBACK)<br>
&gt;               davinci_mcbsp_write_reg(dev, DAVINCI_MCBSP_XCR_REG, xcr);<br>
&gt;       else<br>
&gt;               davinci_mcbsp_write_reg(dev, DAVINCI_MCBSP_RCR_REG, rcr);<br>
&gt; +<br>
&gt; +     pr_debug(&quot;%s - %d  srgr=%X\n&quot;, __func__, __LINE__, srgr);<br>
&gt; +     pr_debug(&quot;%s - %d  xcr=%X\n&quot;, __func__, __LINE__, xcr);<br>
&gt; +     pr_debug(&quot;%s - %d  rcr=%X\n&quot;, __func__, __LINE__, rcr);<br>
&gt;       return 0;<br>
&gt;  }<br>
&gt;<br>
&gt; @@ -500,7 +602,7 @@ static struct snd_soc_dai_ops davinci_i2s_dai_ops = {<br>
&gt;       .trigger        = davinci_i2s_trigger,<br>
&gt;       .hw_params      = davinci_i2s_hw_params,<br>
&gt;       .set_fmt        = davinci_i2s_set_dai_fmt,<br>
&gt; -<br>
&gt; +     .set_clkdiv = davinci_i2s_dai_set_clkdiv,<br>
<br>
</div>the formatting is different to rest of struct here.<br></blockquote><div><br>ok. fixing<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div class="im"><br>
&gt;  };<br>
&gt;<br>
&gt;  struct snd_soc_dai davinci_i2s_dai = {<br>
&gt; @@ -548,6 +650,7 @@ static int davinci_i2s_probe(struct platform_device *pdev)<br>
&gt;       }<br>
&gt;       if (pdata) {<br>
&gt;               dev-&gt;enable_channel_combine = pdata-&gt;enable_channel_combine;<br>
&gt; +             dev-&gt;i2s_fast_clock = pdata-&gt;i2s_fast_clock;<br>
&gt;               dev-&gt;dma_params[SNDRV_PCM_STREAM_PLAYBACK].sram_size =<br>
&gt;                       pdata-&gt;sram_size_playback;<br>
&gt;               dev-&gt;dma_params[SNDRV_PCM_STREAM_CAPTURE].sram_size =<br>
<br>
</div>The subject of the patch looks wrong as I can&#39;t really see where you are<br>
adding stereo support to  the DAI. This patch looks likes it adds more<br>
clocking options only,<br></blockquote><div><br>there are these supports added.<br><br>1. SND_SOC_DAIFMT_CBS_CFS (the cpu generates clock and frame sync)<br>I need to clarify how is clocked McBSP interface internally.<br>
i2s_fast_clock switch can be used to have better approximate or symmetric waveforms.<br><br>2. SND_SOC_DAIFMT_CBS_CFM (the cpu get clock from external pin and generates frame sync)<br>this is important for uda1345.<br><br>
3. We haven&#39;t changed the evmdm365 support (due also to CPLD that doesn&#39;t help to understand)<br>We don&#39;t know in this mode if audio stereo works on evmdm365.<br>Probably it does.<br><br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>
Thanks<br>
<br>
Liam<br>
<font color="#888888">--<br>
Freelance Developer, SlimLogic Ltd<br>
ASoC and Voltage Regulator Maintainer.<br>
<a href="http://www.slimlogic.co.uk" target="_blank">http://www.slimlogic.co.uk</a><br>
<br>
</font></blockquote></div><br><br>The better (I hope) patch we&#39;ll come today.<br><br>Bye,<br>Raffaele and Davide.<br><br>