Re: [PATCH] ASoC: fsl-esai: fix ESAI TDM slot setting

2014-02-10 Thread Nicolin Chen
On Mon, Feb 10, 2014 at 02:47:17PM +0800, Xiubo Li wrote: > Cc: Nicolin Chen > Signed-off-by: Xiubo Li > --- > sound/soc/fsl/fsl_esai.c | 4 ++-- > sound/soc/fsl/fsl_esai.h | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/sound/soc/fsl/fs

Re: [PATCH] ASoC: fsl-esai: fix ESAI TDM slot setting

2014-02-10 Thread Nicolin Chen
On Mon, Feb 10, 2014 at 04:24:43PM +0800, Xiubo Li-B47053 wrote: > Sorry, my misunderstanding about your comment. > > Please ignore the last mail. > > I will send v2 of this patch. No, you don't need to. Just rechecked it with RM. Your patch is correct. I forgot I used A's WIDTH intentionally

[PATCH 0/3] Enhance imx-wm8962 machine driver

2013-12-06 Thread Nicolin Chen
Although there's no direct relationship between any of these three patches, I recommend to apply them in order so as to circumvent merging conflicts. Nicolin Chen (3): ASoC: fsl: imx-wm8962: Don't update bias_level in machine driver ASoC: fsl: imx-wm8962: Grant hw_params/free() per

[PATCH 2/3] ASoC: fsl: imx-wm8962: Grant hw_params/free() permission to control FLL

2013-12-06 Thread Nicolin Chen
hile in order not to break the bypass path feature, we make both set_bias_level() and hw_xxx() ways coexist. Signed-off-by: Nicolin Chen --- sound/soc/fsl/imx-wm8962.c | 136 - 1 file changed, 86 insertions(+), 50 deletions(-) diff --git a/sound/soc/fs

[PATCH 1/3] ASoC: fsl: imx-wm8962: Don't update bias_level in machine driver

2013-12-06 Thread Nicolin Chen
If we update it here, the set_bias_level() of Codec driver won't be normally called and we will then miss some essential procedures in set_bias_level() of the Codec driver. Thus drop it. Signed-off-by: Nicolin Chen --- sound/soc/fsl/imx-wm8962.c | 2 -- 1 file changed, 2 deletions(-)

[PATCH 3/3] ASoC: fsl: imx-wm8962: Add headphone and microphone jack plugin/out detection

2013-12-06 Thread Nicolin Chen
detection feature and switchs I/O routes accordingly. Meanwhile, for those monaural input cases, we also turn on the ADC monomix features of WM8962 if needed. Signed-off-by: Nicolin Chen --- .../devicetree/bindings/sound/imx-audio-wm8962.txt | 8 + Documentation/devicetree/bindings/sound/wm8962

Re: [PATCH 2/3] ASoC: fsl: imx-wm8962: Grant hw_params/free() permission to control FLL

2013-12-06 Thread Nicolin Chen
On Fri, Dec 06, 2013 at 02:34:33PM +, Mark Brown wrote: > On Fri, Dec 06, 2013 at 05:47:43PM +0800, Nicolin Chen wrote: > > > +static int imx_wm8962_enable_fll(struct snd_soc_dai *codec_dai, u32 > > sample_rate, > > + snd_pc

Re: [PATCH 3/3] ASoC: fsl: imx-wm8962: Add headphone and microphone jack plugin/out detection

2013-12-06 Thread Nicolin Chen
On Fri, Dec 06, 2013 at 02:42:56PM +, Mark Brown wrote: > On Fri, Dec 06, 2013 at 05:48:23PM +0800, Nicolin Chen wrote: > > > Therefore, this patch mainly adds jack event detection feature and switchs > > I/O > > routes accordingly. Meanwhile, for those monaural i

Re: [PATCH 3/3] ASoC: fsl: imx-wm8962: Add headphone and microphone jack plugin/out detection

2013-12-06 Thread Nicolin Chen
On Fri, Dec 06, 2013 at 03:03:19PM +, Mark Brown wrote: > On Fri, Dec 06, 2013 at 10:38:17PM +0800, Nicolin Chen wrote: > > On Fri, Dec 06, 2013 at 02:42:56PM +, Mark Brown wrote: > > > > What's this uevent trying to do and why is it open coded in the driver? &

[PATCH v2 1/2] ASoC: fsl: imx-wm8962: Don't update bias_level in machine driver

2013-12-06 Thread Nicolin Chen
If we update it here, the set_bias_level() of Codec driver won't be normally called and we will then miss some essential procedures in set_bias_level() of the Codec driver. Thus drop it. Signed-off-by: Nicolin Chen --- sound/soc/fsl/imx-wm8962.c | 2 -- 1 file changed, 2 deletions(-)

[PATCH v2 0/2] Enhance imx-wm8962 machine driver

2013-12-06 Thread Nicolin Chen
se it next time. Nicolin Chen (2): ASoC: fsl: imx-wm8962: Don't update bias_level in machine driver ASoC: fsl: imx-wm8962: Grant hw_params/free() permission to control FLL sound/soc/fsl/imx-wm8962.c | 152 + 1 file changed, 99 inserti

[PATCH v2 2/2] ASoC: fsl: imx-wm8962: Grant hw_params/free() permission to control FLL

2013-12-06 Thread Nicolin Chen
hile in order not to break the bypass path feature, we make both set_bias_level() and hw_xxx() ways coexist. Signed-off-by: Nicolin Chen --- sound/soc/fsl/imx-wm8962.c | 150 ++--- 1 file changed, 99 insertions(+), 51 deletions(-) diff --git a/sound/soc/fs

Re: [PATCHv3 1/4] ASoC: fsl-asrc: Convert to use regmap framework's endianness method.

2014-08-24 Thread Nicolin Chen
dn't notice this change. This should be needless. Otherwise, the whole change within sound/soc/fsl by this series looks fine. Acked-by: Nicolin Chen > - if (of_property_read_bool(np, "big-endian")) > - fsl_asrc_regmap_config.val_format_endian = REGMAP_ENDIAN_BI

Re: [PATCH] ASoC: fsl-sai: using 'lsb-first' property instead of 'big-endian-data'.

2014-08-26 Thread Nicolin Chen
On Tue, Aug 26, 2014 at 7:12 PM, li.xi...@freescale.com wrote: > > > This property used for configuring whether the LSB or the MSB is > > > transmitted > > > first for the fifo data. > > > > I don't follow the rationale for this change. > > > > This looks like a pointless renaming. > > > > Why is

Re: [PATCH V1] ASoC: fsl_ssi: refine ipg clock usage in this module

2014-09-09 Thread Nicolin Chen
On Tue, Sep 09, 2014 at 12:27:50PM +0100, Mark Brown wrote: > On Tue, Sep 09, 2014 at 05:18:07PM +0800, Shengjiu Wang wrote: > > - ssi_private->clk = devm_clk_get(&pdev->dev, NULL); > > + ssi_private->clk = devm_clk_get(&pdev->dev, "ipg"); > > if (IS_ERR(ssi_private->clk)) { > >

Re: [PATCH V1] ASoC: fsl_ssi: refine ipg clock usage in this module

2014-09-09 Thread Nicolin Chen
On Tue, Sep 09, 2014 at 05:18:07PM +0800, Shengjiu Wang wrote: > @@ -1321,7 +1333,11 @@ static int fsl_ssi_probe(struct platform_device *pdev) > return -ENOMEM; > } > > - ssi_private->regs = devm_regmap_init_mmio(&pdev->dev, iomem, > + if (ssi_private->soc->imx) > +

Re: [PATCH V1] ASoC: fsl_ssi: refine ipg clock usage in this module

2014-09-09 Thread Nicolin Chen
On Tue, Sep 09, 2014 at 07:15:16PM +0100, Mark Brown wrote: > On Tue, Sep 09, 2014 at 11:03:10AM -0700, Nicolin Chen wrote: > > On Tue, Sep 09, 2014 at 12:27:50PM +0100, Mark Brown wrote: > > > On Tue, Sep 09, 2014 at 05:18:07PM +0800, Shengjiu Wang wrote: > > >

Re: [PATCH V1] ASoC: fsl_ssi: refine ipg clock usage in this module

2014-09-09 Thread Nicolin Chen
On Tue, Sep 09, 2014 at 02:37:42PM -0500, Timur Tabi wrote: > On 09/09/2014 01:38 PM, Nicolin Chen wrote: > >make sure to have the call for imx only because it seems that > >the other platforms do not depend on the clock. > > Although I doubt anyone will every add support

Re: [PATCH V1] ASoC: fsl_ssi: refine ipg clock usage in this module

2014-09-09 Thread Nicolin Chen
On Tue, Sep 09, 2014 at 03:03:53PM -0500, Timur Tabi wrote: > On 09/09/2014 02:59 PM, Nicolin Chen wrote: > >+/* > >+ * Initially mark the clock to NULL for all platforms so that later > >+ * clk_prepare_enable() will ignore and return

Re: [PATCH V1] ASoC: fsl_ssi: refine ipg clock usage in this module

2014-09-09 Thread Nicolin Chen
On Tue, Sep 09, 2014 at 03:37:26PM -0500, Timur Tabi wrote: > >However, my approach doesn't need any check. The open() or pm_resume() > >can just call clk_prepare_enable() directly. The __clk_enable() will > >then handle the 'clk == NULL' case: > > Yes, I was thinking the same thing. Because that

Re: [alsa-devel] [PATCH V1] ASoC: fsl_ssi: refine ipg clock usage in this module

2014-09-09 Thread Nicolin Chen
On Wed, Sep 10, 2014 at 08:21:18AM +0200, Markus Pargmann wrote: > On Tue, Sep 09, 2014 at 11:38:05AM -0700, Nicolin Chen wrote: > > On Tue, Sep 09, 2014 at 05:18:07PM +0800, Shengjiu Wang wrote: > > > @@ -1321,7 +1333,11 @@ static int fsl_ssi_probe(struct platform_d

Re: [PATCH V1] ASoC: fsl_ssi: refine ipg clock usage in this module

2014-09-10 Thread Nicolin Chen
On Wed, Sep 10, 2014 at 04:12:53PM +0800, Shengjiu Wang wrote: > > Then we can get a patch like: > > open() { > > + clk_prepare_enable(); > > > > } > > > > close() { > > > > + clk_disable_unprepare() > > } > what is the open() and close()? do you mean the fsl_ssi_startup() >

Re: [PATCHv2] ASoC: fsl-sai: using 'lsb-first' property instead of 'big-endian-data'.

2014-08-29 Thread Nicolin Chen
On Fri, Aug 29, 2014 at 12:59:43PM +0100, Mark Brown wrote: > On Fri, Aug 29, 2014 at 12:06:01PM +0100, Mark Rutland wrote: > > On Fri, Aug 29, 2014 at 08:12:12AM +0100, Xiubo Li wrote: > > > > The 'big-endian-data' property is originally used to indicate whether the > > > LSB firstly or MSB first

Re: [PATCHv2] ASoC: fsl-sai: using 'lsb-first' property instead of 'big-endian-data'.

2014-08-29 Thread Nicolin Chen
On Fri, Aug 29, 2014 at 06:26:02PM +0100, Mark Rutland wrote: > On Fri, Aug 29, 2014 at 05:40:11PM +0100, Nicolin Chen wrote: > > On Fri, Aug 29, 2014 at 12:59:43PM +0100, Mark Brown wrote: > > > On Fri, Aug 29, 2014 at 12:06:01PM +0100, Mark Rutland wrote: > > > >

Re: [PATCHv2] ASoC: fsl-sai: using 'lsb-first' property instead of 'big-endian-data'.

2014-08-29 Thread Nicolin Chen
On Fri, Aug 29, 2014 at 08:11:41PM +0100, Mark Brown wrote: > On Fri, Aug 29, 2014 at 10:40:20AM -0700, Nicolin Chen wrote: > > > Agreed, it's better to be described in the commit comments as well. > > > And regarding the compatibility with the old DT, I personally pr

Re: [PATCH] ASoC: fsl_sai: Add asynchronous mode support

2014-08-05 Thread Nicolin Chen
Hi Varka, On Tue, Aug 05, 2014 at 04:44:29PM +0530, Varka Bhadram wrote: > On 08/05/2014 04:37 PM, Nicolin Chen wrote: > >Hi Varka, > > > >On Tue, Aug 05, 2014 at 04:29:50PM +0530, Varka Bhadram wrote: > >>>diff --git a/Documentation/devicetree/bindings/sound/

Re: [alsa-devel] [PATCH V1 1/2] ASoC: fsl: esai: refine esai for tdm support

2014-08-06 Thread Nicolin Chen
About the title, please follow the old pattern: ASoC: fsl_esai: Refine You can get the history from 'git log --oneline sound/soc/fsl/fsl_esai.c' On Wed, Aug 06, 2014 at 06:23:03PM +0800, Shengjiu Wang wrote: > Add parameter for slots, and caculate the number of TX/RX pins and bclk with > slo

Re: [PATCH] ASoC: fsl_sai: Add asynchronous mode support

2014-08-07 Thread Nicolin Chen
On Thu, Aug 07, 2014 at 10:45:27AM +0100, Mark Brown wrote: > On Tue, Aug 05, 2014 at 03:32:05PM +0800, Nicolin Chen wrote: > > From: Nicolin Chen > > > > SAI supports these operation modes: > > 1) asynchronous mode > >Both Tx and Rx are set to be asynchro

[PATCH] ASoC: wm8962: Correct the bit offset to enable mono speaker output

2014-08-07 Thread Nicolin Chen
bit offset. Signed-off-by: Peter Chan Signed-off-by: Nicolin Chen --- @Peter I cced you just to let you know that I'm merging your fix to upstream. And because you patch can't be applied to the upstream tree directly, I used my own commit with your signed-off. Thank you for the fix

Re: [alsa-devel] [PATCH V2 2/2] Revert "ASoC: fsl-esai: Add .xlate_tdm_slot_mask() support."

2014-08-07 Thread Nicolin Chen
Hi Shengjiu, On Thu, Aug 07, 2014 at 05:33:25PM +0800, Shengjiu Wang wrote: > This reverts commit a603c8ee526f5ea9ad9b40710308766299ad8a69. > > fsl_asoc_xlate_tdm_slot_mask() will invert the mask, which isn't fit for > esai. The default function snd_soc_xlate_tdm_slot_mask() is ok for esai. Y

Re: [alsa-devel] [PATCH V4 0/2] refine esai for tdm support

2014-08-07 Thread Nicolin Chen
|1 - > sound/soc/fsl/fsl_esai.c | 16 +++- > sound/soc/fsl/fsl_esai.h |8 ---- > 3 files changed, 15 insertions(+), 10 deletions(-) Acked-by: Nicolin Chen Thank you > > -- > 1.7.9.5 > > ___ >

Re: [alsa-devel] [PATCH] ASoC: wm8962: Correct the bit offset to enable mono speaker output

2014-08-08 Thread Nicolin Chen
On Thu, Aug 07, 2014 at 05:58:36PM +0100, Mark Brown wrote: > On Thu, Aug 07, 2014 at 07:55:49PM +0800, Nicolin Chen wrote: > > As WM8962 datasheet describes for SPK_MONO bit of R51: When SPK_MONO > > is set to '1', both speakers output the signal from the left channel. &

[PATCH] ASoC: fsl_sai: Make Synchronous and Asynchronous modes exclusive

2014-08-08 Thread Nicolin Chen
usage. Signed-off-by: Nicolin Chen --- Documentation/devicetree/bindings/sound/fsl-sai.txt | 3 +-- sound/soc/fsl/fsl_sai.c | 7 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/fsl-sai.txt b/Documentation

[PATCH 2/2] ASoC: fsl_asrc: Don't access members of config before checking it

2014-08-03 Thread Nicolin Chen
pair_err("invalid pair config\n"); 252 return -EINVAL; 253 } Reported-by: Dan Carpenter Signed-off-by: Nicolin Chen --- sound/soc/fsl/fsl_asrc.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fs

[PATCH 0/2] ASoC: fsl_asrc: Fix two dereferenced variable before check

2014-08-03 Thread Nicolin Chen
These two patches fixes two warning of dereferenced variable reported by Dan Carpenter Nicolin Chen (2): ASoC: fsl_sarc_dma: Check pair before using it ASoC: fsl_asrc: Don't access members of config before checking it sound/soc/fsl/fsl_asrc.c | 9 ++--- sound/soc/fsl/fsl_asrc_

[PATCH 1/2] ASoC: fsl_sarc_dma: Check pair before using it

2014-08-03 Thread Nicolin Chen
;& asrc_priv->pair[pair->index] == pair) Check. 305 asrc_priv->pair[pair->index] = NULL; 306 So we just let the driver check pair before using it. Reported-by: Dan Carpenter Signed-off-by: Nicolin Chen --- sound/soc/fsl/f

[PATCH] ASoC: fsl_sai: Set SYNC bit of TCR2 to Asynchronous Mode

2014-08-04 Thread Nicolin Chen
From: Nicolin Chen There is one design rule according to SAI's reference manual: If the transmitter bit clock and frame sync are to be used by both transmitter and receiver, the transmitter must be configured for asynchronous operation and the receiver for synchronous operation. And SY

[PATCH] ASoC: fsl_sai: Add asynchronous mode support

2014-08-05 Thread Nicolin Chen
From: Nicolin Chen SAI supports these operation modes: 1) asynchronous mode Both Tx and Rx are set to be asynchronous. 2) synchronous mode (Rx sync with Tx) Tx is set to be asynchronous, Rx is set to be synchronous. 3) synchronous mode (Tx sync with Rx) Rx is set to be asynchronous, Tx

[PATCH] ASoC: fsl_sai: Initialize with software reset

2014-08-05 Thread Nicolin Chen
This patch adds software reset code in dai_probe() so as to make a true init by clearing SAI's internal logic, including the bit clock generation, status flags, and FIFO pointers. Signed-off-by: Nicolin Chen --- sound/soc/fsl/fsl_sai.c | 9 +++-- sound/soc/fsl/fsl_sai.h | 1 + 2

Re: [PATCH] ASoC: fsl_sai: Add asynchronous mode support

2014-08-05 Thread Nicolin Chen
Hi Varka, On Tue, Aug 05, 2014 at 04:29:50PM +0530, Varka Bhadram wrote: > >diff --git a/Documentation/devicetree/bindings/sound/fsl-sai.txt > >b/Documentation/devicetree/bindings/sound/fsl-sai.txt > >index 0f4e238..77864f4 100644 > >--- a/Documentation/devicetree/bindings/sound/fsl-sai.txt > >++

Re: [PATCH 0/2] ASoC: fsl: Use dynamic slot width for ESAI.

2014-10-31 Thread Nicolin Chen
On Fri, Oct 31, 2014 at 06:12:24PM +, Mark Brown wrote: > On Fri, Oct 24, 2014 at 04:48:10PM -0700, Nicolin Chen wrote: > > > @Shengjiu, > > Will you be available to test this series on Sabre Auto for both > > Master and Slave cases? I'd like to wait for your Tes

Re: [PATCH] ASoC: fsl_asrc: Add reg_defaults for regmap to fix kernel dump

2014-10-27 Thread Nicolin Chen
On Tue, Oct 28, 2014 at 12:19:04AM +, Mark Brown wrote: > On Fri, Oct 24, 2014 at 07:03:57PM -0700, Nicolin Chen wrote: > > Kernel dump (WARN_ON) ocurred during system boot-up inside regmap_write(): > > > > [ cut here ] > > WARNING: CPU:

Re: [PATCH] ASoC: fsl_asrc: Add reg_defaults for regmap to fix kernel dump

2014-10-28 Thread Nicolin Chen
On Tue, Oct 28, 2014 at 10:47:42AM +, Mark Brown wrote: > On Mon, Oct 27, 2014 at 09:26:26PM -0700, Nicolin Chen wrote: > > On Tue, Oct 28, 2014 at 12:19:04AM +, Mark Brown wrote: > > > > It's not a bug, it's not reasonable to default allocations to atomic

[PATCH 4/8] ASoC: eukrea-tlv320: Add indentation for binding doc to increase readability

2014-10-07 Thread Nicolin Chen
This patch refines the DT binding doc for more readability by adding extra blank lines and indentations. Signed-off-by: Nicolin Chen --- Documentation/devicetree/bindings/sound/eukrea-tlv320.txt | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Documentation

[PATCH 7/8] ASoC: imx-spdif: Add indentation for binding doc to increase readability

2014-10-07 Thread Nicolin Chen
This patch simply adds indentations for DT binding doc to increase readability without changing any contents. Signed-off-by: Nicolin Chen --- .../devicetree/bindings/sound/imx-audio-spdif.txt | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a

[PATCH 8/8] ASoC: imx-wm8962: Add indentation for binding doc to increase readability

2014-10-07 Thread Nicolin Chen
This patch simply adds indentations for DT binding doc to increase readability without changing any contents. Signed-off-by: Nicolin Chen --- .../devicetree/bindings/sound/imx-audio-wm8962.txt | 45 +- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a

[PATCH 5/8] ASoC: imx-audmux: Add indentation for binding doc to increase readability

2014-10-07 Thread Nicolin Chen
This patch refines the DT binding doc for more readability by adding extra blank lines and indentations. Signed-off-by: Nicolin Chen --- .../devicetree/bindings/sound/imx-audmux.txt | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/Documentation

[PATCH 6/8] ASoC: imx-sgtl5000: Add indentation for binding doc to increase readability

2014-10-07 Thread Nicolin Chen
This patch refines the DT binding doc for more readability by adding extra blank lines and indentations. Signed-off-by: Nicolin Chen --- .../bindings/sound/imx-audio-sgtl5000.txt | 61 -- 1 file changed, 34 insertions(+), 27 deletions(-) diff --git a/Documentation

[PATCH 3/8] ASoC: fsl_sai: Add indentation for binding doc to increase readability

2014-10-07 Thread Nicolin Chen
This patch refines the DT binding doc for more readability by adding extra blank lines and indentations. Signed-off-by: Nicolin Chen --- .../devicetree/bindings/sound/fsl-sai.txt | 66 ++ 1 file changed, 41 insertions(+), 25 deletions(-) diff --git a/Documentation

[PATCH 0/8] ASoC: fsl: Refine DT binding documents for more readability

2014-10-07 Thread Nicolin Chen
them to DT maillist only. Thank you. Nicolin Chen (8): ASoC: fsl_esai: Add indentation for binding doc to increase readability ASoC: fsl_spdif: Add indentation for binding doc to increase readability ASoC: fsl_sai: Add indentation for binding doc to increase readability ASoC

[PATCH 2/8] ASoC: fsl_spdif: Add indentation for binding doc to increase readability

2014-10-07 Thread Nicolin Chen
This patch simply adds indentations for DT binding doc to increase readability without changing any contents. Signed-off-by: Nicolin Chen --- .../devicetree/bindings/sound/fsl,spdif.txt| 37 +++--- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a

[PATCH 1/8] ASoC: fsl_esai: Add indentation for binding doc to increase readability

2014-10-07 Thread Nicolin Chen
This patch simply adds indentations for DT binding doc to increase readability without changing any contents. Signed-off-by: Nicolin Chen --- .../devicetree/bindings/sound/fsl,esai.txt | 44 +++--- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a

[PATCH] dma: imx-sdma: Add a new DMATYPE for SAI

2014-10-24 Thread Nicolin Chen
This patch simply adds a new DMATYPE for SAI which's included in i.MX6 Solo X. Signed-off-by: Nicolin Chen --- Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt | 1 + drivers/dma/imx-sdma.c | 1 + include/linux/platform_data/dma-imx.h

[PATCH 0/2] ASoC: fsl: Use dynamic slot width for ESAI.

2014-10-24 Thread Nicolin Chen
series on Sabre Auto for both Master and Slave cases? I'd like to wait for your Test-by. Thanks. Nicolin Chen (2): ASoC: fsl_esai: Use dynamic slot width as default ASoC: fsl-asoc-card: Add slot_width setting for cpu-dai sound/soc/fsl/fsl-asoc-card.c | 12 sound/soc/fsl/fsl_e

[PATCH] ASoC: fsl-asoc-card: Don't bypass settings if cpu-dai is Master

2014-10-24 Thread Nicolin Chen
When cpu-dai is the DAI Master (CBM_CFx), it may need some configurations, set_sysclk() call for eample, for cpu-dai side in the hw_params(), even if the set_bias_level() has already taken care of the codec-dai side. So this patch just simply adds an additional condition. Signed-off-by: Nicolin

[PATCH 1/2] ASoC: fsl_esai: Use dynamic slot width as default

2014-10-24 Thread Nicolin Chen
situation that needs a fixed width, the machine driver shall set slot_width via set_tdm_slot() so as to let the ESAI driver replace the dynamic width policy with the fixed value. Signed-off-by: Nicolin Chen --- sound/soc/fsl/fsl_esai.c | 12 +++- 1 file changed, 7 insertions(+), 5

[PATCH 2/2] ASoC: fsl-asoc-card: Add slot_width setting for cpu-dai

2014-10-24 Thread Nicolin Chen
ESAI may need to use fixed slot width to comply with external CODEC. So this set_tdm_slot() call will allow the ESAI driver to override its default dynamic slot width policy. Signed-off-by: Nicolin Chen --- sound/soc/fsl/fsl-asoc-card.c | 12 1 file changed, 12 insertions(+) diff

[PATCH] ASoC: fsl_asrc: Add reg_defaults for regmap to fix kernel dump

2014-10-24 Thread Nicolin Chen
at 2744 line, we can get that it's because regcache_rbtree_write() would call kmalloc() with GFP flag if it couldn't find an existing block to insert nodes while this kmalloc() call is inside a spin_lock_irq_save pair, i.e. IRQs disabled. Even though this may be a bug that should be fixed,

Re: [PATCH] ASoC: fsl-asoc-card: Don't bypass settings if cpu-dai is Master

2014-10-27 Thread Nicolin Chen
On Mon, Oct 27, 2014 at 05:30:31PM +, Mark Brown wrote: > On Fri, Oct 24, 2014 at 04:48:11PM -0700, Nicolin Chen wrote: > > When cpu-dai is the DAI Master (CBM_CFx), it may need some configurations, > > set_sysclk() call for eample, for cpu-dai side in the hw_params(),

[PATCH] ASoC: fsl-asoc-card: Specify codec_dai_name for DAI links

2015-08-12 Thread Nicolin Chen
The dev->name of CODEC might not be identical to its codec_dai_name, so using dev->name to probe the CODEC dai is not a correct approach. This patch specifies each supporting codec_dai_name instead of using dev->name any more. Signed-off-by: Nicolin Chen --- sound/soc/fsl/fsl-asoc-c

Re: [PATCH v2 1/1] ASoC: fsl_ssi: add CCSR_SSI_SOR to volatile register list

2016-04-28 Thread Nicolin Chen
that > require the channels to be in the right slots. > > Signed-off-by: Caleb Crome > Suggested-by: Arnaud Mouiche Acked-by: Nicolin Chen Thanks > > --- > sound/soc/fsl/fsl_ssi.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/sound/soc/fsl/fsl_ssi

[PATCH v6] ASoC: cs53l30: Add codec driver support for Cirrus CS53L30

2016-05-23 Thread Nicolin Chen
CS53L30 is a Quad-Channel ADC from Cirrus Logic with an I2S/TDM DAI. So this patch adds support for CS53L30 that supports 24-bit recording feature. Signed-off-by: Nicolin Chen --- Changelog: v5->v6 * Added clock controls * Reconstructed bitfield macros and improved coding style * Fixed s

Re: [PATCH v6] ASoC: cs53l30: Add codec driver support for Cirrus CS53L30

2016-05-25 Thread Nicolin Chen
On Wed, May 25, 2016 at 12:28:00PM -0500, Rob Herring wrote: > > diff --git a/Documentation/devicetree/bindings/sound/cs53l30.txt > > b/Documentation/devicetree/bindings/sound/cs53l30.txt > > new file mode 100644 > > index 000..ace7ffe > > --- /dev/null > > +++ b/Documentation/devicetree/bind

[PATCH v7] ASoC: cs53l30: Add codec driver support for Cirrus CS53L30

2016-05-25 Thread Nicolin Chen
CS53L30 is a Quad-Channel ADC from Cirrus Logic with an I2S/TDM DAI. So this patch adds a codec driver for CS53L30 that includes 4-channel 24-bit recording and TDM mode supports. Signed-off-by: Nicolin Chen --- Changelog: v6->v7 * Added vendor prefixes to properties in DT binding doc * Upda

Re: [PATCH V2 1/3] ASoC: fsl_esai: spba clock is needed by esai device

2015-11-19 Thread Nicolin Chen
On Fri, Nov 20, 2015 at 02:17:51PM +0800, Shengjiu Wang wrote: > diff --git a/Documentation/devicetree/bindings/sound/fsl,esai.txt > b/Documentation/devicetree/bindings/sound/fsl,esai.txt > index d3b6b5f..f1d5351 100644 > --- a/Documentation/devicetree/bindings/sound/fsl,esai.txt > +++ b/Document

Re: [PATCH] ASoC: fsl: clarify ac97 dependency

2015-11-24 Thread Nicolin Chen
+0x571d8): undefined reference to `snd_ac97_update_bits' > > I couldn't come up with a nice solution, so this adds another dependency > on "X || !X", which is the Kconfig way of saying that we have an > optional dependency on something that might be a loadable module. >

Re: [alsa-devel] [PATCH trivial] ASoC: fsl_esai: Spelling s/specifially/specifically/

2015-05-23 Thread Nicolin Chen
On Thu, May 21, 2015 at 02:02:18PM +0200, Geert Uytterhoeven wrote: > Signed-off-by: Geert Uytterhoeven Acked-by: Nicolin Chen Thank you > --- > sound/soc/fsl/fsl_esai.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sound/soc/fsl/fsl_esai

Re: [alsa-devel][PATCH 1/3] ASoC: fsl_sai: add sai master mode support

2015-05-24 Thread Nicolin Chen
On Tue, May 12, 2015 at 03:07:39PM +0800, Zidan Wang wrote: > When sai works on master mode, set its bit clock and frame clock. > > SAI has 4 MCLK source, bus clock, MCLK1, MCLK2 and MCLK3. fsl_sai_set_bclk > will select proper MCLK source, then calculate and set the bit clock divider. > > After

[PATCH] ASoC: fsl_spdif: Don't try to round-up for clock divisor calculation

2015-05-24 Thread Nicolin Chen
to fsl_spdif driver. Signed-off-by: Nicolin Chen Cc: Fabio Estevam Cc: Zidan Wang --- Fabio and Zidan, Theoretically, it should have the same problem as fsl_ssi driver had. But I don't have an S/PDIF test environment. So I need your helps to confirm it. Thank you. sound/soc/fsl/fsl_s

Re: [PATCH] ASoC: fsl_spdif: Don't try to round-up for clock divisor calculation

2015-05-25 Thread Nicolin Chen
On Mon, May 25, 2015 at 12:58:12PM +0100, Mark Brown wrote: > On Sun, May 24, 2015 at 01:12:41AM -0700, Nicolin Chen wrote: > > As commit 6c8ca30eec7b ("ASoC: fsl_ssi: Don't try to round-up for PM > > divisor calculation") mentioned that there's no more need t

Re: [alsa-devel] [PATCH] ASoC: fsl_spdif: Don't try to round-up for clock divisor calculation

2015-05-25 Thread Nicolin Chen
On Mon, May 25, 2015 at 12:13:45PM -0300, Fabio Estevam wrote: > Hi Nicolin, > > On Mon, May 25, 2015 at 12:11 PM, Nicolin Chen wrote: > > > Hi Mark, > > > > Is that possible for you to provisionally revert this patch? > > I wanted to wait for the test resu

Re: [alsa-devel] [PATCH] ASoC: fsl_spdif: Don't try to round-up for clock divisor calculation

2015-05-26 Thread Nicolin Chen
On Tue, May 26, 2015 at 07:02:48PM +0800, Zidan Wang wrote: > On Mon, May 25, 2015 at 08:24:25AM -0700, Nicolin Chen wrote: > > On Mon, May 25, 2015 at 12:13:45PM -0300, Fabio Estevam wrote: > > > Hi Nicolin, > > > > > > On Mon, May 25, 2015 at

Re: [PATCH] ASoC: fsl_ssi: Don't try to round-up for PM divisor calculation

2015-02-24 Thread Nicolin Chen
On Tue, Feb 24, 2015 at 05:26:42PM +0900, Mark Brown wrote: > On Sun, Feb 15, 2015 at 01:37:11AM -0800, Nicolin Chen wrote: > > According to i.MX6 Series Reference Manual, the formula to calculate > > the sys clock is > > This doesn't apply against current code, pleae

[PATCH] ASoC: fsl_ssi: Don't try to round-up for PM divisor calculation

2015-03-04 Thread Nicolin Chen
rted-by: Stephane Cerveau Signed-off-by: Nicolin Chen --- sound/soc/fsl/fsl_ssi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 05575f4..6b0c8f7 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -6

[PATCH] ASoC: fsl_ssi: Fix the incorrect limitation of the bit clock rate

2015-02-10 Thread Nicolin Chen
the incorrect limitation applied to the bit clock (baudclk) rate. Signed-off-by: Nicolin Chen --- sound/soc/fsl/fsl_ssi.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 059496e..d7365c5 100644 --- a/sound/soc/

[PATCH] ASoC: fsl-asoc-card: Add snd_soc_of_parse_audio_routing()

2015-02-12 Thread Nicolin Chen
This patch adds snd_soc_of_parse_audio_routing() to get dapm routes via Device Tree. Because snd_soc_of_parse_audio_routing() overrides dpam_routes, we use snd_soc_dapm_add_routes() to append the original build-in DPCM routes instead of linking them to dpam_routes directly. Signed-off-by: Nicolin

Re: [PATCH] ASoC: fsl-asoc-card: Add snd_soc_of_parse_audio_routing()

2015-02-13 Thread Nicolin Chen
On Sat, Feb 14, 2015 at 01:31:53PM +0900, Mark Brown wrote: > On Thu, Feb 12, 2015 at 01:30:02PM -0800, Nicolin Chen wrote: > > > This patch adds snd_soc_of_parse_audio_routing() to get dapm routes > > via Device Tree. Because snd_soc_of_parse_audio_routing() overrides >

Re: [PATCH] ASoC: fsl-asoc-card: Add snd_soc_of_parse_audio_routing()

2015-02-13 Thread Nicolin Chen
On Sat, Feb 14, 2015 at 02:32:12PM +0900, Mark Brown wrote: > On Fri, Feb 13, 2015 at 09:02:46PM -0800, Nicolin Chen wrote: > > On Sat, Feb 14, 2015 at 01:31:53PM +0900, Mark Brown wrote: > > > > How about having it just record that it should parse the given property > &

[PATCH 2/2] ASoC: fsl-asoc-card: Add snd_soc_of_parse_audio_routing()

2015-02-14 Thread Nicolin Chen
This patch adds snd_soc_of_parse_audio_routing() to get dapm routes configurations via Device Tree. Signed-off-by: Nicolin Chen --- sound/soc/fsl/fsl-asoc-card.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index 3f6959c

[PATCH 1/2] ASoC: core: Add extra dapm properties for Device Tree

2015-02-14 Thread Nicolin Chen
one, overrided by the other depending on which one was assigned later. This patch adds an extra pair of dapm_widgets and dapm_routes for DT use only so as to prevent unexpected overriding. Signed-off-by: Nicolin Chen --- include/sound/soc.h | 5 + sound/soc/soc-core.c | 16

[PATCH] ASoC: fsl_ssi: Don't try to round-up for PM divisor calculation

2015-02-15 Thread Nicolin Chen
rted-by: Stephane Cerveau Signed-off-by: Nicolin Chen --- [ I also checked that only 3.18 stable tree has the refinements for clk-divider driver, so I guess it might not be able to apply to previous long-term trees if being treated as bug fix. -- Nicolin ] sound/soc/fsl/fsl_ssi.c | 2 +- 1

Re: [alsa-devel][PATCH 1/3] SoC: fsl_sai: add sai master mode support

2015-01-20 Thread Nicolin Chen
On Tue, Jan 20, 2015 at 08:21:18PM +0800, Zidan Wang wrote: > +static int fsl_sai_set_bclk(struct snd_soc_dai *dai, bool tx, u32 freq) > + if ((tx && sai->synchronous[TX]) || (!tx && !sai->synchronous[RX])) { > + regmap_update_bits(sai->regmap, FSL_SAI_RCR2, > +

Re: [alsa-devel] [PATCH 0/3] Add master mode, tmd and right-j mode support

2015-01-20 Thread Nicolin Chen
On Tue, Jan 20, 2015 at 11:15:54PM -0200, Fabio Estevam wrote: > Not related to your series, but do you have a patch for imx6sx-sdb.dts > that adds sai support? > > In the FSL version they use 'fsl,sdma-event-remap' property to specify > the SAI sdma channels, but this is not present in mainline?

Re: [alsa-devel][PATCH 1/3] SoC: fsl_sai: add sai master mode support

2015-01-21 Thread Nicolin Chen
On Wed, Jan 21, 2015 at 05:25:32PM +0800, Zidan Wang wrote: > On Tue, Jan 20, 2015 at 10:07:03PM -0800, Nicolin Chen wrote: > > On Tue, Jan 20, 2015 at 08:21:18PM +0800, Zidan Wang wrote: > > > + if ((tx && sai->synchronous[TX]) ||

Re: [alsa-devel][PATCH 2/3] ASoC: fsl_sai: Add support for tdm slots operation

2015-01-21 Thread Nicolin Chen
On Tue, Jan 20, 2015 at 08:21:19PM +0800, Zidan Wang wrote: > @@ -369,10 +380,25 @@ static int fsl_sai_hw_params(struct snd_pcm_substream > *substream, > u32 word_width = snd_pcm_format_width(params_format(params)); > u32 val_cr4 = 0, val_cr5 = 0; > int ret; > + u32 bclk; > +

Re: [alsa-devel][PATCH 3/3] ASoC: fsl_sai: Add support for Right-J mode

2015-01-21 Thread Nicolin Chen
On Tue, Jan 20, 2015 at 08:21:20PM +0800, Zidan Wang wrote: > Add Right-J mode and set TCR5 FBT bit to let data right justify. > > Signed-off-by: Zidan Wang > - if (sai->is_lsb_first) > + if (sai->is_lsb_first && sai->is_right_j_mode) > val_cr5 |= FSL_SAI_CR5_FBT(0); Are y

Re: [alsa-devel][PATCH 2/3] ASoC: fsl_sai: Add support for tdm slots operation

2015-01-21 Thread Nicolin Chen
On Thu, Jan 22, 2015 at 12:55:35PM +0800, Zidan Wang wrote: > On Wed, Jan 21, 2015 at 10:08:03AM -0800, Nicolin Chen wrote: > > On Tue, Jan 20, 2015 at 08:21:19PM +0800, Zidan Wang wrote: > > > @@ -369,10 +380,25 @@ static int fsl_sai_hw_params(struct > > > s

Re: [alsa-devel][PATCH 3/3] ASoC: fsl_sai: Add support for Right-J mode

2015-01-21 Thread Nicolin Chen
On Thu, Jan 22, 2015 at 01:13:46PM +0800, Zidan Wang wrote: > On Wed, Jan 21, 2015 at 10:53:20AM -0800, Nicolin Chen wrote: > > On Tue, Jan 20, 2015 at 08:21:20PM +0800, Zidan Wang wrote: > > > Add Right-J mode and set TCR5 FBT bit to let data right justify. > > > >

Re: [PATCH 1/1] ASoC: fsl: imx-pcm-fiq: use correct format specifier

2016-04-12 Thread Nicolin Chen
On Tue, Apr 12, 2016 at 10:51:03PM +0200, Heinrich Schuchardt wrote: > Documentation/printk-formats.txt has > size_t: use %zu or %zx > > runtime->dma_bytes is of type size_t. > > Signed-off-by: Heinrich Schuchardt Acked-by: Nicolin Chen > --- > sound/soc/fsl/imx

Re: [PATCH V2 3/3] ASoC: fsl_asrc: spba clock is needed by asrc device

2015-11-20 Thread Nicolin Chen
On Fri, Nov 20, 2015 at 08:29:46AM -0600, Rob Herring wrote: > On Fri, Nov 20, 2015 at 02:17:53PM +0800, Shengjiu Wang wrote: > > ASRC need to enable the spba clock, when sdma is using share peripheral > > script. In this case, there is two spba master port is used, if don't > > enable the clock, t

Re: [PATCH V3 1/3] ASoC: fsl_esai: spba clock is needed by esai device

2015-11-24 Thread Nicolin Chen
On Tue, Nov 24, 2015 at 03:03:28PM +0800, Shengjiu Wang wrote: > @@ -469,6 +471,9 @@ static int fsl_esai_startup(struct snd_pcm_substream > *substream, > ret = clk_prepare_enable(esai_priv->coreclk); > if (ret) > return ret; > + ret = clk_prepare_enable(esai_priv->sp

Re: [PATCH V4 0/3] add spba clock for fsl audio IP

2015-11-24 Thread Nicolin Chen
by spdif device > ASoC: fsl_asrc: spba clock is needed by asrc device For all three, Acked-by: Nicolin Chen > > Documentation/devicetree/bindings/sound/fsl,asrc.txt | 5 + > Documentation/devicetree/bindings/sound/fsl,esai.txt | 5 + > Documentation/devic

Re: [alsa-devel] [PATCH] ASoC: fsl_sai: Fix noise when using EDMA

2019-09-09 Thread Nicolin Chen
On Fri, Sep 06, 2019 at 09:46:12AM +0300, Daniel Baluta wrote: > On Fri, Sep 6, 2019 at 4:25 AM Nicolin Chen wrote: > > > > On Fri, Aug 30, 2019 at 11:09:00PM +0300, Daniel Baluta wrote: > > > From: Mihai Serban > > > > > > EDMA requires the period size

Re: [PATCH 1/3] ASoC: fsl_asrc: Use in(out)put_format instead of in(out)put_word_width

2019-09-09 Thread Nicolin Chen
On Mon, Sep 09, 2019 at 06:33:19PM -0400, Shengjiu Wang wrote: > snd_pcm_format_t is more formal than enum asrc_word_width, which has > two property, width and physical width, which is more accurate than > enum asrc_word_width. So it is better to use in(out)put_format > instead of in(out)put_word_w

Re: [PATCH 2/3] ASoC: fsl_asrc: update supported sample format

2019-09-09 Thread Nicolin Chen
On Mon, Sep 09, 2019 at 06:33:20PM -0400, Shengjiu Wang wrote: > The ASRC support 24bit/16bit/8bit input width, so S20_3LE format > should not be supported, it is word width is 20bit. I thought 3LE used 24-bit physical width. And the driver assigns ASRC_WIDTH_24_BIT to "width" for all non-16bit ca

Re: [PATCH 3/3] ASoC: fsl_asrc: Fix error with S24_3LE format bitstream in i.MX8

2019-09-09 Thread Nicolin Chen
On Mon, Sep 09, 2019 at 06:33:21PM -0400, Shengjiu Wang wrote: > There is error "aplay: pcm_write:2023: write error: Input/output error" > on i.MX8QM/i.MX8QXP platform for S24_3LE format. > > In i.MX8QM/i.MX8QXP, the DMA is EDMA, which don't support 24bit > sample, but we didn't add any constraint

Re: [PATCH v2] mmc: tegra: Implement enable_dma() to set dma_mask

2019-08-15 Thread Nicolin Chen
On Thu, Aug 15, 2019 at 02:48:20PM +0300, Adrian Hunter wrote: > On 14/08/19 3:57 AM, Nicolin Chen wrote: > > [ Integrated the change and commit message made by Thierry Reding ] > > > > The SDHCI controller found in early Tegra SoCs (from Tegra20 through > > Tegra114) u

Re: regression in ath10k dma allocation

2019-08-16 Thread Nicolin Chen
27;d have to dig deeper: > > > > commit dd3dcede9fa0a0b661ac1f24843f4a1b1317fdb6 > > Author: Nicolin Chen > > Date: Wed May 29 17:54:25 2019 -0700 > > > > dma-contiguous: fix !CONFIG_DMA_CMA version of dma_{alloc, > > free}_contiguous() > yes CON

Re: [PATCH] ASoC: fsl_sai: Fix noise when using EDMA

2019-09-05 Thread Nicolin Chen
On Fri, Aug 30, 2019 at 11:09:00PM +0300, Daniel Baluta wrote: > From: Mihai Serban > > EDMA requires the period size to be multiple of maxburst. Otherwise the > remaining bytes are not transferred and thus noise is produced. > > We can handle this issue by adding a constraint on > SNDRV_PCM_HW_

Re: [PATCH] ASoC: fsl_sai: Implement set_bclk_ratio

2019-09-05 Thread Nicolin Chen
On Sat, Aug 31, 2019 at 12:59:10AM +0300, Daniel Baluta wrote: > From: Viorel Suman > > This is to allow machine drivers to set a certain bitclk rate > which might not be exactly rate * frame size. Just a quick thought of mine: slot_width and slots could be set via set_dai_tdm_slot() actually, w

<    1   2   3   4   5   6   7   8   9   10   >