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

2014-09-09 Thread Shengjiu Wang
ff-by: Shengjiu Wang --- sound/soc/fsl/fsl_ssi.c | 38 +++--- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 2fc3e66..d32d0f5 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_

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

2014-09-10 Thread Shengjiu Wang
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_device > > *pdev) > > return -ENOMEM; > > } >

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

2014-09-10 Thread Shengjiu Wang
On Tue, Sep 09, 2014 at 12:59:29PM -0700, Nicolin Chen wrote: > 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. > > >

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

2014-09-10 Thread Shengjiu Wang
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

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

2014-09-10 Thread Shengjiu Wang
Move the ipg clock enable and disable operation to startup and shutdown, that is only enable ipg clock when ssi is working. Keep clock is disabled when ssi is in idle. otherwise, _fsl_ssi_set_dai_fmt function need to be called in probe, so add ipg clock control for it. Signed-off-by: Shengjiu

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

2014-09-11 Thread Shengjiu Wang
On Thu, Sep 11, 2014 at 08:36:51AM +0200, Markus Pargmann wrote: > On Wed, Sep 10, 2014 at 10:42:04AM -0700, Nicolin Chen wrote: > > On Wed, Sep 10, 2014 at 04:12:53PM +0800, Shengjiu Wang wrote: > > > > Then we can get a patch like: > > > > open() { &

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

2014-09-11 Thread Shengjiu Wang
On Thu, Sep 11, 2014 at 03:57:37PM -0700, Nicolin Chen wrote: > On Thu, Sep 11, 2014 at 01:38:29PM +0800, Shengjiu Wang wrote: > > Move the ipg clock enable and disable operation to startup and shutdown, > > that is only enable ipg clock when ssi is working. Keep clock is disabled

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

2014-09-11 Thread Shengjiu Wang
On Thu, Sep 11, 2014 at 09:43:59PM -0500, Timur Tabi wrote: > Shengjiu Wang wrote: > >+ret = clk_prepare_enable(ssi_private->clk); > >+if (ret) > >+return ret; > > Will this work on PowerPC, where ssi_private->clk is always NULL? When ssi_p

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

2014-09-12 Thread Shengjiu Wang
On Fri, Sep 12, 2014 at 08:17:06AM +0200, Markus Pargmann wrote: > Hi, > > On Fri, Sep 12, 2014 at 10:01:12AM +0800, Shengjiu Wang wrote: > > On Thu, Sep 11, 2014 at 03:57:37PM -0700, Nicolin Chen wrote: > > > On Thu, Sep 11, 2014 at 01:38:29PM +0800, Shengjiu Wang wro

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

2014-09-12 Thread Shengjiu Wang
. Signed-off-by: Shengjiu Wang --- V3 change log: update patch according Nicolin and markus's comments sound/soc/fsl/fsl_ssi.c | 53 --- 1 file changed, 45 insertions(+), 8 deletions(-) diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_

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

2014-09-12 Thread Shengjiu Wang
On Fri, Sep 12, 2014 at 10:54:46AM +0200, Markus Pargmann wrote: > On Fri, Sep 12, 2014 at 03:14:28PM +0800, Shengjiu Wang wrote: > > On Fri, Sep 12, 2014 at 08:17:06AM +0200, Markus Pargmann wrote: > > > Hi, > > > > > > On Fri, Sep 12, 2014 at 10:01:12AM +0

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

2014-09-15 Thread Shengjiu Wang
On Mon, Sep 15, 2014 at 12:05:41PM +0200, Markus Pargmann wrote: > On Fri, Sep 12, 2014 at 06:35:15PM +0800, Shengjiu Wang wrote: > > Check if ipg clock is in clock-names property, then we can move the > > ipg clock enable and disable operation to startup and shutdown, that > &g

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

2014-09-15 Thread Shengjiu Wang
On Mon, Sep 15, 2014 at 12:32:13PM +0200, Markus Pargmann wrote: > On Mon, Sep 15, 2014 at 06:22:27PM +0800, Shengjiu Wang wrote: > > On Mon, Sep 15, 2014 at 12:05:41PM +0200, Markus Pargmann wrote: > > > On Fri, Sep 12, 2014 at 06:35:15PM +0800, Shengjiu Wang wrote: > > &

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

2014-09-15 Thread Shengjiu Wang
. Tested-by: Markus Pargmann Signed-off-by: Shengjiu Wang --- v4 change log: fix the code indent issue. sound/soc/fsl/fsl_ssi.c | 53 --- 1 file changed, 45 insertions(+), 8 deletions(-) diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c

[PATCH] ASoC: fsl_spdif: don't change the root clock rate of spdif in driver

2014-09-16 Thread Shengjiu Wang
The spdif root clock may be used by other module or defined with CLK_SET_RATE_GATE, so we can't change the clock rate in driver. In this patch remove the clk_set_rate and clk_round_rate to protect the clock. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_spdif.c |

[PATCH] ASoC: fsl: Add dedicated DMA buffer size for each cpu dai

2015-06-23 Thread Shengjiu Wang
As the ssi is not the only cpu dai, there are esai, spdif, sai. and imx_pcm_dma can be used by all of them. Especially ESAI need a larger DMA buffer size. So Add dedicated DMA buffer for each cpu dai. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_esai.c|2 +- sound/soc/fsl

[PATCH V1 1/2] ASoC: fsl: esai: refine esai for tdm support

2014-08-06 Thread Shengjiu Wang
Add parameter for slots, and caculate the number of TX/RX pins and bclk with slots. Then driver will be compatible with slots > 2 in TDM mode. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_esai.c | 10 +++--- sound/soc/fsl/fsl_esai.h |8 2 files changed, 11 inserti

[PATCH V1 0/2] refine esai for tdm support

2014-08-06 Thread Shengjiu Wang
refine esai for tdm support. Shengjiu Wang (2): ASoC: fsl: esai: refine esai for tdm support Revert "ASoC: fsl-esai: Add .xlate_tdm_slot_mask() support." sound/soc/fsl/Kconfig|1 - sound/soc/fsl/fsl_esai.c | 12 +++- sound/soc/fsl/fsl_esai.h |8 ---

[PATCH V1 2/2] Revert "ASoC: fsl-esai: Add .xlate_tdm_slot_mask() support."

2014-08-06 Thread Shengjiu Wang
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. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/Kconfig|1 - sound/so

[PATCH V2 0/2] refine esai for tdm support

2014-08-07 Thread Shengjiu Wang
These patchs is to refine esai for tdm support. Changes for V2 - update the comments according the reviewer's suggestion - add init value for slots and change pin to pins. Shengjiu Wang (2): ASoC: fsl_esai: refine esai for TDM support Revert "ASoC: fsl-esai: Add .xlate_tdm

[PATCH V2 1/2] ASoC: fsl_esai: refine esai for TDM support

2014-08-07 Thread Shengjiu Wang
TDM mode. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_esai.c | 14 +++--- sound/soc/fsl/fsl_esai.h |8 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c index 72d154e..f252370 100644 --- a/sound

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

2014-08-07 Thread Shengjiu Wang
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. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/Kconfig|1 - sound/so

[PATCH V3 2/2] Revert "ASoC: fsl-esai: Add .xlate_tdm_slot_mask() support."

2014-08-07 Thread Shengjiu Wang
snd_soc_xlate_tdm_slot_mask(), which is workable for esai. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/Kconfig|1 - sound/soc/fsl/fsl_esai.c |2 -- 2 files changed, 3 deletions(-) diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig index f54a8fc..f3012b6 100644 --- a/sound/soc/fsl/Kconfig

[PATCH V3 1/2] ASoC: fsl_esai: refine esai for TDM support

2014-08-07 Thread Shengjiu Wang
TDM mode. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_esai.c | 14 +++--- sound/soc/fsl/fsl_esai.h |8 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c index 72d154e..f252370 100644 --- a/sound

[PATCH V3 0/2] refine esai for tdm support

2014-08-07 Thread Shengjiu Wang
These patchs is to refine esai for tdm support. Changes for V3 - update the comments for patch 2 Changes for V2 - update the comments according the reviewer's suggestion - add init value for slots and change pin to pins. Shengjiu Wang (2): ASoC: fsl_esai: refine esai for TDM support R

[PATCH V4 0/2] refine esai for tdm support

2014-08-07 Thread Shengjiu Wang
These patchs is to refine esai for tdm support. Changes for V4 - update the comments for patch 2 Changes for V3 - update the comments for patch 2 Changes for V2 - update the comments according the reviewer's suggestion - add init value for slots and change pin to pins. Shengjiu Wa

[PATCH V4 2/2] Revert "ASoC: fsl-esai: Add .xlate_tdm_slot_mask() support."

2014-08-07 Thread Shengjiu Wang
to 0. For esai when the bit value is 1, the slot is enabled, when the bit value is 0, the slot is disabled. If using fsl_asoc_xlate_tdm_slot_mask(), the esai will work abnormally. So revert this patch, make the esai use default function. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/Kconfig

[PATCH V4 1/2] ASoC: fsl_esai: refine esai for TDM support

2014-08-08 Thread Shengjiu Wang
TDM mode. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_esai.c | 14 +++--- sound/soc/fsl/fsl_esai.h |8 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c index 72d154e..f252370 100644 --- a/sound

[PATCH V1 1/3] ASoC: fsl: Kconfig: remove dependence of SND_IMX_SOC for SND_SOC_IMX_PCM_DMA

2014-08-18 Thread Shengjiu Wang
will not be selected. So remove the dependence of SND_IMX_SOC for SND_SOC_IMX_PCM_DMA. Reported-by: kbuild test robot Signed-off-by: Shengjiu Wang --- sound/soc/fsl/Kconfig |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig

[PATCH V1 2/3] ASoC: fsl-asoc-card: Fix build warning for maybe-uninitialized

2014-08-18 Thread Shengjiu Wang
return ret; 551 } 552 553 static const struct of_device_id fsl_asoc_card_dt_ids[] = { 554 { .compatible = "fsl,imx-audio-cs42888", }, 555 { .compatible = "fsl,imx-audio-sgtl5000", }, Add 'asrc_fail' branch for error jump after asrc_np i

[PATCH V1 0/3] fix build error/warning in sound/soc/fsl

2014-08-18 Thread Shengjiu Wang
This series patch is for fixing build error/waring in sound/soc/fsl Shengjiu Wang (3): ASoC: fsl: Kconfig: remove dependence of SND_IMX_SOC for SND_SOC_IMX_PCM_DMA ASoC: fsl-asoc-card: Fix build warning for maybe-uninitialized ASoC: fsl: fsl-asoc-card: Select SND_SOC_IMX_AUDMUX sound

[PATCH V1 3/3] ASoC: fsl: fsl-asoc-card: Select SND_SOC_IMX_AUDMUX

2014-08-18 Thread Shengjiu Wang
g to select SND_SOC_IMX_AUDMUX when SND_SOC_FSL_ASOC_CARD=y. Reported-by: kbuild test robot Signed-off-by: Shengjiu Wang --- sound/soc/fsl/Kconfig |1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig index 3a3732c..dc0d08b 100644 --- a/s

Re: [alsa-devel] [PATCH V1 1/3] ASoC: fsl: Kconfig: remove dependence of SND_IMX_SOC for SND_SOC_IMX_PCM_DMA

2014-08-19 Thread Shengjiu Wang
On Mon, Aug 18, 2014 at 06:52:46PM +0200, Lars-Peter Clausen wrote: > On 08/18/2014 10:38 AM, Shengjiu Wang wrote: > >Build kernel with SND_SOC_IMC_PCM_DMA=m && SND_IMX_SOC=n leads the following > >error: > > > >sound/built-in.o: In function `fsl_sai_pr

Re: [alsa-devel] [PATCH V1 1/3] ASoC: fsl: Kconfig: remove dependence of SND_IMX_SOC for SND_SOC_IMX_PCM_DMA

2014-08-19 Thread Shengjiu Wang
ote: > > > On 08/18/2014 10:38 AM, Shengjiu Wang wrote: > > > >Build kernel with SND_SOC_IMC_PCM_DMA=m && SND_IMX_SOC=n leads the > > following > > > >error: > > > > > > > >sound/built-in.o: In function `fsl_sai_probe':

Re: [alsa-devel] [PATCH V1 1/3] ASoC: fsl: Kconfig: remove dependence of SND_IMX_SOC for SND_SOC_IMX_PCM_DMA

2014-08-19 Thread Shengjiu Wang
On Tue, Aug 19, 2014 at 10:45:04AM +0200, Lars-Peter Clausen wrote: > On 08/19/2014 10:36 AM, Lars-Peter Clausen wrote: > >On 08/19/2014 09:41 AM, Shengjiu Wang wrote: > >>On Mon, Aug 18, 2014 at 06:52:46PM +0200, Lars-Peter Clausen wrote: > >>>On 08/18/2014

[PATCH V2] ASoC: fsl-asoc-card: move 'config SND_SOC_FSL_ASOC_CARD' to 'if SND_IMX_SOC'

2014-08-19 Thread Shengjiu Wang
e': >> fsl_esai.c:(.text+0x6044b): undefined reference to `imx_pcm_dma_init' The config SND_SOC_FSL_ASOC_CARD is for IMX SOC, So move it under condition of 'if SND_IMX_SOC'. Reported-by: kbuild test robot Signed-off-by: Shengjiu Wang --- sound/soc/fsl/Kconfig | 34

[PATCH V2 0/3] add spba clock for fsl audio IP

2015-11-19 Thread Shengjiu Wang
add spba clock for fsl audio IP Changes in v2 - spba is a optional clock, compatible with previous devicetree. - change the name from "dma" to "spba" Shengjiu Wang (3): ASoC: fsl_esai: spba clock is needed by esai device ASoC: fsl_spdif: spba clk is needed by spdif dev

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

2015-11-19 Thread Shengjiu Wang
ESAI 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, the spba bus will have arbitration issue, which may cause read/write wrong data from/to ESAI registers. Signed-off-by: Shengjiu

[PATCH V2 2/3] ASoC: fsl_spdif: spba clk is needed by spdif device

2015-11-19 Thread Shengjiu Wang
SPDIF 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, the spba bus will have arbitration issue, which may cause read/write wrong data from/to SPDIF registers. Signed-off-by: Shengjiu

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

2015-11-19 Thread Shengjiu Wang
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, the spba bus will have arbitration issue, which may cause read/write wrong data from/to ASRC registers Signed-off-by: Shengjiu

[PATCH V3 0/3] add spba clock for fsl audio IP

2015-11-23 Thread Shengjiu Wang
add spba clock for fsl audio IP Changes in V3 - update the comments for clock description. Shengjiu Wang (3): ASoC: fsl_esai: spba clock is needed by esai device ASoC: fsl_spdif: spba clk is needed by spdif device ASoC: fsl_asrc: spba clock is needed by asrc device Documentation

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

2015-11-23 Thread Shengjiu Wang
ESAI 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, the spba bus will have arbitration issue, which may cause read/write wrong data from/to ESAI registers. Signed-off-by: Shengjiu

[PATCH V3 2/3] ASoC: fsl_spdif: spba clk is needed by spdif device

2015-11-23 Thread Shengjiu Wang
SPDIF 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, the spba bus will have arbitration issue, which may cause read/write wrong data from/to SPDIF registers. Signed-off-by: Shengjiu

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

2015-11-23 Thread Shengjiu Wang
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, the spba bus will have arbitration issue, which may cause read/write wrong data from/to ASRC registers Signed-off-by: Shengjiu

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

2015-11-24 Thread Shengjiu Wang
On Tue, Nov 24, 2015 at 12:33:45AM -0800, Nicolin Chen wrote: > 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-&g

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

2015-11-24 Thread Shengjiu Wang
add spba clock for fsl audio IP Changes in V3 - add error check for spba clock Shengjiu Wang (3): ASoC: fsl_esai: spba clock is needed by esai device ASoC: fsl_spdif: spba clk is needed by spdif device ASoC: fsl_asrc: spba clock is needed by asrc device Documentation/devicetree/bindings

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

2015-11-24 Thread Shengjiu Wang
ESAI 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, the spba bus will have arbitration issue, which may cause read/write wrong data from/to ESAI registers. Signed-off-by: Shengjiu

[PATCH V4 2/3] ASoC: fsl_spdif: spba clk is needed by spdif device

2015-11-24 Thread Shengjiu Wang
SPDIF 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, the spba bus will have arbitration issue, which may cause read/write wrong data from/to SPDIF registers. Signed-off-by: Shengjiu

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

2015-11-24 Thread Shengjiu Wang
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, the spba bus will have arbitration issue, which may cause read/write wrong data from/to ASRC registers Signed-off-by: Shengjiu

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

2015-11-24 Thread Shengjiu Wang
On Tue, Nov 24, 2015 at 05:21:30PM -0600, Rob Herring wrote: > On Tue, Nov 24, 2015 at 03:03:28PM +0800, Shengjiu Wang wrote: > > ESAI 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

Re: [PATCH v3 1/4] ASoC: fsl_asrc: Change asrc_width to asrc_format

2020-02-27 Thread Shengjiu Wang
Hi On Fri, Feb 28, 2020 at 1:45 AM Nicolin Chen wrote: > > On Thu, Feb 27, 2020 at 01:10:19PM +0800, Shengjiu Wang wrote: > > On Thu, Feb 27, 2020 at 11:43 AM Nicolin Chen > > wrote: > > > > > > On Thu, Feb 27, 2020 at 10:41:55AM +0800, Shengjiu Wan

Re: [PATCH v3 1/4] ASoC: fsl_asrc: Change asrc_width to asrc_format

2020-02-27 Thread Shengjiu Wang
On Fri, Feb 28, 2020 at 2:40 PM Nicolin Chen wrote: > > On Fri, Feb 28, 2020 at 10:54:02AM +0800, Shengjiu Wang wrote: > > Hi > > > > On Fri, Feb 28, 2020 at 1:45 AM Nicolin Chen wrote: > > > > > > On Thu, Feb 27, 2020 at 01:10:19PM +0800, Shengjiu Wang

Re: [PATCH v3 2/4] ASoC: fsl_asrc: Move common definition to fsl_asrc_common

2020-02-27 Thread Shengjiu Wang
On Fri, Feb 28, 2020 at 2:41 AM Nicolin Chen wrote: > > On Thu, Feb 27, 2020 at 10:41:56AM +0800, Shengjiu Wang wrote: > > There is a new ASRC included in i.MX serial platform, there > > are some common definition can be shared with each other. > > So move the common

[PATCH v4 0/8] ASoC: Add new module driver for new ASRC

2020-02-29 Thread Shengjiu Wang
Add new module driver for new ASRC in i.MX8MN, several commits are added for change DT binding asrc-width to asrc-format Shengjiu Wang (8): ASoC: dt-bindings: fsl_asrc: Change asrc-width to asrc-format ARM: dts: imx6qdl: Change asrc-width to asrc-format ASoC: fsl-asoc-card: Change asrc

[PATCH v4 2/8] ARM: dts: imx6qdl: Change asrc-width to asrc-format

2020-02-29 Thread Shengjiu Wang
asrc_format is more inteligent, which is align with the alsa definition snd_pcm_format_t, we don't need to convert it to format in driver, and it can distinguish S24_LE & S24_3LE. default value is SNDRV_PCM_FORMAT_S16_LE(2). Signed-off-by: Shengjiu Wang --- arch/arm/boot/dts/imx6qdl

[PATCH v4 1/8] ASoC: dt-bindings: fsl_asrc: Change asrc-width to asrc-format

2020-02-29 Thread Shengjiu Wang
asrc_format is more inteligent, which is align with the alsa definition snd_pcm_format_t, we don't need to convert it to format in driver, and it can distinguish S24_LE & S24_3LE. Signed-off-by: Shengjiu Wang --- Documentation/devicetree/bindings/sound/fsl,asrc.txt | 4 +++- 1 file c

[PATCH v4 3/8] ASoC: fsl-asoc-card: Change asrc-width to asrc-format

2020-02-29 Thread Shengjiu Wang
asrc_format is more inteligent, which is align with the alsa definition snd_pcm_format_t, we don't need to convert it to format in driver, and it can distinguish S24_LE & S24_3LE. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl-asoc-card.c | 9 ++--- 1 file changed, 2 inserti

[PATCH v4 4/8] ASoC: fsl_asrc: Change asrc_width to asrc_format

2020-02-29 Thread Shengjiu Wang
asrc_format is more inteligent, which is align with the alsa definition snd_pcm_format_t, we don't need to convert it to format in driver, and it can distinguish S24_LE & S24_3LE. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_asrc.c | 19 ++- sound/soc/fsl/f

[PATCH v4 5/8] ASoC: fsl_asrc: rename asrc_priv to asrc

2020-02-29 Thread Shengjiu Wang
In order to move common structure to fsl_asrc_common.h we change the name of asrc_priv to asrc, the asrc_priv will be used by new struct fsl_asrc_priv. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_asrc.c | 300 +-- sound/soc/fsl/fsl_asrc.h | 4

[PATCH v4 7/8] ASoC: dt-bindings: fsl_easrc: Add document for EASRC

2020-02-29 Thread Shengjiu Wang
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.yaml | 96 +++ 1 file changed, 96 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/fsl

[PATCH v4 6/8] ASoC: fsl_asrc: Move common definition to fsl_asrc_common

2020-02-29 Thread Shengjiu Wang
. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_asrc.c| 81 +++- sound/soc/fsl/fsl_asrc.h| 74 ++ sound/soc/fsl/fsl_asrc_common.h | 105 sound/soc/fsl/fsl_asrc_dma.c| 25 4 files changed, 176

[PATCH v4 8/8] ASoC: fsl_easrc: Add EASRC ASoC CPU DAI and platform drivers

2020-02-29 Thread Shengjiu Wang
: Shengjiu Wang Signed-off-by: Cosmin-Gabriel Samoila --- sound/soc/fsl/Kconfig | 11 + sound/soc/fsl/Makefile|2 + sound/soc/fsl/fsl_easrc.c | 2111 + sound/soc/fsl/fsl_easrc.h | 651 4 files changed, 2775 insertions(+) create mode 100644

Re: [PATCH v4 1/8] ASoC: dt-bindings: fsl_asrc: Change asrc-width to asrc-format

2020-03-02 Thread Shengjiu Wang
Hi On Tue, Mar 3, 2020 at 9:43 AM Rob Herring wrote: > > On Sun, Mar 01, 2020 at 01:24:12PM +0800, Shengjiu Wang wrote: > > asrc_format is more inteligent, which is align with the alsa > > definition snd_pcm_format_t, we don't need to convert it to > > format in d

Re: [PATCH v4 1/8] ASoC: dt-bindings: fsl_asrc: Change asrc-width to asrc-format

2020-03-06 Thread Shengjiu Wang
Hi On Tue, Mar 3, 2020 at 8:47 PM Mark Brown wrote: > > On Tue, Mar 03, 2020 at 11:59:30AM +0800, Shengjiu Wang wrote: > > On Tue, Mar 3, 2020 at 9:43 AM Rob Herring wrote: > > > > > - - fsl,asrc-width : Defines a mutual sample width used by DPCM Back > >

[PATCH v5 5/7] ASoC: fsl_asrc: Move common definition to fsl_asrc_common

2020-03-08 Thread Shengjiu Wang
. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_asrc.c| 81 +++- sound/soc/fsl/fsl_asrc.h| 74 ++ sound/soc/fsl/fsl_asrc_common.h | 105 sound/soc/fsl/fsl_asrc_dma.c| 25 4 files changed, 176

[PATCH v5 0/7] ASoC: Add new module driver for new ASRC

2020-03-08 Thread Shengjiu Wang
Add new module driver for new ASRC in i.MX8MN, several commits are added for new property fsl,asrc-format Shengjiu Wang (7): ASoC: dt-bindings: fsl_asrc: Add new property fsl,asrc-format ASoC: fsl-asoc-card: Support new property fsl,asrc-format ASoC: fsl_asrc: Support new property fsl,asrc

[PATCH v5 6/7] ASoC: dt-bindings: fsl_easrc: Add document for EASRC

2020-03-08 Thread Shengjiu Wang
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.yaml | 101 ++ 1 file changed, 101 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/fsl

[PATCH v5 4/7] ASoC: fsl_asrc: rename asrc_priv to asrc

2020-03-08 Thread Shengjiu Wang
In order to move common structure to fsl_asrc_common.h we change the name of asrc_priv to asrc, the asrc_priv will be used by new struct fsl_asrc_priv. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_asrc.c | 296 +-- sound/soc/fsl/fsl_asrc.h | 4

[PATCH v5 3/7] ASoC: fsl_asrc: Support new property fsl,asrc-format

2020-03-08 Thread Shengjiu Wang
In order to align with new ESARC, we add new property fsl,asrc-format. The fsl,asrc-format can replace the fsl,asrc-width, driver can accept format from devicetree, don't need to convert it to format through width. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_asrc.c

[PATCH v5 1/7] ASoC: dt-bindings: fsl_asrc: Add new property fsl, asrc-format

2020-03-08 Thread Shengjiu Wang
. The fsl,asrc-format can replace the fsl,asrc-width, then driver can accept format from devicetree, don't need to convert it to format through width. Signed-off-by: Shengjiu Wang --- Documentation/devicetree/bindings/sound/fsl,asrc.txt | 5 + 1 file changed, 5 insertions(+) diff --

[PATCH v5 2/7] ASoC: fsl-asoc-card: Support new property fsl, asrc-format

2020-03-08 Thread Shengjiu Wang
In order to align with new ESARC, we add new property fsl,asrc-format. The fsl,asrc-format can replace the fsl,asrc-width, driver can accept format from devicetree, don't need to convert it to format through width. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl-asoc-card.c

[PATCH v5 7/7] ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers

2020-03-08 Thread Shengjiu Wang
: Shengjiu Wang Signed-off-by: Cosmin-Gabriel Samoila --- sound/soc/fsl/Kconfig | 11 + sound/soc/fsl/Makefile|2 + sound/soc/fsl/fsl_easrc.c | 2111 + sound/soc/fsl/fsl_easrc.h | 651 4 files changed, 2775 insertions(+) create mode 100644

Re: [PATCH v5 1/7] ASoC: dt-bindings: fsl_asrc: Add new property fsl, asrc-format

2020-03-12 Thread Shengjiu Wang
Hi Rob On Tue, Mar 10, 2020 at 5:20 AM Nicolin Chen wrote: > > On Mon, Mar 09, 2020 at 11:58:28AM +0800, Shengjiu Wang wrote: > > In order to support new EASRC and simplify the code structure, > > We decide to share the common structure between them. This bring > > a p

Re: [PATCH v5 6/7] ASoC: dt-bindings: fsl_easrc: Add document for EASRC

2020-03-22 Thread Shengjiu Wang
On Sat, Mar 21, 2020 at 1:50 AM Rob Herring wrote: > > On Mon, Mar 09, 2020 at 11:58:33AM +0800, Shengjiu Wang wrote: > > EASRC (Enhanced Asynchronous Sample Rate Converter) is a new > > IP module found on i.MX8MN. > > > > Signed-off-by: Shengjiu Wang > > --

Re: [PATCH v5 1/7] ASoC: dt-bindings: fsl_asrc: Add new property fsl, asrc-format

2020-03-22 Thread Shengjiu Wang
On Sat, Mar 21, 2020 at 1:34 AM Rob Herring wrote: > > On Mon, Mar 09, 2020 at 02:19:44PM -0700, Nicolin Chen wrote: > > On Mon, Mar 09, 2020 at 11:58:28AM +0800, Shengjiu Wang wrote: > > > In order to support new EASRC and simplify the code structure, > > >

Re: [PATCH v5 1/7] ASoC: dt-bindings: fsl_asrc: Add new property fsl, asrc-format

2020-03-30 Thread Shengjiu Wang
Hi On Tue, Mar 24, 2020 at 5:22 AM Nicolin Chen wrote: > > On Fri, Mar 20, 2020 at 11:32:13AM -0600, Rob Herring wrote: > > On Mon, Mar 09, 2020 at 02:19:44PM -0700, Nicolin Chen wrote: > > > On Mon, Mar 09, 2020 at 11:58:28AM +0800, Shengjiu Wang wrote: > > > >

[PATCH v6 0/7] ASoC: Add new module driver for new ASRC

2020-04-01 Thread Shengjiu Wang
Add new module driver for new ASRC in i.MX8MN, several commits are added for new property fsl,asrc-format Shengjiu Wang (7): ASoC: fsl_asrc: rename asrc_priv to asrc ASoC: dt-bindings: fsl_asrc: Add new property fsl,asrc-format ASoC: fsl-asoc-card: Support new property fsl,asrc-format

[PATCH v6 1/7] ASoC: fsl_asrc: rename asrc_priv to asrc

2020-04-01 Thread Shengjiu Wang
In order to move common structure to fsl_asrc_common.h we change the name of asrc_priv to asrc, the asrc_priv will be used by new struct fsl_asrc_priv. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_asrc.c | 298 +-- sound/soc/fsl/fsl_asrc.h | 4

[PATCH v6 2/7] ASoC: dt-bindings: fsl_asrc: Add new property fsl, asrc-format

2020-04-01 Thread Shengjiu Wang
. The fsl,asrc-format can replace the fsl,asrc-width, then driver can accept format from devicetree, don't need to convert it to format through width. Signed-off-by: Shengjiu Wang --- Documentation/devicetree/bindings/sound/fsl,asrc.txt | 4 1 file changed, 4 insertions(+) diff --

[PATCH v6 3/7] ASoC: fsl-asoc-card: Support new property fsl, asrc-format

2020-04-01 Thread Shengjiu Wang
In order to align with new ESARC, we add new property fsl,asrc-format. The fsl,asrc-format can replace the fsl,asrc-width, driver can accept format from devicetree, don't need to convert it to format through width. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl-asoc-card.c

[PATCH v6 4/7] ASoC: fsl_asrc: Support new property fsl,asrc-format

2020-04-01 Thread Shengjiu Wang
In order to align with new ESARC, we add new property fsl,asrc-format. The fsl,asrc-format can replace the fsl,asrc-width, driver can accept format from devicetree, don't need to convert it to format through width. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_asrc.c

[PATCH v6 5/7] ASoC: fsl_asrc: Move common definition to fsl_asrc_common

2020-04-01 Thread Shengjiu Wang
. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_asrc.c| 81 +++- sound/soc/fsl/fsl_asrc.h| 74 ++ sound/soc/fsl/fsl_asrc_common.h | 105 sound/soc/fsl/fsl_asrc_dma.c| 25 4 files changed, 176

[PATCH v6 6/7] ASoC: dt-bindings: fsl_easrc: Add document for EASRC

2020-04-01 Thread Shengjiu Wang
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.yaml | 101 ++ 1 file changed, 101 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/fsl

[PATCH v6 7/7] ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers

2020-04-01 Thread Shengjiu Wang
: Shengjiu Wang Signed-off-by: Cosmin-Gabriel Samoila --- sound/soc/fsl/Kconfig | 11 + sound/soc/fsl/Makefile|2 + sound/soc/fsl/fsl_easrc.c | 2114 + sound/soc/fsl/fsl_easrc.h | 651 4 files changed, 2778 insertions(+) create mode 100644

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

2019-10-23 Thread Shengjiu Wang
fsl_esai: recover the channel swap after xrun") Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_esai.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c index 37b14c48b537..6a797648b66d 100644 --- a/sound/soc/fsl/fsl_esai.c +++ b/

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

2019-10-25 Thread Shengjiu Wang
. For non-ideal ratio mode, the clock rate should divide the sample rate with no remainder, and the quotient should be less than 1024. Signed-off-by: Shengjiu Wang --- Change in v2 - remove p2p/m2m word - use use_ideal_rate sound/soc/fsl/fsl_asrc.c | 37 +++-- 1

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

2019-10-25 Thread Shengjiu Wang
ock to lock those functions. Fixes: 7ccafa2b3879 ("ASoC: fsl_esai: recover the channel swap after xrun") Signed-off-by: Shengjiu Wang --- Change in v2 -add lock for fsl_esai_trigger_start. sound/soc/fsl/fsl_esai.c | 12 1 file changed, 12 insertions(+) diff --git a/sound/so

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

2019-10-28 Thread Shengjiu Wang
. For non-ideal ratio mode, the clock rate should divide the sample rate with no remainder, and the quotient should be less than 1024. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen --- Change in v3 - refine comments Change in v2 - remove p2p/m2m word - use use_ideal_rate sound/soc/fsl

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

2019-10-28 Thread Shengjiu Wang
ock to lock those functions. Fixes: 7ccafa2b3879 ("ASoC: fsl_esai: recover the channel swap after xrun") Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen --- Change in v3 -refine comments Change in v2 -add lock for fsl_esai_trigger_start. sound/soc/fsl/fsl_esai.c | 12

[PATCH 1/2] ASoC: dt-bindings: fsl_asrc: add compatible string for imx8qm

2019-10-29 Thread Shengjiu Wang
In order to support the two asrc modules in imx8qm, we need to add compatible string "fsl,imx8qm-asrc0" and "fsl,imx8qm-asrc1" Signed-off-by: Shengjiu Wang --- Documentation/devicetree/bindings/sound/fsl,asrc.txt | 3 ++- 1 file changed, 2 insertions(+), 1 delet

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

2019-10-29 Thread Shengjiu Wang
request corresponding to one dma channel. So we need to request dma channel with dma request of asrc module. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_asrc.c | 91 +--- sound/soc/fsl/fsl_asrc.h | 65 +- sound/soc/fsl

[PATCH V2 1/2] ASoC: dt-bindings: fsl_asrc: add compatible string for imx8qm

2019-10-30 Thread Shengjiu Wang
In order to support the two asrc modules in imx8qm, we need to add compatible string "fsl,imx8qm-asrc0" and "fsl,imx8qm-asrc1" Signed-off-by: Shengjiu Wang --- Documentation/devicetree/bindings/sound/fsl,asrc.txt | 3 ++- 1 file changed, 2 insertions(+), 1 delet

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

2019-10-30 Thread Shengjiu Wang
request corresponding to one dma channel. So we need to request dma channel with dma request of asrc module. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen --- Changes in v2 - use !use_edma to wrap code in fsl_asrc_dma - add Acked-by: Nicolin Chen sound/soc/fsl/fsl_asrc.c | 91

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

2019-11-05 Thread Shengjiu Wang
Audmix support two substream, When two substream start to run, the trigger function may be called by two substream in same time, that the priv->tdms may be updated wrongly. The expected priv->tdms is 0x3, but sometimes the result is 0x2, or 0x1. Signed-off-by: Shengjiu Wang --- sound/s

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

2019-11-10 Thread Shengjiu Wang
Hi On Sat, Nov 9, 2019 at 10:48 AM Nicolin Chen wrote: > > On Wed, Nov 06, 2019 at 03:27:45PM +0800, Shengjiu Wang wrote: > > Audmix support two substream, When two substream start > > to run, the trigger function may be called by two substream > > in same time, th

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

2019-11-10 Thread Shengjiu Wang
Audio Mixer CPU DAI driver") Cc: Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen --- Change in v2 -add Fixes, Cc stable, and Acked-by. sound/soc/fsl/fsl_audmix.c | 6 ++ sound/soc/fsl/fsl_audmix.h | 1 + 2 files changed, 7 insertions(+) diff --git a/sound/soc/fsl/fsl_audmix.c

[PATCH V3 1/2] ASoC: dt-bindings: fsl_asrc: add compatible string for imx8qm

2019-11-11 Thread Shengjiu Wang
Add compatible string "fsl,imx8qm-asrc" for imx8qm platform. There are two asrc modules in imx8qm, the clock mapping is different for each other, so add new property "fsl,asrc-clk-map" to distinguish them. Signed-off-by: Shengjiu Wang --- changes in v2 -none changes

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

2019-11-11 Thread Shengjiu Wang
request corresponding to one dma channel. So we need to request dma channel with dma request of asrc module. Signed-off-by: Shengjiu Wang --- changes in v2 - use !use_edma to wrap code in fsl_asrc_dma - add Acked-by: Nicolin Chen changes in v3 - remove the acked-by for commit is updated - read

Re: [alsa-devel] [PATCH V3 1/2] ASoC: dt-bindings: fsl_asrc: add compatible string for imx8qm

2019-11-14 Thread Shengjiu Wang
Hi Rob On Fri, Nov 15, 2019 at 5:14 AM Rob Herring wrote: > > On Mon, Nov 11, 2019 at 05:18:22PM +0800, Shengjiu Wang wrote: > > Add compatible string "fsl,imx8qm-asrc" for imx8qm platform. > > > > There are two asrc modules in imx8qm, the clock mapping is &g

[PATCH v4 1/2] ASoC: dt-bindings: fsl_asrc: add compatible string for imx8qm & imx8qxp

2019-12-02 Thread Shengjiu Wang
Add compatible string "fsl,imx8qm-asrc" for imx8qm platform, "fsl,imx8qxp-asrc" for imx8qxp platform. There are two asrc modules in imx8qm & imx8qxp, the clock mapping is different for each other, so add new property "fsl,asrc-clk-map" to distinguish t

  1   2   3   4   5   6   7   8   >