Re: [PATCH v2 00/25] iommu: Make default_domain's mandatory

2023-05-17 Thread Nicolin Chen
On Mon, May 15, 2023 at 09:00:33PM -0300, Jason Gunthorpe wrote: > This is on github: > https://github.com/jgunthorpe/linux/commits/iommu_all_defdom Ran some VFIO-passthrough sanity on x86 and ARM64, using this branch. It should cover partially this series. So, if I may: Tested-by: N

Re: [PATCH] ASoC: fsl_asrc: Add initialization finishing check in runtime resume

2022-09-06 Thread Nicolin Chen
On Tue, Sep 6, 2022 at 3:50 AM Shengjiu Wang wrote: >> >> > + /* Wait for status of initialization for every enabled pairs */ >> >> > + do { >> >> > + udelay(5); >> >> > + regmap_read(asrc->regmap, REG_ASRCFG, ); >> >> > + reg = (reg >>

Re: [PATCH] ASoC: fsl_sai: Remove unnecessary FIFO reset in ISR

2022-08-17 Thread Nicolin Chen
On Tue, Aug 16, 2022 at 10:41 PM Shengjiu Wang wrote: > > The FIFO reset drops the words in the FIFO, which may cause > channel swap when SAI module is running, especially when the > DMA speed is low. So it is not good to do FIFO reset in ISR, > then remove the operation. I don't recall the

Re: [PATCH 4/4] ASoC: fsl: drop unneeded snd_soc_dai_set_drvdata

2021-02-17 Thread Nicolin Chen
data(y,x); > // > > Signed-off-by: Julia Lawall Acked-by: Nicolin Chen

Re: [PATCH] ASoC: fsl: fix -Wmaybe-uninitialized warning

2020-12-31 Thread Nicolin Chen
On Wed, Dec 30, 2020 at 04:44:15PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > Clang points out a code path that returns an undefined value > in an error case: > > sound/soc/fsl/imx-hdmi.c:165:6: error: variable 'ret' is used uninitialized > whenever 'if' condition is true

Re: [PATCH v2 2/2] ASoC: fsl: Add imx-hdmi machine driver

2020-12-07 Thread Nicolin Chen
iver devices. > > Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen

Re: [PATCH v4 1/2] ASoC: fsl_xcvr: Add XCVR ASoC CPU DAI driver

2020-10-16 Thread Nicolin Chen
On Tue, Oct 13, 2020 at 03:17:32PM +0300, Viorel Suman (OSS) wrote: > From: Viorel Suman > > XCVR (Audio Transceiver) is a on-chip functional module found > on i.MX8MP. It support HDMI2.1 eARC, HDMI1.4 ARC and SPDIF. > > Signed-off-by: Viorel Suman Acked-by: Nicolin Chen

Re: [PATCH 1/2] ASoC: fsl_xcvr: Add XCVR ASoC CPU DAI driver

2020-09-17 Thread Nicolin Chen
Hi Viorel, It looks pretty clean to me, though some small comments inline. On Wed, Sep 16, 2020 at 12:17:55PM +0300, Viorel Suman (OSS) wrote: > From: Viorel Suman > > XCVR (Audio Transceiver) is a on-chip functional module found > on i.MX8MP. It support HDMI2.1 eARC, HDMI1.4 ARC and SPDIF. >

Re: [PATCH] ASoC: fsl_audmix: make clock and output src write only

2020-09-16 Thread Nicolin Chen
for configuration propagation. Make these two controls > write only so that their values are not stored at "alsactl store". > > Signed-off-by: Viorel Suman Acked-by: Nicolin Chen > --- > sound/soc/fsl/fsl_audmix.c | 16 > 1 file changed, 12 insertion

Re: [PATCH] ASoC: fsl_sai: Set SAI Channel Mode to Output Mode

2020-09-02 Thread Nicolin Chen
ri-stated, > there is noise on some channels when FS clock value is high and data is > read while fsclk is transitioning from high to low. > > Signed-off-by: Cosmin-Gabriel Samoila > Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Though one nit inline: > --- > sound/soc/fsl/fsl_sa

Re: [PATCH 0/2] dma-mapping: update default segment_boundary_mask

2020-09-02 Thread Nicolin Chen
On Wed, Sep 02, 2020 at 10:13:12AM +0200, Niklas Schnelle wrote: > On 9/2/20 12:16 AM, Nicolin Chen wrote: > > These two patches are to update default segment_boundary_mask. > > > > PATCH-1 fixes overflow issues in callers of dma_get_seg_boundary. > > Previous

[PATCH 2/2] dma-mapping: set default segment_boundary_mask to ULONG_MAX

2020-09-01 Thread Nicolin Chen
mits those devices capable of 32+ bits addressing. So this patch sets default segment_boundary_mask to ULONG_MAX. Signed-off-by: Nicolin Chen --- include/linux/dma-mapping.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mappi

[PATCH 0/2] dma-mapping: update default segment_boundary_mask

2020-09-01 Thread Nicolin Chen
These two patches are to update default segment_boundary_mask. PATCH-1 fixes overflow issues in callers of dma_get_seg_boundary. Previous version was a series: https://lkml.org/lkml/2020/8/31/1026 Then PATCH-2 sets default segment_boundary_mask to ULONG_MAX. Nicolin Chen (2): dma-mapping

[PATCH 1/2] dma-mapping: introduce dma_get_seg_boundary_nr_pages()

2020-09-01 Thread Nicolin Chen
lies dma_get_seg_boundary_nr_pages() as an overflow-free helper for the dma_get_seg_boundary() callers to get numbers of pages. It also takes care of the NULL dev case for non-DMA API callers. Suggested-by: Christoph Hellwig Signed-off-by: Nicolin Chen --- arch/alpha/kernel/pci_iommu.c| 7 +--

Re: [RESEND][PATCH 1/7] powerpc/iommu: Avoid overflow at boundary_size

2020-09-01 Thread Nicolin Chen
On Tue, Sep 01, 2020 at 11:27:36PM +1000, Michael Ellerman wrote: > Nicolin Chen writes: > > The boundary_size might be as large as ULONG_MAX, which means > > that a device has no specific boundary limit. So either "+ 1" > > or passing it to ALIGN() would potentia

Re: [RESEND][PATCH 0/7] Avoid overflow at boundary_size

2020-09-01 Thread Nicolin Chen
Hi Christoph, On Tue, Sep 01, 2020 at 09:36:23AM +0200, Christoph Hellwig wrote: > I really don't like all the open coded smarts in the various drivers. > What do you think about a helper like the one in the untested patch A helper function will be actually better. I was thinking of one yet not

[RESEND][PATCH 7/7] parisc: Avoid overflow at boundary_size

2020-08-31 Thread Nicolin Chen
; s = [b + (1 << s)] >> s = (b >> s) + 1 So fixing a potential overflow with the safer shortcut. Signed-off-by: Nicolin Chen Cc: Christoph Hellwig --- drivers/parisc/ccio-dma.c | 4 ++-- drivers/parisc/sba_iommu.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --gi

[RESEND][PATCH 6/7] x86/amd_gart: Avoid overflow at boundary_size

2020-08-31 Thread Nicolin Chen
; s = [b + (1 << s)] >> s = (b >> s) + 1 So fixing a potential overflow with the safer shortcut. Signed-off-by: Nicolin Chen Cc: Christoph Hellwig --- arch/x86/kernel/amd_gart_64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/amd_gart_64.c b/a

[RESEND][PATCH 5/7] sparc: Avoid overflow at boundary_size

2020-08-31 Thread Nicolin Chen
; s = [b + (1 << s)] >> s = (b >> s) + 1 So fixing a potential overflow with the safer shortcut. Signed-off-by: Nicolin Chen Cc: Christoph Hellwig --- arch/sparc/kernel/iommu-common.c | 9 +++-- arch/sparc/kernel/iommu.c| 4 ++-- arch/sparc/kernel/pci_sun4v.c| 4 ++-

[RESEND][PATCH 4/7] s390/pci_dma: Avoid overflow at boundary_size

2020-08-31 Thread Nicolin Chen
; s = [b + (1 << s)] >> s = (b >> s) + 1 So fixing a potential overflow with the safer shortcut. Signed-off-by: Nicolin Chen Cc: Christoph Hellwig --- arch/s390/pci/pci_dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/s390/pci/pci_dma.c b/arch/s390/pci/

[RESEND][PATCH 0/7] Avoid overflow at boundary_size

2020-08-31 Thread Nicolin Chen
<< s) - 1) >> s = {[b + 1 + (1 << s) - 1] & ~[(1 << s) - 1]} >> s = [b + 1 + (1 << s) - 1] >> s = [b + (1 << s)] >> s = (b >> s) + 1 So this series of patches fix the potential overflow with this overflow-free shortcut. As I don't

[RESEND][PATCH 3/7] ia64/sba_iommu: Avoid overflow at boundary_size

2020-08-31 Thread Nicolin Chen
; s = [b + (1 << s)] >> s = (b >> s) + 1 So fixing a potential overflow with the safer shortcut. Signed-off-by: Nicolin Chen Cc: Christoph Hellwig --- arch/ia64/hp/common/sba_iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/ia64/hp/common/sba_iommu.c

[RESEND][PATCH 1/7] powerpc/iommu: Avoid overflow at boundary_size

2020-08-31 Thread Nicolin Chen
; s = [b + (1 << s)] >> s = (b >> s) + 1 So fixing a potential overflow with the safer shortcut. Reported-by: Stephen Rothwell Signed-off-by: Nicolin Chen Cc: Christoph Hellwig --- arch/powerpc/kernel/iommu.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-)

[RESEND][PATCH 2/7] alpha: Avoid overflow at boundary_size

2020-08-31 Thread Nicolin Chen
N_MASK(b + 1, (1 << s) - 1) >> s = {[b + 1 + (1 << s) - 1] & ~[(1 << s) - 1]} >> s = [b + 1 + (1 << s) - 1] >> s = [b + (1 << s)] >> s = (b >> s) + 1 So fixing a potential overflow with the safer shortcut. Signed-off-by: Nicolin Chen

Re: [RFT][PATCH 0/7] Avoid overflow at boundary_size

2020-08-25 Thread Nicolin Chen
Hi Niklas, On Tue, Aug 25, 2020 at 12:16:27PM +0200, Niklas Schnelle wrote: > On 8/21/20 1:19 AM, Nicolin Chen wrote: > > We are expending the default DMA segmentation boundary to its > > possible maximum value (ULONG_MAX) to indicate that a device > > doesn't specify a b

[RFT][PATCH 1/7] powerpc/iommu: Avoid overflow at boundary_size

2020-08-20 Thread Nicolin Chen
; s = [b + (1 << s)] >> s = (b >> s) + 1 So fixing a potential overflow with the safer shortcut. Reported-by: Stephen Rothwell Signed-off-by: Nicolin Chen Cc: Christoph Hellwig --- arch/powerpc/kernel/iommu.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-)

[RFT][PATCH 0/7] Avoid overflow at boundary_size

2020-08-20 Thread Nicolin Chen
1 << s)] >> s = (b >> s) + 1 So this series of patches fix the potential overflow with this overflow-free shortcut. As I don't think that I have these platforms, marking RFT. Thanks Nic Nicolin Chen (7): powerpc/iommu: Avoid overflow at boundary_size alpha: Avoid overfl

Re: [PATCH v2] ASoC: fsl-asoc-card: Get "extal" clock rate by clk_get_rate

2020-08-10 Thread Nicolin Chen
> don't reuse the clock rate of mclk. > > Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen

Re: [PATCH] ASoC: fsl_sai: Clean code for synchronize mode

2020-08-04 Thread Nicolin Chen
On Tue, Aug 04, 2020 at 12:03:46AM -0700, Nicolin Chen wrote: > On Tue, Aug 04, 2020 at 12:22:53PM +0800, Shengjiu Wang wrote: > > > > > Btw, do we need similar change for TRIGGER_STOP? > > > > > > This is a good question. It is better to do ch

Re: [PATCH 0/4] ASoC: fsl_asrc: allow selecting arbitrary clocks

2020-07-22 Thread Nicolin Chen
On Fri, Jul 17, 2020 at 01:16:42PM +0200, Arnaud Ferraris wrote: > Hi Nic, > > Le 02/07/2020 à 20:42, Nicolin Chen a écrit : > > Hi Arnaud, > > > > On Thu, Jul 02, 2020 at 04:22:31PM +0200, Arnaud Ferraris wrote: > >> The current ASRC driver hardco

Re: [PATCH v2 1/1] ASoC: fsl: fsl-asoc-card: Trivial: Fix misspelling of 'exists'

2020-07-15 Thread Nicolin Chen
On Wed, Jul 15, 2020 at 04:00:09PM +0100, Lee Jones wrote: > Cc: Timur Tabi > Cc: Nicolin Chen Acked-by: Nicolin Chen > Cc: Xiubo Li > Cc: Fabio Estevam > Cc: linuxppc-dev@lists.ozlabs.org > Signed-off-by: Lee Jones > --- > sound/soc/fsl/fsl-asoc-card.c | 2

Re: [PATCH 3/3] ASoC: fsl-asoc-card: Support Headphone and Microphone Jack detection

2020-07-15 Thread Nicolin Chen
On Wed, Jul 15, 2020 at 12:14:01PM +0800, Shengjiu Wang wrote: > On Wed, Jul 15, 2020 at 5:16 AM Nicolin Chen wrote: > > > > Hi Shengjiu, > > > > The whole series looks good to me. Just a couple of small > > questions inline: > > > > On Tue, Jul 14,

Re: [PATCH 3/3] ASoC: fsl-asoc-card: Support Headphone and Microphone Jack detection

2020-07-14 Thread Nicolin Chen
Hi Shengjiu, The whole series looks good to me. Just a couple of small questions inline: On Tue, Jul 14, 2020 at 05:05:36PM +0800, Shengjiu Wang wrote: > Use asoc_simple_init_jack function from simple card to implement > the Headphone and Microphone detection. > Register notifier to disable

[PATCH v2] MAINTAINERS: Add Shengjiu to reviewer list of sound/soc/fsl

2020-07-06 Thread Nicolin Chen
Add Shengjiu who's actively working on the latest fsl/nxp audio drivers. Signed-off-by: Nicolin Chen Acked-by: Shengjiu Wang Reviewed-by: Fabio Estevam --- Changelog v1->v2: * Replaced Shengjiu's emaill address with his gmail one * Added Acked-by from Shengjiu and Reviewed-by from Fa

Re: [PATCH v2] ASoC: fsl_asrc: Add an option to select internal ratio mode

2020-07-03 Thread Nicolin Chen
On Fri, Jul 03, 2020 at 11:50:20PM +0100, Mark Brown wrote: > On Fri, Jul 03, 2020 at 03:46:58PM -0700, Nicolin Chen wrote: > > > > [1/1] ASoC: fsl_asrc: Add an option to select internal ratio mode > > > commit: d0250cf4f2abfbea64ed247230f08f5ae23979f0 >

Re: [PATCH v2] ASoC: fsl_asrc: Add an option to select internal ratio mode

2020-07-03 Thread Nicolin Chen
Hi Mark, On Fri, Jul 03, 2020 at 06:03:43PM +0100, Mark Brown wrote: > On Tue, 30 Jun 2020 16:47:56 +0800, Shengjiu Wang wrote: > > The ASRC not only supports ideal ratio mode, but also supports > > internal ratio mode. > > > > For internal rato mode, the rate of clock source should be divided >

[PATCH] MAINTAINERS: Add Shengjiu to reviewer list of sound/soc/fsl

2020-07-02 Thread Nicolin Chen
Add Shengjiu who's actively working on the latest fsl/nxp audio drivers. Signed-off-by: Nicolin Chen Cc: Shengjiu Wang --- To Shengjiu, please ack if you feel okay with this (your email address too). MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS

Re: [PATCH 6/6] ASoC: fsl: fsl_esai: fix kernel-doc

2020-07-02 Thread Nicolin Chen
HCKT/HCKR) Can drop "This function mainly" > /** > - * This function configures the related dividers according to the bclk rate > + * fsl_esai_set_bclk - This function configures the related dividers > according to the bclk rate Here too -- dropping "This function" Otherwise, Acked-by: Nicolin Chen Thanks!

Re: [PATCH 5/6] ASoC: fsl: fsl_asrc: fix kernel-doc

2020-07-02 Thread Nicolin Chen
On Thu, Jul 02, 2020 at 12:22:26PM -0500, Pierre-Louis Bossart wrote: > Fix W=1 warnings. fix kernel doc and describe arguments. > > Signed-off-by: Pierre-Louis Bossart Acked-by: Nicolin Chen

Re: [PATCH 4/6] ASoC: fsl: fsl_spdif: fix kernel-doc

2020-07-02 Thread Nicolin Chen
On Thu, Jul 02, 2020 at 12:22:25PM -0500, Pierre-Louis Bossart wrote: > Fix W=1 warnings. kernel-doc syntax was not followed and missing parameter > > Signed-off-by: Pierre-Louis Bossart Acked-by: Nicolin Chen

Re: [PATCH 3/6] ASoC: fsl: fsl-asoc-card: fix kernel-doc

2020-07-02 Thread Nicolin Chen
efore "Freescale"? Other parts of your changes don't really add this word. Otherwise, Acked-by: Nicolin Chen

Re: [PATCH 2/6] ASoC: fsl: fsl_ssi: fix kernel-doc

2020-07-02 Thread Nicolin Chen
On Thu, Jul 02, 2020 at 12:22:23PM -0500, Pierre-Louis Bossart wrote: > Fix W=1 warnings. The kernel-doc support is partial, add more > descriptions and follow proper syntax > > Signed-off-by: Pierre-Louis Bossart Acked-by: Nicolin Chen

Re: [PATCH 1/6] ASoC: fsl: fsl_ssi_dbg: remove spurious kernel-doc comment start

2020-07-02 Thread Nicolin Chen
On Thu, Jul 02, 2020 at 12:22:22PM -0500, Pierre-Louis Bossart wrote: > Fix W=1 warnings. There is no kernel-doc here. > > Signed-off-by: Pierre-Louis Bossart Acked-by: Nicolin Chen

Re: [PATCH 0/4] ASoC: fsl_asrc: allow selecting arbitrary clocks

2020-07-02 Thread Nicolin Chen
Hi Arnaud, On Thu, Jul 02, 2020 at 04:22:31PM +0200, Arnaud Ferraris wrote: > The current ASRC driver hardcodes the input and output clocks used for > sample rate conversions. In order to allow greater flexibility and to > cover more use cases, it would be preferable to select the clocks using >

Re: [PATCH v3] ASoC: fsl_asrc: Add an option to select internal ratio mode

2020-07-01 Thread Nicolin Chen
t; Signed-off-by: Shengjiu Wang Reviewed-by: Nicolin Chen

Re: [PATCH] ASoC: fsl_asrc: Add an option to select internal ratio mode

2020-06-29 Thread Nicolin Chen
On Mon, Jun 29, 2020 at 09:58:35PM +0800, Shengjiu Wang wrote: > The ASRC not only supports ideal ratio mode, but also supports > internal ratio mode. > > For internal rato mode, the rate of clock source should be divided > with no remainder by sample rate, otherwise there is sound > distortion.

Re: [PATCH] ASoC: fsl_sai: Refine regcache usage with pm runtime

2020-06-29 Thread Nicolin Chen
f > probe() and regcache_mark_dirty should be moved to pm runtime resume > callback function. > > Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen

Re: [PATCH 2/2] ASoC: bindings: fsl-asoc-card: Add compatible string for wm8524

2020-06-23 Thread Nicolin Chen
On Tue, Jun 23, 2020 at 02:52:47PM +0800, Shengjiu Wang wrote: > In order to support wm8524 codec with fsl-asoc-card machine > driver, add compatible string "fsl,imx-audio-wm8524". > > Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen

Re: [PATCH 1/2] ASoC: fsl-asoc-card: Add WM8524 support

2020-06-23 Thread Nicolin Chen
On Tue, Jun 23, 2020 at 02:52:46PM +0800, Shengjiu Wang wrote: > WM8524 only supports playback mode, and only works at > slave mode. > > Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen

Re: [PATCH v2 2/2] ASoC: fsl_mqs: Fix unchecked return value for clk_prepare_enable

2020-06-23 Thread Nicolin Chen
On Tue, Jun 23, 2020 at 02:01:12PM +0800, Shengjiu Wang wrote: > Fix unchecked return value for clk_prepare_enable, add error > handler in fsl_mqs_runtime_resume. > > Fixes: 9e28f6532c61 ("ASoC: fsl_mqs: Add MQS component driver") > Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen

Re: [PATCH v2 1/2] ASoC: fsl_mqs: Don't check clock is NULL before calling clk API

2020-06-23 Thread Nicolin Chen
oC: fsl_mqs: Add MQS component driver") > Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen

Re: [PATCH] ASoC: fsl_easrc: Fix uninitialized scalar variable in fsl_easrc_set_ctx_format

2020-06-22 Thread Nicolin Chen
igned-off-by: Shengjiu Wang Acked-by: Nicolin Chen

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

2020-06-18 Thread Nicolin Chen
ume is replaced by pm_runtime_force_resume. > > Signed-off-by: Shengjiu Wang LGTM, yet some nits, please add my ack after fixing: Acked-by: Nicolin Chen > @@ -495,25 +496,10 @@ static int fsl_spdif_startup(struct snd_pcm_substream > *substream, > > -disable_t

Re: [PATCH v2 2/2] ASoC: fsl-asoc-card: Add MQS support

2020-06-17 Thread Nicolin Chen
no "audio-routing" property in > devicetree, so add some enhancement for these two property. > > Signed-off-by: Shengjiu Wang Reviewed-by: Nicolin Chen

Re: [PATCH v2 2/2] ASoC: fsl_spdif: Add support for imx6sx platform

2020-06-17 Thread Nicolin Chen
independent", against "independent" ;) > then we will not do the clk_set_rate and clk_round_rate to avoid > impact ASRC module usage. > > As add a new flags, we include the soc specific data struct. > > Signed-off-by: Shengjiu Wang Can add this once fixing th

Re: [PATCH 2/2] ASoC: fsl-asoc-card: Add MQS support

2020-06-16 Thread Nicolin Chen
On Tue, Jun 16, 2020 at 03:30:37PM +0800, Shengjiu Wang wrote: > The MQS codec isn't an i2c device, so add a new platform device for it. > > MQS only support playback, so add a new audio map. > > Add there maybe "model" property or no "audio-routing" property insertions "Add" => "And" >

Re: [PATCH 2/2] ASoC: fsl_spdif: Add support for imx6sx platform

2020-06-16 Thread Nicolin Chen
On Tue, Jun 16, 2020 at 02:42:41PM +0800, Shengjiu Wang wrote: > The one difference on imx6sx platform is that the root clock > is shared with ASRC module, so we add a new flags "ind_root_clk" > which means the root clock is independent, then we will not > do the clk_set_rate and clk_round_rate to

Re: [PATCH v3] ASoC: fsl_ssi: Fix bclk calculation for mono channel

2020-06-15 Thread Nicolin Chen
_MODE_MASK) > to check if it is I2S Master mode. > > So we refine the formula for mono channel, otherwise there > will be sound issue for S24_LE. > > Fixes: b0a7043d5c2c ("ASoC: fsl_ssi: Caculate bit clock rate using slot > number and width") > Signed-off-by: Shengjiu Wang Reviewed-by: Nicolin Chen

Re: [PATCH v2] ASoC: fsl_ssi: Fix bclk calculation for mono channel

2020-06-15 Thread Nicolin Chen
On Tue, Jun 16, 2020 at 09:48:39AM +0800, Shengjiu Wang wrote: > On Tue, Jun 16, 2020 at 7:11 AM Nicolin Chen wrote: > > > > On Mon, Jun 15, 2020 at 01:56:18PM +0800, Shengjiu Wang wrote: > > > For mono channel, SSI will switch to Normal mode. > > > > > >

Re: [PATCH v2] ASoC: fsl_ssi: Fix bclk calculation for mono channel

2020-06-15 Thread Nicolin Chen
On Mon, Jun 15, 2020 at 01:56:18PM +0800, Shengjiu Wang wrote: > For mono channel, SSI will switch to Normal mode. > > In Normal mode and Network mode, the Word Length Control bits > control the word length divider in clock generator, which is > different with I2S Master mode (the word length is

Re: [PATCH] ASoC: fsl_ssi: Fix bclk calculation for mono channel

2020-06-12 Thread Nicolin Chen
On Tue, Jun 09, 2020 at 04:19:28PM +0800, Shengjiu Wang wrote: > For mono channel, ssi will switch to normal mode. In normal > mode, the Word Length Control bits control the word length > divider in clock generator, which is different with I2S master > mode, the word length is fixed to 32bit. > >

Re: [RFC PATCH v3 4/4] ASoC: fsl_asrc_dma: Fix data copying speed issue with EDMA

2020-06-12 Thread Nicolin Chen
IFO, > > Signed-off-by: Shengjiu Wang Reviewed-by: Nicolin Chen

Re: [RFC PATCH v3 3/4] ASoC: fsl_asrc_dma: Reuse the dma channel if available in Back-End

2020-06-12 Thread Nicolin Chen
soc_component_to_pcm). If we can get the dma channel, then reuse it, > if can't, then request a new one. > > Signed-off-by: Shengjiu Wang Reviewed-by: Nicolin Chen

Re: [RFC PATCH v3 2/4] ASoC: dmaengine_pcm: export soc_component_to_pcm

2020-06-12 Thread Nicolin Chen
On Fri, Jun 12, 2020 at 03:37:49PM +0800, Shengjiu Wang wrote: > In DPCM case, Front-End needs to get the dma chan which has > been requested by Back-End and reuse it. > > Signed-off-by: Shengjiu Wang Reviewed-by: Nicolin Chen

Re: [RFC PATCH v3 1/4] ASoC: soc-card: export snd_soc_lookup_component_nolocked

2020-06-12 Thread Nicolin Chen
ma chan created > by Back-End component and reused it in Front-End. > > Signed-off-by: Shengjiu Wang Reviewed-by: Nicolin Chen

Re: [RFC PATCH v2 3/3] ASoC: fsl_asrc_dma: Reuse the dma channel if available in Back-End

2020-06-11 Thread Nicolin Chen
On Fri, Jun 12, 2020 at 10:17:08AM +0800, Shengjiu Wang wrote: > > > diff --git a/sound/soc/fsl/fsl_asrc_common.h > > > b/sound/soc/fsl/fsl_asrc_common.h > > > + * @req_dma_chan_dev_to_dev: flag for release dev_to_dev chan > > > > Since we only have dma_request call for back-end only: > > + *

Re: [RFC PATCH v2 3/3] ASoC: fsl_asrc_dma: Reuse the dma channel if available in Back-End

2020-06-11 Thread Nicolin Chen
On Wed, Jun 10, 2020 at 06:05:49PM +0800, Shengjiu Wang wrote: > The dma channel has been requested by Back-End cpu dai driver already. > If fsl_asrc_dma requests dma chan with same dma:tx symlink, then > there will be below warning with SDMA. > > [ 48.174236] fsl-esai-dai 2024000.esai: Cannot

Re: [PATCH 3/3] ASoC: fsl_easrc: Fix "Function parameter not described" warnings

2020-06-03 Thread Nicolin Chen
ember 'shift' > not described in 'fsl_easrc_normalize_filter' > > Fixes: 955ac624058f ("ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers") > Signed-off-by: Shengjiu Wang > Reported-by: kbuild test robot Acked-by: Nicolin Chen

Re: [PATCH 2/3] ASoC: fsl_easrc: Fix -Wunused-but-set-variable

2020-06-03 Thread Nicolin Chen
C CPU DAI drivers") > Signed-off-by: Shengjiu Wang > Reported-by: kbuild test robot Acked-by: Nicolin Chen

Re: [PATCH 1/3] ASoC: fsl_easrc: Fix -Wmissing-prototypes warning

2020-06-03 Thread Nicolin Chen
f this translation unit > struct dma_chan *fsl_easrc_get_dma_channel(struct fsl_asrc_pair *ctx, > ^ > static > > Fixes: 955ac624058f ("ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers") > Signed-off-by: Shengjiu Wang > Reported-by: kbuild test robot Acked-by: Nicolin Chen

Re: [PATCH] ASoC: fsl_asrc: Merge suspend/resume function to runtime_suspend/resume

2020-05-25 Thread Nicolin Chen
On Mon, May 25, 2020 at 02:11:18PM +0800, Shengjiu Wang wrote: > > > @@ -1135,6 +1137,24 @@ static int fsl_asrc_runtime_resume(struct device > > > *dev) > > > goto disable_asrck_clk; > > > } > > > > > > + /* Stop all pairs provisionally */ > > > +

Re: [PATCH] ASoC: fsl_asrc: Merge suspend/resume function to runtime_suspend/resume

2020-05-25 Thread Nicolin Chen
function > to runtime_suspend/resume function and enable regcache only in end of > probe. > > Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen

Re: [PATCH] ASoC: fsl_asrc: Merge suspend/resume function to runtime_suspend/resume

2020-05-24 Thread Nicolin Chen
On Fri, May 22, 2020 at 05:57:24PM +0800, Shengjiu Wang wrote: > With dedicated power domain for asrc, power can be disabled after > probe and pm runtime suspend, then the value of all registers need to > be restored in pm runtime resume. So we can merge suspend/resume function > to

Re: [PATCH 1/3] ASoC: fsl_esai: introduce SoC specific data

2020-05-04 Thread Nicolin Chen
; > Signed-off-by: Shengjiu Wang Though the 2nd patch is having comments to address, this one looks fine to me and should be able to merge as long as Mark is okay with this too: Acked-by: Nicolin Chen

Re: [PATCH v2] ASoC: fsl_esai: Disable exception interrupt before scheduling tasklet

2020-04-27 Thread Nicolin Chen
nnel swap after xrun") > Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen

Re: [PATCH v2] ASoC: fsl_easrc: Check for null pointer before dereferencing "ctx" in fsl_easrc_hw_free()

2020-04-26 Thread Nicolin Chen
= ~BIT(substream->stream); > 1531 fsl_easrc_release_context(ctx); > > Fixes: 955ac624058f ("ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers") > Reported-by: Dan Carpenter > Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen

Re: [PATCH] ASoC: fsl_esai: Remove the tasklet

2020-04-24 Thread Nicolin Chen
On Fri, Apr 24, 2020 at 02:54:06PM +0800, Shengjiu Wang wrote: > Remove tasklet for it may cause the reset operation > can't be handled immediately, then there will be > endless xrun interrupt. The reset routine is really long and expensive, so not sure if it'd be good to do it completely inside

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

2020-04-13 Thread Nicolin Chen
On Tue, Apr 14, 2020 at 08:43:07AM +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 definition to a separate header file. > > And add fsl_asrc_pair_priv and fsl_asrc_priv for

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

2020-04-13 Thread Nicolin Chen
On Tue, Apr 14, 2020 at 10:21:29AM +0800, Shengjiu Wang wrote: > On Tue, Apr 14, 2020 at 10:09 AM Nicolin Chen wrote: > > > > On Tue, Apr 14, 2020 at 08:43:07AM +0800, Shengjiu Wang wrote: > > > There is a new ASRC included in i.MX serial platform, there > > &g

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

2020-04-13 Thread Nicolin Chen
> > Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen

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

2020-04-12 Thread Nicolin Chen
On Mon, Apr 13, 2020 at 11:16:31AM +0800, Shengjiu Wang wrote: > On Sun, Apr 12, 2020 at 10:08 AM Nicolin Chen wrote: > > > > On Sat, Apr 11, 2020 at 01:49:43PM +0800, Shengjiu Wang wrote: > > > > > > > diff --git a/sound/soc/fsl/fsl_asrc_dma.c >

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

2020-04-11 Thread Nicolin Chen
On Sat, Apr 11, 2020 at 01:49:43PM +0800, Shengjiu Wang wrote: > > > diff --git a/sound/soc/fsl/fsl_asrc_dma.c b/sound/soc/fsl/fsl_asrc_dma.c > > > index b15946e03380..5cf0468ce6e3 100644 > > > --- a/sound/soc/fsl/fsl_asrc_dma.c > > > +++ b/sound/soc/fsl/fsl_asrc_dma.c > > > > > @@ -311,11

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

2020-04-06 Thread Nicolin Chen
audio sample support > - 8kHz to 384kHz sample rate > - 1/16 to 8x sample rate conversion ratio > > Signed-off-by: Shengjiu Wang > Signed-off-by: Cosmin-Gabriel Samoila Overall, looks good to me. Please add: Acked-by: Nicolin Chen > diff --git a/sound/soc/fsl/fsl_e

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

2020-04-06 Thread Nicolin Chen
On Wed, Apr 01, 2020 at 04:45:38PM +0800, Shengjiu Wang wrote: > static int fsl_asrc_probe(struct platform_device *pdev) > { > struct device_node *np = pdev->dev.of_node; > struct fsl_asrc *asrc; > + struct fsl_asrc_priv *asrc_priv; Could we move it before "struct fsl_asrc

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

2020-04-06 Thread Nicolin Chen
Just some small comments. On Wed, Apr 01, 2020 at 04:45:37PM +0800, Shengjiu Wang wrote: > 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

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

2020-04-06 Thread Nicolin Chen
> > Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen > --- > sound/soc/fsl/fsl-asoc-card.c | 21 - > 1 file changed, 12 insertions(+), 9 deletions(-) > > diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c > ind

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

2020-04-06 Thread Nicolin Chen
Once Rob has no objection: Acked-by: Nicolin Chen > --- > Documentation/devicetree/bindings/sound/fsl,asrc.txt | 4 > 1 file changed, 4 insertions(+) > > diff --git a/Documentation/devicetree/bindings/sound/fsl,asrc.txt > b/Documentation/devicetree/bindings/sound/fsl

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

2020-04-01 Thread Nicolin Chen
On Wed, Apr 01, 2020 at 04:45:34PM +0800, Shengjiu Wang wrote: > 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 Acked-by: Nicolin Chen

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

2020-03-31 Thread Nicolin Chen
On Tue, Mar 31, 2020 at 10:28:25AM +0800, Shengjiu Wang wrote: > 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: >

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

2020-03-23 Thread Nicolin Chen
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: > > > In order to support new EASRC and simplify the code structure, > > > We

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

2020-03-09 Thread Nicolin Chen
A few small comments -- trying to improve readability. On Mon, Mar 09, 2020 at 11:58:34AM +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

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

2020-03-09 Thread Nicolin Chen
On Mon, Mar 09, 2020 at 11:58:31AM +0800, Shengjiu Wang wrote: > 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. This actually could be a cleanup patch which comes as the first one in this

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

2020-03-09 Thread Nicolin Chen
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 problem that EASRC accept format directly from devicetree, but > ASRC accept width from devicetree.

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

2020-03-09 Thread Nicolin Chen
On Mon, Mar 09, 2020 at 11:58:29AM +0800, Shengjiu Wang wrote: > 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. > >

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

2020-03-02 Thread Nicolin Chen
On Tue, Mar 03, 2020 at 11:59:30AM +0800, Shengjiu Wang wrote: > 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,

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

2020-02-27 Thread Nicolin Chen
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 wrote: > > > On Thu, Feb 27, 2020 at 11:43 AM Nicolin Chen > > >

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

2020-02-27 Thread Nicolin Chen
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 definition to a separate header file. > > And add fsl_asrc_pair_internal and

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

2020-02-27 Thread Nicolin Chen
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 Wang wrote: > > > asrc_format is more inteligent variable, which is align > &

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

2020-02-26 Thread Nicolin Chen
On Thu, Feb 27, 2020 at 10:41:55AM +0800, Shengjiu Wang wrote: > asrc_format is more inteligent variable, which is align > with the alsa definition snd_pcm_format_t. > > Signed-off-by: Shengjiu Wang > --- > sound/soc/fsl/fsl_asrc.c | 23 +++ > sound/soc/fsl/fsl_asrc.h

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

2020-02-25 Thread Nicolin Chen
On Wed, Feb 26, 2020 at 09:51:39AM +0800, Shengjiu Wang wrote: > > > > > +static const struct regmap_config fsl_easrc_regmap_config = { > > > > > + .readable_reg = fsl_easrc_readable_reg, > > > > > + .volatile_reg = fsl_easrc_volatile_reg, > > > > > + .writeable_reg =

  1   2   3   4   5   6   7   8   >