Re: [alsa-devel] [PATCH] ASoC: simple-card: overwrite DAIFMT_MASTER of cpu_dai->fmt

2014-03-11 Thread Kuninori Morimoto

Hi Nicolin

> > 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.

Wow... I had misunderstood...
I need to send fixup patch after lunch.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [alsa-devel] [PATCH] ASoC: simple-card: overwrite DAIFMT_MASTER of cpu_dai->fmt

2014-03-11 Thread Nicolin Chen
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 / 13200
> > > > 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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [alsa-devel] [PATCH] ASoC: simple-card: overwrite DAIFMT_MASTER of cpu_dai->fmt

2014-03-11 Thread Kuninori Morimoto

Hi Mark

> > > asoc-simple-card sound-cs42888.12: cpu : 2024000.esai / 4003 / 13200
> > > 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,
},
};
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [alsa-devel] [PATCH] ASoC: simple-card: overwrite DAIFMT_MASTER of cpu_dai->fmt

2014-03-11 Thread Mark Brown
On Tue, Mar 11, 2014 at 06:32:32PM -0700, Kuninori Morimoto wrote:
> > The current simple-card driver separates the daimft for cpu_dai and 
> > codec_dai.
> > So we might get different values for them (0x4003 and 0x1003 for example):
> > 
> > asoc-simple-card sound-cs42888.12: cpu : 2024000.esai / 4003 / 13200
> > 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.


signature.asc
Description: Digital signature


Re: [alsa-devel] [PATCH] ASoC: simple-card: overwrite DAIFMT_MASTER of cpu_dai->fmt

2014-03-11 Thread Kuninori Morimoto

Hi Nicolin

> The current simple-card driver separates the daimft for cpu_dai and codec_dai.
> So we might get different values for them (0x4003 and 0x1003 for example):
> 
> asoc-simple-card sound-cs42888.12: cpu : 2024000.esai / 4003 / 13200
> 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 ?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [alsa-devel] [PATCH] ASoC: simple-card: overwrite DAIFMT_MASTER of cpu_dai-fmt

2014-03-11 Thread Kuninori Morimoto

Hi Nicolin

 The current simple-card driver separates the daimft for cpu_dai and codec_dai.
 So we might get different values for them (0x4003 and 0x1003 for example):
 
 asoc-simple-card sound-cs42888.12: cpu : 2024000.esai / 4003 / 13200
 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 ?
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [alsa-devel] [PATCH] ASoC: simple-card: overwrite DAIFMT_MASTER of cpu_dai-fmt

2014-03-11 Thread Mark Brown
On Tue, Mar 11, 2014 at 06:32:32PM -0700, Kuninori Morimoto wrote:
  The current simple-card driver separates the daimft for cpu_dai and 
  codec_dai.
  So we might get different values for them (0x4003 and 0x1003 for example):
  
  asoc-simple-card sound-cs42888.12: cpu : 2024000.esai / 4003 / 13200
  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.


signature.asc
Description: Digital signature


Re: [alsa-devel] [PATCH] ASoC: simple-card: overwrite DAIFMT_MASTER of cpu_dai-fmt

2014-03-11 Thread Kuninori Morimoto

Hi Mark

   asoc-simple-card sound-cs42888.12: cpu : 2024000.esai / 4003 / 13200
   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,
},
};
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [alsa-devel] [PATCH] ASoC: simple-card: overwrite DAIFMT_MASTER of cpu_dai-fmt

2014-03-11 Thread Nicolin Chen
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 / 13200
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


--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [alsa-devel] [PATCH] ASoC: simple-card: overwrite DAIFMT_MASTER of cpu_dai-fmt

2014-03-11 Thread Kuninori Morimoto

Hi Nicolin

  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.

Wow... I had misunderstood...
I need to send fixup patch after lunch.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/