Re: [PATCH v2 3/3] ASoC: fsl_easrc: Add EASRC ASoC CPU DAI and platform drivers

2020-02-25 Thread Nicolin Chen
On Mon, Feb 24, 2020 at 08:53:25AM +, S.j. Wang wrote: > Hi > > > > > > > Signed-off-by: Shengjiu Wang > > > --- > > > sound/soc/fsl/Kconfig | 10 + > > > sound/soc/fsl/Makefile |2 + > > > sound/soc/fsl/fsl_asrc_common.h |1 + > > > sound/soc/fsl/fsl_easrc.c

Re: [PATCH v2 3/3] ASoC: fsl_easrc: Add EASRC ASoC CPU DAI and platform drivers

2020-02-18 Thread Nicolin Chen
On Tue, Feb 18, 2020 at 02:39:37PM +0800, Shengjiu Wang wrote: > EASRC (Enhanced Asynchronous Sample Rate Converter) is a new IP module > found on i.MX8MN. It is different with old ASRC module. > > The primary features for the EASRC are as follows: > - 4 Contexts - groups of channels with an indep

Re: [PATCH v2 2/3] ASoC: dt-bindings: fsl_easrc: Add document for EASRC

2020-02-18 Thread Nicolin Chen
On Tue, Feb 18, 2020 at 02:39:36PM +0800, Shengjiu Wang wrote: > EASRC (Enhanced Asynchronous Sample Rate Converter) is a new > IP module found on i.MX8MN. > > Signed-off-by: Shengjiu Wang > --- > .../devicetree/bindings/sound/fsl,easrc.txt | 57 +++ > 1 file changed, 57 insert

Re: [PATCH resend] ASoC: fsl_audmix: add missed pm_runtime_disable

2019-12-04 Thread Nicolin Chen
On Tue, Dec 03, 2019 at 07:13:03PM +0800, Chuhong Yuan wrote: > The driver forgets to call pm_runtime_disable in probe failure > and remove. > Add the missed calls to fix it. > > Signed-off-by: Chuhong Yuan Acked-by: Nicolin Chen Thanks > --- > sound/soc/fsl/fsl_audmix

Re: [PATCH] ASoC: fsl_sai: add IRQF_SHARED

2019-12-04 Thread Nicolin Chen
On Thu, Nov 28, 2019 at 11:38:02PM +0100, Michael Walle wrote: > The LS1028A SoC uses the same interrupt line for adjacent SAIs. Use > IRQF_SHARED to be able to use these SAIs simultaneously. > > Signed-off-by: Michael Walle Acked-by: Nicolin Chen Thanks > --- > sound/soc

Re: [PATCH V3 2/2] ASoC: fsl_asrc: Add support for imx8qm

2019-11-13 Thread Nicolin Chen
rc_soc_data for different soc usage. > > The EDMA channel is fixed with each dma request, one dma request > corresponding to one dma channel. So we need to request dma > channel with dma request of asrc module. > > Signed-off-by: Shengjiu Wang Two small comments inline. Once they are a

Re: [PATCH] ASoC: fsl_audmix: Add spin lock to protect tdms

2019-11-08 Thread Nicolin Chen
x3, but sometimes the > result is 0x2, or 0x1. Feels like a bug fix to me, so might be better to have a "Fixes" line and CC stable tree? Anyway, change looks good to me: Acked-by: Nicolin Chen Thanks > Signed-off-by: Shengjiu Wang > --- > sound/soc/fsl/fsl_audmix.c |

Re: [PATCH 2/2] ASoC: fsl_asrc: Add support for imx8qm

2019-10-30 Thread Nicolin Chen
/* Get DMA request of Front-End */ > tmp_chan = fsl_asrc_get_dma_channel(pair, dir); > tmp_data = tmp_chan->private; > pair->dma_data.dma_request2 = tmp_data->dma_request; > pair->dma_data.peripheral_type = tmp_data->peripheral_type; > pair->dma_data.priority = tmp_data->priority; > dma_release_channel(tmp_chan); > } Oh...now I understand..yea, I think this would be better. Would you please change it in v2? I am fine with other places, so may add: Acked-by: Nicolin Chen Thanks

Re: [PATCH 2/2] ASoC: fsl_asrc: Add support for imx8qm

2019-10-29 Thread Nicolin Chen
On Tue, Oct 29, 2019 at 05:17:09PM +0800, Shengjiu Wang wrote: > There are two asrc module in imx8qm, each module has different > clock configuration, and the DMA type is EDMA. > > So in this patch, we define the new clocks, refine the clock map, > and include struct fsl_asrc_soc_data for differen

Re: [PATCH V2] ASoC: fsl_asrc: refine the setting of internal clock divider

2019-10-25 Thread Nicolin Chen
an 1024. > > Signed-off-by: Shengjiu Wang And some comments inline. Please add my ack once they are fixed: Acked-by: Nicolin Chen Thanks > diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c > index 0bf91a6f54b9..89cf333154c7 100644 > --- a/sound/soc/fsl/fsl_asrc.

Re: [PATCH V2] ASoC: fsl_esai: Add spin lock to protect reset, stop and start

2019-10-25 Thread Nicolin Chen
> > This issue may also happen with trigger->fsl_esai_trigger_start. > > So Add spin lock to lock those functions. > > Fixes: 7ccafa2b3879 ("ASoC: fsl_esai: recover the channel swap after xrun") > Signed-off-by: Shengjiu Wang Some small comments inline. Once t

Re: [PATCH] ASoC: fsl_asrc: refine the setting of internal clock divider

2019-10-24 Thread Nicolin Chen
On Fri, Oct 25, 2019 at 05:33:17AM +, S.j. Wang wrote: > > > > > + pair_err("The divider can't be used for non ideal > > > > > mode\n"); > > > > > + return -EINVAL; > > > > > + } > > > > > + > > > > > + /* Divider range is [1, 1024] */ > > > > > + div[IN] =

Re: [PATCH] ASoC: fsl_asrc: refine the setting of internal clock divider

2019-10-23 Thread Nicolin Chen
On Wed, Oct 23, 2019 at 06:25:20AM +, S.j. Wang wrote: > > On Thu, Oct 17, 2019 at 02:21:08PM +0800, Shengjiu Wang wrote: > > > For P2P output, the output divider should align with the output sample > > > > I think we should avoid "P2P" (or "M2M") keyword in the mainline code as > > we know M2

Re: [PATCH] ASoC: fsl_esai: Add spin lock to protect reset and stop

2019-10-23 Thread Nicolin Chen
On Wed, Oct 23, 2019 at 03:29:49PM +0800, Shengjiu Wang wrote: > xrun may happen at the end of stream, the > trigger->fsl_esai_trigger_stop maybe called in the middle of > fsl_esai_hw_reset, this may cause esai in wrong state > after stop, and there may be endless xrun interrupt. What about fsl_es

Re: [PATCH] ASoC: fsl_asrc: refine the setting of internal clock divider

2019-10-17 Thread Nicolin Chen
Hello Shengjiu, On Thu, Oct 17, 2019 at 02:21:08PM +0800, Shengjiu Wang wrote: > For P2P output, the output divider should align with the output sample I think we should avoid "P2P" (or "M2M") keyword in the mainline code as we know M2M will never get merged while somebody working with the mainli

Re: [PATCH v2 -next] ASoC: fsl_mqs: Move static keyword to the front of declarations

2019-10-11 Thread Nicolin Chen
On Fri, Oct 11, 2019 at 10:35:38PM +0800, YueHaibing wrote: > gcc warn about this: > > sound/soc/fsl/fsl_mqs.c:146:1: warning: > static is not at beginning of declaration [-Wold-style-declaration] > > Signed-off-by: YueHaibing Acked-by: Nicolin Chen > ---

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

2019-09-26 Thread Nicolin Chen
sample, but we didn't add any constraint, that cause issues. > > So we need to query the caps of dma, then update the hw parameters > according to the caps. > > Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen > --- > sound/soc/fsl/fsl_asrc.c | 4 +-- > sound/soc

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

2019-09-25 Thread Nicolin Chen
Just a small concern... On Thu, Sep 26, 2019 at 09:29:51AM +0800, Shengjiu Wang wrote: > static int fsl_asrc_dma_startup(struct snd_pcm_substream *substream) > { > + > + release_pair = false; > + ret = snd_soc_set_runtime_hwparams(substream, &snd_imx_hardware); This set_runtime_hwparams

Re: [PATCH V4 3/4] ASoC: pcm_dmaengine: Extract snd_dmaengine_pcm_refine_runtime_hwparams

2019-09-24 Thread Nicolin Chen
parate function > snd_dmaengine_pcm_refine_runtime_hwparams, that other components > which need this feature can call this function. > > Signed-off-by: Shengjiu Wang Looks good to me. Reviewed-by: Nicolin Chen

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

2019-09-24 Thread Nicolin Chen
On Tue, Sep 24, 2019 at 06:52:35PM +0800, 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 V3 4/4] ASoC: fsl_asrc: Fix error with S24_3LE format bitstream in i.MX8

2019-09-20 Thread Nicolin Chen
Hello Shengjiu, One issue for error-out and some nit-pickings inline. Thanks. On Thu, Sep 19, 2019 at 08:11:42PM +0800, 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 D

Re: [PATCH V3 3/4] ASoC: pcm_dmaengine: Extract snd_dmaengine_pcm_refine_runtime_hwparams

2019-09-20 Thread Nicolin Chen
On Thu, Sep 19, 2019 at 08:11:41PM +0800, Shengjiu Wang wrote: > When set the runtime hardware parameters, we may need to query > the capability of DMA to complete the parameters. > > This patch is to Extract this operation from > dmaengine_pcm_set_runtime_hwparams function to a separate function

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

2019-09-19 Thread Nicolin Chen
; is the volume is lower than expected, it likes 24bit data > right shift 4 bits > > So replace S20_3LE with S24_3LE in supported list and add S8 > format in TX supported list > > Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen > --- > sound/soc/fsl/fsl_asrc.c | 5 +

Re: [PATCH V2 2/2] ASoC: fsl_mqs: Add MQS component driver

2019-09-16 Thread Nicolin Chen
Tx section. > > Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen > --- > Changes in v2 > - use devm_platform_ioremap_resource > > sound/soc/fsl/Kconfig | 10 ++ > sound/soc/fsl/Makefile | 2 + > sound/soc/fsl/fsl_mqs.c | 333

Re: [PATCH V2 1/2] ASoC: fsl_mqs: add DT binding documentation

2019-09-16 Thread Nicolin Chen
On Fri, Sep 13, 2019 at 05:42:13PM +0800, Shengjiu Wang wrote: > Add the DT binding documentation for NXP MQS driver > > Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen > --- > Changes in v2 > -refine the comments for properties > > .../devicetree/bindings/so

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

2019-09-16 Thread Nicolin Chen
On Fri, Sep 13, 2019 at 05:48:40AM +, S.j. Wang wrote: > Hi > > > > > On Tue, Sep 10, 2019 at 02:07:25AM +, S.j. Wang wrote: > > > > 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 n

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

2019-09-12 Thread Nicolin Chen
On Wed, Sep 11, 2019 at 12:08:07PM +0100, Mark Brown wrote: > On Mon, Sep 09, 2019 at 06:52:13PM -0700, Nicolin Chen wrote: > > > And a quick feeling is that below code is mostly identical to what > > is in the soc-generic-dmaengine-pcm.c file. So I'm wondering if we >

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

2019-09-12 Thread Nicolin Chen
On Tue, Sep 10, 2019 at 02:07:25AM +, S.j. Wang wrote: > > 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

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

2019-09-12 Thread Nicolin Chen
On Tue, Sep 10, 2019 at 02:22:06AM +, S.j. Wang wrote: > Hi > > > > > 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 > > > e

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

2019-09-12 Thread Nicolin Chen
ad of in(out)put_word_width. > > Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen > --- > sound/soc/fsl/fsl_asrc.c | 56 +++- > sound/soc/fsl/fsl_asrc.h | 4 +-- > 2 files changed, 40 insertions(+), 20 deletions(-) > > diff --git a/soun

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 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 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 1/2] ASoC: fsl_esai: Add compatible string for imx6ull

2019-08-09 Thread Nicolin Chen
On Fri, Aug 09, 2019 at 06:27:46PM +0800, Shengjiu Wang wrote: > Add compatible string for imx6ull, from imx6ull platform, > the issue of channel swap after xrun is fixed in hardware. > > Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen > --- > sound/soc/fsl/fsl_esai

Re: [PATCH 2/2] ASoC: fsl_esai: Add new compatible string for imx6ull

2019-08-09 Thread Nicolin Chen
On Fri, Aug 09, 2019 at 06:27:47PM +0800, Shengjiu Wang wrote: > Add new compatible string "fsl,imx6ull-esai" in the binding document. > > Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen > --- > Documentation/devicetree/bindings/sound/fsl,esai.txt | 7 +++

Re: [alsa-devel] [PATCH 08/10] ASoC: dt-bindings: Document fcomb_mode property

2019-07-25 Thread Nicolin Chen
On Thu, Jul 25, 2019 at 09:02:22AM +0300, Daniel Baluta wrote: > On Thu, Jul 25, 2019 at 2:22 AM Nicolin Chen wrote: > > > > On Mon, Jul 22, 2019 at 03:48:31PM +0300, Daniel Baluta wrote: > > > This allows combining multiple-data-line FIFOs into a > > > single-d

Re: [PATCH 09/10] ASoC: fsl_sai: Add support for SAI new version

2019-07-24 Thread Nicolin Chen
On Mon, Jul 22, 2019 at 03:48:32PM +0300, Daniel Baluta wrote: > New IP version introduces Version ID and Parameter registers > and optionally added Timestamp feature. > > VERID and PARAM registers are placed at the top of registers > address space and some registers are shifted according to > the

Re: [PATCH 08/10] ASoC: dt-bindings: Document fcomb_mode property

2019-07-24 Thread Nicolin Chen
On Mon, Jul 22, 2019 at 03:48:31PM +0300, Daniel Baluta wrote: > This allows combining multiple-data-line FIFOs into a > single-data-line FIFO. > > Signed-off-by: Daniel Baluta > --- > Documentation/devicetree/bindings/sound/fsl-sai.txt | 4 This should be sent to devicetree mail-list also.

Re: [PATCH 06/10] ASoC: dt-bindings: Document dl_mask property

2019-07-24 Thread Nicolin Chen
On Mon, Jul 22, 2019 at 03:48:29PM +0300, Daniel Baluta wrote: > SAI supports up to 8 data lines. This property let the user > configure how many data lines should be used per transfer > direction (Tx/Rx). > > Signed-off-by: Daniel Baluta > --- > Documentation/devicetree/bindings/sound/fsl-sai.t

Re: [PATCH 01/10] ASoC: fsl_sai: add of_match data

2019-07-24 Thread Nicolin Chen
On Mon, Jul 22, 2019 at 03:48:24PM +0300, Daniel Baluta wrote: > From: Lucas Stach > > New revisions of the SAI IP block have even more differences that need > be taken into account by the driver. To avoid sprinking compatible > checks all over the driver move the current differences into of_matc

Re: [PATCH V4 2/2] ASoC: fsl_esai: recover the channel swap after xrun

2019-07-11 Thread Nicolin Chen
n underrun/overrun happens, channel swap may occur. > The only recovery mechanism is to reset the ESAI." > > This issue exist in imx3/imx5/imx6(partial) series. > > In this commit add a tasklet to handle reset of ESAI > after xrun happens to recover the channel swap. > >

Re: [PATCH V3 2/2] ASoC: fsl_esai: recover the channel swap after xrun

2019-07-10 Thread Nicolin Chen
Hi Shengjiu, Mostly looks good to me, just some small comments. On Mon, Jul 08, 2019 at 02:38:52PM +0800, shengjiu.w...@nxp.com wrote: > +static void fsl_esai_hw_reset(unsigned long arg) > +{ > + struct fsl_esai *esai_priv = (struct fsl_esai *)arg; > + u32 saisr, tfcr, rfcr; > + bo

Re: [PATCH V2 2/2] ASoC: fsl_esai: recover the channel swap after xrun

2019-07-08 Thread Nicolin Chen
On Fri, Jul 05, 2019 at 07:03:47AM +, S.j. Wang wrote: > > > > > + > > > + /* restore registers by regcache_sync */ > > > + fsl_esai_register_restore(esai_priv); > > > + > > > + regmap_update_bits(esai_priv->regmap, REG_ESAI_TCR, > > > +ESAI_xCR_xPR_MASK, 0)

Re: [PATCH V2 2/2] ASoC: fsl_esai: recover the channel swap after xrun

2019-07-03 Thread Nicolin Chen
On Wed, Jul 03, 2019 at 02:42:05PM +0800, shengjiu.w...@nxp.com wrote: > From: Shengjiu Wang > > There is chip errata ERR008000, the reference doc is > (https://www.nxp.com/docs/en/errata/IMX6DQCE.pdf), > > The issue is "While using ESAI transmit or receive and > an underrun/overrun happens, cha

Re: [PATCH V2 1/2] ASoC: fsl_esai: Wrap some operations to be functions

2019-07-03 Thread Nicolin Chen
Looks good to me, yet two small comments inline. Please add this to this patch in the next version: Acked-by: Nicolin Chen On Wed, Jul 03, 2019 at 02:42:04PM +0800, shengjiu.w...@nxp.com wrote: > +static int fsl_esai_register_restore(struct fsl_esai *esai_priv) > +{ > +

Re: [RFC/RFT PATCH v2] ASoC: fsl_esai: Revert "ETDR and TX0~5 registers are non volatile"

2019-06-12 Thread Nicolin Chen
t value list while the original commit also > > changed other entries in the list. And this patch isn't very necessary to Cc > > stable tree since there has been always a FIFO reset operation around the > > regcache_sync() call, even prior to this reverted commit. > > >

[RFC/RFT PATCH v2] ASoC: fsl_esai: Revert "ETDR and TX0~5 registers are non volatile"

2019-06-07 Thread Nicolin Chen
registers remaining in the default value list while the original commit also changed other entries in the list. And this patch isn't very necessary to Cc stable tree since there has been always a FIFO reset operation around the regcache_sync() call, even prior to this reverted commit. Signed-

Re: [RFC/RFT PATCH] Revert "ASoC: fsl_esai: ETDR and TX0~5 registers are non volatile"

2019-06-07 Thread Nicolin Chen
Hello Mark, On Fri, Jun 07, 2019 at 12:12:44PM +0100, Mark Brown wrote: > On Thu, Jun 06, 2019 at 04:01:05PM -0700, Nicolin Chen wrote: > > This reverts commit 8973112aa41b8ad956a5b47f2fe17bc2a5cf2645. > > Please use subject lines matching the style for the subsystem. This > m

[RFC/RFT PATCH] Revert "ASoC: fsl_esai: ETDR and TX0~5 registers are non volatile"

2019-06-06 Thread Nicolin Chen
entries in the list. And this patch isn't very necessary to Cc stable tree since there has been always a FIFO reset operation around the regcache_sync() call, even prior to this reverted commit. Signed-off-by: Nicolin Chen Cc: Shengjiu Wang --- Hi Mark, In case there's no objection aga

Re: [PATCH] ASoC: fsl_esai: fix the channel swap issue after xrun

2019-06-05 Thread Nicolin Chen
Hello Shengjiu, On Wed, Jun 05, 2019 at 10:29:37AM +, S.j. Wang wrote: > > > ETDR is not volatile, if we mark it is volatile, is it correct? > > > > Well, you have a point -- it might not be ideally true, but it sounds like a > > correct fix to me according to this comments. > > > > We can

Re: [PATCH] ASoC: fsl_esai: fix the channel swap issue after xrun

2019-05-23 Thread Nicolin Chen
On Thu, May 23, 2019 at 11:04:03AM +, S.j. Wang wrote: > > On Thu, May 23, 2019 at 09:53:42AM +, S.j. Wang wrote: > > > > > + /* > > > > > + * Add fifo reset here, because the regcache_sync will > > > > > + * write one more data to ETDR. > > > > > + * Which will cause cha

Re: [PATCH] ASoC: fsl_esai: fix the channel swap issue after xrun

2019-05-23 Thread Nicolin Chen
Hello Shengjiu, On Thu, May 23, 2019 at 09:53:42AM +, S.j. Wang wrote: > > > + /* > > > + * Add fifo reset here, because the regcache_sync will > > > + * write one more data to ETDR. > > > + * Which will cause channel shift. > > > > Sounds like a bug to me...should fix it f

Re: [PATCH] ASoC: fsl_esai: fix the channel swap issue after xrun

2019-05-17 Thread Nicolin Chen
On Fri, May 17, 2019 at 03:09:22AM +, S.j. Wang wrote: > There is chip errata ERR008000, the reference doc is > (https://www.nxp.com/docs/en/errata/IMX6DQCE.pdf), > > The issue is "While using ESAI transmit or receive and > an underrun/overrun happens, channel swap may occur. > The only recove

Re: [EXT] Re: [PATCH V4] ASoC: fsl_esai: Add pm runtime function

2019-05-03 Thread Nicolin Chen
Hi Mark, On Fri, May 03, 2019 at 01:27:31PM +0900, Mark Brown wrote: > On Thu, May 02, 2019 at 09:13:58AM +, S.j. Wang wrote: > > > I am checking, but I don't know why this patch failed in your side. I > > Tried to apply this patch on for-5.1, for 5.2, for-linus and for-next, > > all are

[PATCH v5] ASoC: fsl_esai: Add pm runtime function

2019-05-03 Thread Nicolin Chen
ned-off-by: Nicolin Chen --- Changes in v5 -Replaced my Acked-by with Signed-off-by as a resend. Changes in v4 -resend base on for-5.2 Changes in v3 -refine the commit comments. -add acked-by Changes in v2 -refine the commit comments. -move regcache_mark_dirty to runtime suspend. sound/soc/fsl/

Re: [EXT] Re: [PATCH V4] ASoC: fsl_esai: Add pm runtime function

2019-05-02 Thread Nicolin Chen
On Thu, May 02, 2019 at 09:13:58AM +, S.j. Wang wrote: > > On Sun, Apr 28, 2019 at 02:24:54AM +, S.j. Wang wrote: > > > Add pm runtime support and move clock handling there. > > > Close the clocks at suspend to reduce the power consumption. > > > > > > fsl_esai_suspend is replaced by pm_run

[PATCH] ASoC: fsl_sai: Add missing return 0 in remove()

2019-04-25 Thread Nicolin Chen
("ASoC: fsl_sai: Add support for runtime pm") Reported-by: Stephen Rothwell Signed-off-by: Nicolin Chen --- sound/soc/fsl/fsl_sai.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index 26c27dc..8593269 100644 --- a/sound/soc/fsl

Re: [PATCH 2/2] ASoC: fsl: Move clock operation to PM runtime

2019-04-22 Thread Nicolin Chen
On Mon, Apr 22, 2019 at 11:02:22AM +, Viorel Suman wrote: > Hi Nicolin, > > On Sb, 2019-04-20 at 22:54 -0700, Nicolin Chen wrote: > > On Sat, Apr 20, 2019 at 03:59:05PM +, Daniel Baluta wrote: > > > > > > Turn off/on clocks when device enters suspend/resu

Re: [PATCH V5 2/3] ASoC: fsl_asrc: replace the process_option table with function

2019-04-21 Thread Nicolin Chen
ocessing options according to the > > > sample rate. > > > > > > Signed-off-by: Shengjiu Wang > > > > A couple of more small comments. > > > > And please add this when you resend: > > Acked-by: Nicolin Chen > > > > > + * U

Re: [PATCH V5 3/3] ASoC: fsl_asrc: Unify the supported input and output rate

2019-04-21 Thread Nicolin Chen
On Mon, Apr 22, 2019 at 02:32:38AM +, S.j. Wang wrote: > Unify the supported input and output rate, add the > 12kHz/24kHz/128kHz to the support list > > Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Thank you

Re: [PATCH V5 2/3] ASoC: fsl_asrc: replace the process_option table with function

2019-04-21 Thread Nicolin Chen
gt; > We got a function fsl_asrc_sel_proc to replace the table, which can > give the pre-processing and post-processing options according to > the sample rate. > > Signed-off-by: Shengjiu Wang A couple of more small comments. And please add this when you resend: Acked-by: Nicoli

Re: [PATCH V5 1/3] ASoC: fsl_asrc: Fix the issue about unsupported rate

2019-04-21 Thread Nicolin Chen
On Mon, Apr 22, 2019 at 02:32:32AM +, S.j. Wang wrote: > When the output sample rate is [8kHz, 30kHz], the limitation > of the supported ratio range is (1/24, 8). In the driver Should be [1/24, 8]. Otherwise, Acked-by: Nicolin Chen Thanks > we use (8kHz, 30kHz) instead of [8k

Re: [PATCH 3/3 v3] ASoC: fsl_sai: Move clock operation to PM runtime

2019-04-21 Thread Nicolin Chen
se mclk is externally provided. > > Signed-off-by: Shengjiu Wang > Signed-off-by: Daniel Baluta Acked-by: Nicolin Chen Thanks

Re: [PATCH 1/3 v2] ASoC: fsl_sai: Update is_slave_mode with correct value

2019-04-21 Thread Nicolin Chen
on true > although SAI being master it should be set to false. > > Fix this by updating is_slave_mode for each call of > fsl_sai_set_dai_fmt. > > Signed-off-by: Daniel Baluta Acked-by: Nicolin Chen Thanks > --- > sound/soc/fsl/fsl_sai.c | 2 ++ > 1 file change

Re: [PATCH 2/3 v2] ASoC: fsl_sai: Add support for runtime pm

2019-04-21 Thread Nicolin Chen
On Sun, Apr 21, 2019 at 07:39:09PM +, Daniel Baluta wrote: > Basically the same actions as for system PM, so make use > of pm_runtime_force_suspend/pm_runtime_force_resume. > > Signed-off-by: Shengjiu Wang > Signed-off-by: Daniel Baluta Acked-by: Nicolin Chen Thanks >

Re: [alsa-devel] [PATCH] ASoC: fsl: sai: Fix clock source for mclk0

2019-04-21 Thread Nicolin Chen
On Sun, Apr 21, 2019 at 01:04:39AM -0700, Nicolin Chen wrote: > On Sun, Apr 21, 2019 at 10:26:40AM +0300, Daniel Baluta wrote: > > > Firstly, according to your commit message, neither imx8qm nor > > > imx6sx has an "mclk0" clock in the clock list. Either of the

Re: [alsa-devel] [PATCH] ASoC: fsl: sai: Fix clock source for mclk0

2019-04-21 Thread Nicolin Chen
On Sun, Apr 21, 2019 at 10:26:40AM +0300, Daniel Baluta wrote: > > Firstly, according to your commit message, neither imx8qm nor > > imx6sx has an "mclk0" clock in the clock list. Either of them > > starts with "mclk1". So, before you change the driver, I don't > > think it's even a right thing to

Re: [PATCH 2/2] ASoC: fsl: Move clock operation to PM runtime

2019-04-20 Thread Nicolin Chen
On Sat, Apr 20, 2019 at 03:59:05PM +, Daniel Baluta wrote: > Turn off/on clocks when device enters suspend/resume. This > helps saving power. > @@ -934,6 +933,25 @@ static int fsl_sai_runtime_suspend(struct device *dev) > static int fsl_sai_runtime_resume(struct device *dev) > { > stru

Re: [PATCH 1/2] ASoC: fsl: sai: Add support for runtime pm

2019-04-20 Thread Nicolin Chen
On Sat, Apr 20, 2019 at 03:59:04PM +, Daniel Baluta wrote: > @@ -898,6 +899,8 @@ static int fsl_sai_probe(struct platform_device *pdev) > > platform_set_drvdata(pdev, sai); > > + pm_runtime_enable(&pdev->dev); You will need pm_runtime_disable() somewhere, like remove(). Thanks

Re: [PATCH 0/2] Add runtime PM for SAI digital audio interface

2019-04-20 Thread Nicolin Chen
On Sat, Apr 20, 2019 at 03:59:03PM +, Daniel Baluta wrote: > First patch uses system PM handlers to implement runtime PM. While > the second patch moves clock handling from startup/shutdown to runtime > PM handlers. > > ASoC: fsl: sai: Add support for runtime pm > ASoC: fsl: Move clock ope

Re: [PATCH] ASoC: fsl: sai: Fix clock source for mclk0

2019-04-20 Thread Nicolin Chen
By following the pattern of previous Subjects: ASoC: fsl_sai: Fix clock Source for mclk0 On Sat, Apr 20, 2019 at 03:41:04PM +, Daniel Baluta wrote: > SAI provide multiple master clock source options selectable > via bit MSEL of TCR2/RCR2. > > All possible master clock sources are stored in sa

Re: [PATCH V4 3/3] ASoC: fsl_asrc: Unify the supported input and output rate

2019-04-20 Thread Nicolin Chen
On Sat, Apr 20, 2019 at 07:23:59AM +, S.j. Wang wrote: > > > /* Validate input and output sample rates */ > > > - for (in = 0; in < ARRAY_SIZE(supported_input_rate); in++) > > > - if (inrate == supported_input_rate[in]) > > > + for (in = 0; in < ARRAY_SIZE(supported_as

Re: [PATCH V4 3/3] ASoC: fsl_asrc: Unify the supported input and output rate

2019-04-19 Thread Nicolin Chen
On Fri, Apr 19, 2019 at 10:23:56AM +, S.j. Wang wrote: > Unify the supported input and output rate, add the > 12kHz/24kHz/128kHz to the support list > > Signed-off-by: Shengjiu Wang > --- > sound/soc/fsl/fsl_asrc.c | 32 +++- > 1 file changed, 19 insertions(+), 13

Re: [PATCH V4 2/3] ASoC: fsl_asrc: replace the process_option table with function

2019-04-19 Thread Nicolin Chen
On Fri, Apr 19, 2019 at 10:23:53AM +, S.j. Wang wrote: > @@ -289,6 +318,12 @@ static int fsl_asrc_config_pair(struct fsl_asrc_pair > *pair) > return -EINVAL; > } > > + ret = fsl_asrc_sel_proc(inrate, outrate, &pre_proc, &post_proc); Since the function always return

Re: [PATCH V4 1/3] ASoC: fsl_asrc: Fix the issue about unsupported rate

2019-04-19 Thread Nicolin Chen
On Fri, Apr 19, 2019 at 10:23:50AM +, S.j. Wang wrote: > When the output sample rate is [8kHz, 30kHz], the limitation > of the supported ratio range is (1/24, 8). In the driver > we use (8kHz, 30kHz) instead of [8kHz, 30kHz]. > So this patch is to fix this issue and the potential rounding > iss

Re: [PATCH V2] ASoC: fsl_esai: Add pm runtime function

2019-04-18 Thread Nicolin Chen
to have a good justification in the commit message. It could be simply some benefit of doing so like what you have discussed with Mark. > Signed-off-by: Shengjiu Wang Please add it in next version upon commit message update: Acked-by: Nicolin Chen Thanks

Re: [PATCH V3 1/2] ASoC: fsl_asrc: replace the process_option table with function

2019-04-18 Thread Nicolin Chen
On Thu, Apr 18, 2019 at 09:37:06AM +, S.j. Wang wrote: > > > > And this is according to IMX6DQRM: > > > > Limited support for the case when output sampling rates is > > > > between 8kHz and 30kHz. The limitation is the supported ratio > > > > (Fsin/Fsout) range as between 1/24 to 8

Re: [PATCH V3 1/2] ASoC: fsl_asrc: replace the process_option table with function

2019-04-18 Thread Nicolin Chen
On Thu, Apr 18, 2019 at 08:50:48AM +, S.j. Wang wrote: > > And this is according to IMX6DQRM: > > Limited support for the case when output sampling rates is > > between 8kHz and 30kHz. The limitation is the supported ratio > > (Fsin/Fsout) range as between 1/24 to 8 > > > > This sh

Re: [PATCH] ASoC: fsl_esai: Add pm runtime function

2019-04-18 Thread Nicolin Chen
On Thu, Apr 18, 2019 at 03:29:09AM +, S.j. Wang wrote: > In imx8 when systerm enter suspend state, the power of subsystem will > be off, the clock enable state will be lost and register configuration Just for curiosity, we had similar situation on imx6sx, so we added suspend/resume with regcac

Re: [PATCH V3 1/2] ASoC: fsl_asrc: replace the process_option table with function

2019-04-18 Thread Nicolin Chen
On Thu, Apr 18, 2019 at 02:37:03AM +, S.j. Wang wrote: > > Here: > > > + /* Does not support cases: Tsout > 8.125 * Tsin */ > > > + if (inrate * 8 > 65 * outrate) Though it might not matter any more (see my last comments), it should be "inrate > 8.125 * outrate" in the comments. > > >

Re: [PATCH -next] ASoC: fsl_micfil: Remove set but not used variable 'osr'

2019-04-17 Thread Nicolin Chen
On Wed, Apr 17, 2019 at 09:58:37PM +0300, gabrielc...@gmail.com wrote: > Nicolin, I am pretty sure I've ran the get_maintainer.pl script but > I will pay more attention next time... sorry if I forgot to add you. It's okay for that one as I trust Mark's review anyway. Just adding us would offload

Re: [PATCH V3 1/2] ASoC: fsl_asrc: replace the process_option table with function

2019-04-17 Thread Nicolin Chen
Hi Shengjiu, This looks better. Just a couple of more small comments inline. On Wed, Apr 17, 2019 at 09:06:18AM +, S.j. Wang wrote: > +static int fsl_asrc_sel_proc(int inrate, int outrate, int *pre_proc, > + int *post_proc) Just a nit: it looks better by grouping th

Re: [PATCH -next] ASoC: fsl_micfil: Remove set but not used variable 'osr'

2019-04-17 Thread Nicolin Chen
On Wed, Apr 17, 2019 at 06:25:11PM +0300, Daniel Baluta wrote: > Looks good to me. Just one question for Cosmin: > > diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c > > index 40c07e7..f7f2d29 100644 > > --- a/sound/soc/fsl/fsl_micfil.c > > +++ b/sound/soc/fsl/fsl_micfil.c > >

Re: [PATCH v4 4/4] ASoC: fsl_audmix: cache pdev->dev pointer

2019-04-11 Thread Nicolin Chen
On Wed, Apr 10, 2019 at 11:06:39AM +, Viorel Suman wrote: > There should be no trouble to understand dev = pdev->dev. > This can save some space to have more print info or save > some wrapped lines. Change looks fine. Ack. > Signed-off-by: Viorel Suman > Suggested-by: Nico

Re: [PATCH V2 2/2] ASoC: fsl_asrc: Unify the supported input and output rate

2019-04-11 Thread Nicolin Chen
On Thu, Apr 11, 2019 at 09:39:09AM +, S.j. Wang wrote: > Unify the supported input and output rate, add the We previously didn't support 5KHz->5KHz, but now we do? That'd be great if so. > static int fsl_asrc_dai_hw_params(struct snd_pcm_substream *substream, > @@ -626,14 +629,18 @@ static i

Re: [PATCH V2 1/2] ASoC: fsl_asrc: replace the process_option table with function

2019-04-11 Thread Nicolin Chen
On Thu, Apr 11, 2019 at 09:39:06AM +, S.j. Wang wrote: > +/* > + * Select the pre-processing and post-processing options By aligning with other function comments: /** * Select the pre-processing and post-processing options > + * > + * Fsin: input sample rate > + * Fsout: output sample rat

Re: [EXT] Re: [PATCH] ASoC: fsl_asrc: replace the process_option table with function

2019-04-10 Thread Nicolin Chen
On Wed, Apr 10, 2019 at 10:34:05AM +, S.j. Wang wrote: > > On Wed, Apr 10, 2019 at 08:26:59AM +, S.j. Wang wrote: > > > > Is it possible to update the table? It'd be way quicker to use > > > > lookup table than real-time calculation all the time. I believe you > > > > can simply calculate a

Re: [EXT] Re: [PATCH v2 1/3] ASoC: fsl_audmix: remove "model" attribute

2019-04-10 Thread Nicolin Chen
On Wed, Apr 10, 2019 at 10:34:57AM +, Viorel Suman wrote: > Hi Nicolin, > > On Ma, 2019-04-09 at 21:29 -0700, Nicolin Chen wrote: > > WARNING: This email was created outside of NXP. DO NOT CLICK links or > > attachments unless you recognize the sender and know th

Re: [EXT] Re: [PATCH] ASoC: fsl_asrc: replace the process_option table with function

2019-04-10 Thread Nicolin Chen
On Wed, Apr 10, 2019 at 08:26:59AM +, S.j. Wang wrote: > > Is it possible to update the table? It'd be way quicker to use lookup table > > than real-time calculation all the time. I believe you can simply calculate > > all > > the values out for 12KHz and 24KHz since you have the function. If

Re: [EXT] Re: [PATCH] ASoC: fsl_asrc: replace the process_option table with function

2019-04-10 Thread Nicolin Chen
On Wed, Apr 10, 2019 at 07:22:31AM +, S.j. Wang wrote: > > The table was copied directly from the Reference Manual. We also have > > listed all supported input and output sample rates just right behind that > > table. > > If there're missing rates, we probably should update those two lists als

Re: [alsa-devel] [PATCH v2 1/3] ASoC: fsl_audmix: remove "model" attribute

2019-04-09 Thread Nicolin Chen
On Wed, Apr 10, 2019 at 09:20:29AM +0300, Daniel Baluta wrote: > Hi Nicolin, > > On Wed, Apr 10, 2019 at 7:30 AM Nicolin Chen wrote: > > > > On Tue, Apr 09, 2019 at 11:27:39AM +, Viorel Suman wrote: > > > Use "of_device_id.data" to specify the mac

Re: [PATCH v2 3/3] ASoC: imx-audmix: fix object reference leaks in probe

2019-04-09 Thread Nicolin Chen
On Tue, Apr 09, 2019 at 11:27:42AM +, Viorel Suman wrote: > Release the reference to the underlying device taken > by of_find_device_by_node() call. > > Signed-off-by: Viorel Suman > Reported-by: Julia Lawall Acked-by: Nicolin Chen

Re: [PATCH v2 2/3] dt-bindings: fsl,audmix: remove "model" attribute

2019-04-09 Thread Nicolin Chen
On Tue, Apr 09, 2019 at 11:27:40AM +, Viorel Suman wrote: > Remove "model" attribute. > > Signed-off-by: Viorel Suman Acked-by: Nicolin Chen

Re: [PATCH v2 1/3] ASoC: fsl_audmix: remove "model" attribute

2019-04-09 Thread Nicolin Chen
On Tue, Apr 09, 2019 at 11:27:39AM +, Viorel Suman wrote: > Use "of_device_id.data" to specify the machine driver > instead of "model" DTS attribute. > > Signed-off-by: Viorel Suman Acked-by: Nicolin Chen > ---

Re: [PATCH] ASoC: fsl_asrc: replace the process_option table with function

2019-04-09 Thread Nicolin Chen
On Wed, Apr 10, 2019 at 03:15:26AM +, S.j. Wang wrote: > The table is not flexible if supported sample rate is not in the > table, so use a function to replace it. Could you please elaborate a bit the special use case here? The table was copied directly from the Reference Manual. We also have

Re: [PATCH V2] ASoC: fsl_esai: replace fall-through with break

2019-04-09 Thread Nicolin Chen
by: Shengjiu Wang Acked-by: Nicolin Chen Thanks > --- > Changes in v2 > - fix the fixes tag. > > sound/soc/fsl/fsl_esai.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c > index c7410bbfd2a

Re: [PATCH V1] ASoC: fsl_esai: replace fall-through with break

2019-04-09 Thread Nicolin Chen
On Tue, Apr 09, 2019 at 08:50:59PM -0700, Nicolin Chen wrote: > On Mon, Apr 08, 2019 at 09:28:06AM +, S.j. Wang wrote: > > case ESAI_HCKT_EXTAL and case ESAI_HCKR_EXTAL should be independent of > > each other, so replace fall-through with break. > > > > Fixes: 16

Re: [PATCH V1] ASoC: fsl_esai: replace fall-through with break

2019-04-09 Thread Nicolin Chen
Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Thanks

Re: [EXT] Re: [PATCH V1] ASoC: fsl_esai: replace fall-through with break

2019-04-08 Thread Nicolin Chen
Hi Gustavo, On Mon, Apr 08, 2019 at 10:20:25PM -0500, Gustavo A. R. Silva wrote: > >>> diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c index > >>> c7410bbfd2af..bad0dfed6b68 100644 > >>> --- a/sound/soc/fsl/fsl_esai.c > >>> +++ b/sound/soc/fsl/fsl_esai.c > >>> @@ -251,7 +251,7 @@

Re: [PATCH V2] ASoC: fsl_esai: Support synchronous mode

2019-04-03 Thread Nicolin Chen
regmap_update_bits(esai_priv->regmap, REG_ESAI_TCR, > + ESAI_xCR_PADC, ESAI_xCR_PADC); Mind aligning the indentation here like the one below? regmap_update_bits(esai_priv->regmap, REG_ESAI_TCR, ESAI_xCR_PADC, ESAI_xCR_PADC); Once you fix the indentation, add this: Acked-by: Nicolin Chen Thanks

<    1   2   3   4   5   6   7   8   >