[PATCH] ASoC: ak4458: enable daisy chain

2021-04-20 Thread Shengjiu Wang
From: Viorel Suman Enable Daisy Chain if in TDM mode and the number of played channels is bigger than the maximum supported number of channels. Signed-off-by: Viorel Suman Signed-off-by: Shengjiu Wang --- sound/soc/codecs/ak4458.c | 47 ++- sound/soc

[PATCH v2] ASoC: ak4458: check reset control status

2021-04-19 Thread Shengjiu Wang
From: Viorel Suman check the return value of ak4458_rstn_control. Signed-off-by: Viorel Suman Signed-off-by: Shengjiu Wang --- changes in v2: - fix "use of undeclared identifier 'ret'" reported by kernel test robot sound/soc/codecs/ak4458.c | 21 - 1 file c

[PATCH] ASoC: ak4458: check reset control status

2021-04-16 Thread Shengjiu Wang
From: Viorel Suman check the return value of ak4458_rstn_control. Signed-off-by: Viorel Suman Signed-off-by: Shengjiu Wang --- sound/soc/codecs/ak4458.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/ak4458.c b/sound/soc/codecs

[PATCH v2 -next 1/2] ASoC: ak5558: correct reset polarity

2021-04-14 Thread Shengjiu Wang
Reset (aka power off) happens when the reset gpio is made active. The reset gpio is GPIO_ACTIVE_LOW Fixes: 920884777480 ("ASoC: ak5558: Add support for AK5558 ADC driver") Signed-off-by: Shengjiu Wang --- changes in v2: - split the patch to two patches. sound/soc/codecs/ak5558.c |

[PATCH v2 -next 2/2] ASoC: ak5558: change function name to ak5558_reset

2021-04-14 Thread Shengjiu Wang
Change function name to ak5558_reset to match devicetree property "reset-gpios". Signed-off-by: Shengjiu Wang --- changes in v2: - split patches to two patches sound/soc/codecs/ak5558.c | 23 +++ 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a

[PATCH] ASoC: ak5558: correct reset polarity

2021-04-13 Thread Shengjiu Wang
Reset (aka power off) happens when the reset gpio is made active. Change function name to ak5558_reset to match devicetree property "reset-gpios". Signed-off-by: Shengjiu Wang --- sound/soc/codecs/ak5558.c | 30 ++ 1 file changed, 10 insertions(+), 20

Re: [PATCH] ASoC: fsl_sai: Don't use devm_regmap_init_mmio_clk

2021-04-12 Thread Shengjiu Wang
On Sun, Apr 11, 2021 at 10:43 PM Guenter Roeck wrote: > > On Fri, Mar 19, 2021 at 04:06:43PM +0800, Shengjiu Wang wrote: > > When there is power domain bind with bus clock, > > > > The call flow: > > devm_regmap_init_mmio_clk > >- clk_prepare() > >

[PATCH] ASoC: ak5558: Fix s/show/slow/ typo

2021-04-03 Thread Shengjiu Wang
s/show/slow/ Fixes: 920884777480 ("ASoC: ak5558: Add support for AK5558 ADC driver") Signed-off-by: Shengjiu Wang --- sound/soc/codecs/ak5558.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/ak5558.c b/sound/soc/codecs/ak5558.c index 3a

[PATCH v2 2/2] ASoC: dt-bindings: ak5558: Add compatible string for ak5552

2021-03-31 Thread Shengjiu Wang
Add compatible string "asahi-kasei,ak5552" for ak5552 Signed-off-by: Shengjiu Wang Acked-by: Rob Herring --- Documentation/devicetree/bindings/sound/ak5558.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/sound/ak5

[PATCH v2 1/2] ASoC: ak5558: Add support for ak5552

2021-03-31 Thread Shengjiu Wang
From: Viorel Suman AK5552 is a 32-bit 2ch ADC and has the same register map as AK5558. Signed-off-by: Viorel Suman Signed-off-by: Shengjiu Wang --- changes in v2 - refine the control name. sound/soc/codecs/ak5558.c | 97 --- 1 file changed, 90 insertions

Re: [PATCH 1/2] ASoC: ak5558: Add support for ak5552

2021-03-30 Thread Shengjiu Wang
On Tue, Mar 30, 2021 at 11:06 PM Mark Brown wrote: > > On Tue, Mar 30, 2021 at 02:32:51PM +0800, Shengjiu Wang wrote: > > > +static const struct snd_kcontrol_new ak5552_snd_controls[] = { > > + SOC_ENUM("AK5552 Monaural Mode", ak5552_mono_enum[0]), > >

[PATCH 2/2] ASoC: dt-bindings: ak5558: Add compatible string for ak5552

2021-03-30 Thread Shengjiu Wang
Add compatible string "asahi-kasei,ak5552" for ak5552 Signed-off-by: Shengjiu Wang --- Documentation/devicetree/bindings/sound/ak5558.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/sound/ak5558.txt b/Documentation/devicetre

[PATCH 1/2] ASoC: ak5558: Add support for ak5552

2021-03-30 Thread Shengjiu Wang
From: Viorel Suman AK5552 is a 32-bit 2ch ADC and has the same register map as AK5558. Signed-off-by: Viorel Suman Signed-off-by: Shengjiu Wang --- sound/soc/codecs/ak5558.c | 93 --- 1 file changed, 88 insertions(+), 5 deletions(-) diff --git a/sound/soc

[PATCH] ASoC: fsl_rpmsg: initialise pointers to NULL

2021-03-28 Thread Shengjiu Wang
rpmsg") Signed-off-by: Shengjiu Wang Reported-by: kernel test robot --- sound/soc/fsl/fsl_rpmsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/fsl/fsl_rpmsg.c b/sound/soc/fsl/fsl_rpmsg.c index 2d09d8850e2c..ea5c973e2e84 100644 --- a/sound/soc/fsl/fsl_rpm

[PATCH 0/6] ASoC: fsl: Don't use devm_regmap_init_mmio_clk

2021-03-24 Thread Shengjiu Wang
of devm_regmap_init_mmio_clk. Shengjiu Wang (6): ASoC: fsl_esai: Don't use devm_regmap_init_mmio_clk ASoC: fsl_spdif: Don't use devm_regmap_init_mmio_clk ASoC: fsl_asrc: Don't use devm_regmap_init_mmio_clk ASoC: fsl_easrc: Don't use devm_regmap_init_mmio_clk ASoC: fsl_audmix: Don't use

[PATCH 4/6] ASoC: fsl_easrc: Don't use devm_regmap_init_mmio_clk

2021-03-24 Thread Shengjiu Wang
of devm_regmap_init_mmio_clk,but explicitly enable clock when it is used. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_easrc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c index 600e0d670ca6..5e33afe87c4a 100644 --- a/sound/soc

[PATCH 6/6] ASoC: fsl_micfil: Don't use devm_regmap_init_mmio_clk

2021-03-24 Thread Shengjiu Wang
of devm_regmap_init_mmio_clk,but explicitly enable clock when it is used. Signed-off-by: Shengjiu Wang Reviewed-by: Viorel Suman --- sound/soc/fsl/fsl_micfil.c | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl

[PATCH 2/6] ASoC: fsl_spdif: Don't use devm_regmap_init_mmio_clk

2021-03-24 Thread Shengjiu Wang
of devm_regmap_init_mmio_clk,but explicitly enable clock when it is used. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_spdif.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c index 1cd3441d1c03..c631de325a6e 100644 --- a/sound

[PATCH 1/6] ASoC: fsl_esai: Don't use devm_regmap_init_mmio_clk

2021-03-24 Thread Shengjiu Wang
of devm_regmap_init_mmio_clk,but explicitly enable clock when it is used. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_esai.c | 48 ++-- 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c index

[PATCH 5/6] ASoC: fsl_audmix: Don't use devm_regmap_init_mmio_clk

2021-03-24 Thread Shengjiu Wang
of devm_regmap_init_mmio_clk,but explicitly enable clock when it is used. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_audmix.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_audmix.c b/sound/soc/fsl/fsl_audmix.c index 8dc44dec7956..f931288e256c 100644

[PATCH 3/6] ASoC: fsl_asrc: Don't use devm_regmap_init_mmio_clk

2021-03-24 Thread Shengjiu Wang
of devm_regmap_init_mmio_clk,but explicitly enable clock when it is used. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_asrc.c | 57 +++- 1 file changed, 44 insertions(+), 13 deletions(-) diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c index

Re: [RESEND PATCH v2] ASoC: wm8960: Remove bitclk relax condition in wm8960_configure_sysclk

2021-03-23 Thread Shengjiu Wang
Hi Mark On Wed, Mar 10, 2021 at 9:26 PM Mark Brown wrote: > > On Wed, Mar 10, 2021 at 10:00:42AM +0800, Shengjiu Wang wrote: > > > changes in resend v2 > > - Add acked-by Charles > > Please don't resend for acks, it just makes for more noise. ok, but could you plea

[PATCH] ASoC: wm8960: Fix wrong bclk and lrclk with pll enabled for some chips

2021-03-19 Thread Shengjiu Wang
uot;ASoC: codec: wm9860: Refactor PLL out freq search") Signed-off-by: Shengjiu Wang --- sound/soc/codecs/wm8960.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index df351519a3a6..cda9cd935d4f 100644 --- a/sou

[PATCH] ASoC: fsl_sai: Don't use devm_regmap_init_mmio_clk

2021-03-19 Thread Shengjiu Wang
of devm_regmap_init_mmio_clk, then explicitly enable clock when using by pm_runtime_get(), if CONFIG_PM=n, then fsl_sai_runtime_resume will be explicitly called. Signed-off-by: Shengjiu Wang Signed-off-by: Viorel Suman --- sound/soc/fsl/fsl_sai.c | 48 +++-- 1 file changed

Re: [PATCH] ASoC: fsl_sai: remove reset code from dai_probe

2021-03-18 Thread Shengjiu Wang
Hi Mark On Tue, Mar 16, 2021 at 9:51 PM Mark Brown wrote: > > On Tue, Mar 16, 2021 at 01:42:40PM +, Viorel Suman wrote: > > > To me it makes sense to manage the clocks and reset from the same place. > > Currently we have the clocks management moved completely into runtime PM > >

[PATCH 2/2] ASoC: bindings: fsl-asoc-card: add compatible string for WM8958 codec

2021-03-17 Thread Shengjiu Wang
The WM8958 codec is used on i.MX7D val board. Signed-off-by: Shengjiu Wang --- Documentation/devicetree/bindings/sound/fsl-asoc-card.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt b/Documentation/devicetree/bindings/sound/fsl

[PATCH 1/2] ASoC: fsl-asoc-card: Add support for WM8958 codec

2021-03-17 Thread Shengjiu Wang
WM8958 codec is used on some i.MX based platform. So add it support in this generic driver. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/Kconfig | 2 ++ sound/soc/fsl/fsl-asoc-card.c | 17 +++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/sound/soc/fsl

Re: [PATCH] ASoC: fsl_sai: remove reset code from dai_probe

2021-03-16 Thread Shengjiu Wang
On Tue, Mar 16, 2021 at 9:01 PM Mark Brown wrote: > > On Tue, Mar 16, 2021 at 05:27:06PM +0800, Shengjiu Wang wrote: > > From: Viorel Suman > > > > SAI software reset is done in runtime resume, > > there is no need to do it in fsl_sai_dai_probe. >

[PATCH] ASoC: fsl_spdif: use snd_ctl_boolean_mono_info

2021-03-16 Thread Shengjiu Wang
From: Viorel Suman Remove redundant code and use snd_ctl_boolean_mono_info instead. Signed-off-by: Viorel Suman Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_spdif.c | 30 +++--- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/sound/soc/fsl

[PATCH] ASoC: fsl_sai: remove reset code from dai_probe

2021-03-16 Thread Shengjiu Wang
From: Viorel Suman SAI software reset is done in runtime resume, there is no need to do it in fsl_sai_dai_probe. Signed-off-by: Viorel Suman Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_sai.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc

[PATCH] ASoC: dt-bindings: fsl_spdif: Add compatible string for new platforms

2021-03-16 Thread Shengjiu Wang
Add compatible string for new added platforms which support spdif module. They are i.MX8QXP, i.MX8MM, i.MX8MN, i.MX8MQ. Signed-off-by: Shengjiu Wang --- Documentation/devicetree/bindings/sound/fsl,spdif.yaml | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree

[PATCH v5 5/6] ASoC: imx-pcm-rpmsg: Add platform driver for audio base on rpmsg

2021-03-11 Thread Shengjiu Wang
. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/Kconfig | 5 + sound/soc/fsl/Makefile| 1 + sound/soc/fsl/imx-pcm-rpmsg.c | 918 ++ sound/soc/fsl/imx-pcm-rpmsg.h | 512 +++ 4 files changed, 1436 insertions(+) create mode 100644

[PATCH v5 3/6] ASoC: dt-bindings: fsl_rpmsg: Add binding doc for rpmsg audio device

2021-03-11 Thread Shengjiu Wang
fsl_rpmsg is a virtual audio device. Mapping to real hardware devices are SAI, DMA controlled by Cortex M core. What we see from Linux side is a device which provides audio service by rpmsg channel. Signed-off-by: Shengjiu Wang --- .../devicetree/bindings/sound/fsl,rpmsg.yaml | 108

[PATCH v5 6/6] ASoC: imx-rpmsg: Add machine driver for audio base on rpmsg

2021-03-11 Thread Shengjiu Wang
The platform device is not registered by device tree or cpu dai driver, it is registered by the rpmsg channel, So add a dedicated machine driver to handle this case. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/Kconfig | 11 +++ sound/soc/fsl/Makefile| 2 + sound/soc/fsl/imx

[PATCH v5 4/6] ASoC: imx-audio-rpmsg: Add rpmsg_driver for audio channel

2021-03-11 Thread Shengjiu Wang
This driver is used to accept the message from rpmsg audio channel, and if this driver is probed, it will help to register the platform driver, the platform driver will use this audio channel to send and receive messages to and from Cortex-M core. Signed-off-by: Shengjiu Wang --- sound/soc/fsl

[PATCH v5 2/6] ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg

2021-03-11 Thread Shengjiu Wang
This is a cpu dai driver for rpmsg audio use case, which is mainly used for getting the user's configuration from devicetree and configure the clocks which is used by Cortex-M core. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/Kconfig | 10 ++ sound/soc/fsl/Makefile| 2 + sound/soc

[PATCH v5 0/6] Add audio driver base on rpmsg on i.MX platform

2021-03-11 Thread Shengjiu Wang
will be registered by cpu dai driver. - Fix do_div issue reported by kernel test robot changes in v3: - add local refcount for clk enablement in hw_params() - update the document according Rob's comments changes in v2: - update codes and comments according to Mark's comments Shengjiu Wang (6): ASoC: soc

[PATCH v5 1/6] ASoC: soc-component: Add snd_soc_pcm_component_ack

2021-03-11 Thread Shengjiu Wang
Add snd_soc_pcm_component_ack back, which can be used to get an updated buffer pointer in the platform driver. On Asymmetric multiprocessor, this pointer can be sent to Cortex-M core for audio processing. Signed-off-by: Shengjiu Wang --- include/sound/soc-component.h | 3 +++ sound/soc/soc

Re: [PATCH v4 3/6] ASoC: dt-bindings: fsl_rpmsg: Add binding doc for rpmsg cpu dai driver

2021-03-11 Thread Shengjiu Wang
Hi Rob On Thu, Mar 11, 2021 at 5:12 AM Rob Herring wrote: > > On Wed, Mar 10, 2021 at 6:33 AM Shengjiu Wang wrote: > > > > Hi Rob > > > > On Wed, Mar 10, 2021 at 10:49 AM Rob Herring wrote: > > > > > > On Mon, Mar 08, 2021 at 09:22:27PM +0800

Re: [PATCH v4 3/6] ASoC: dt-bindings: fsl_rpmsg: Add binding doc for rpmsg cpu dai driver

2021-03-10 Thread Shengjiu Wang
Hi Rob On Wed, Mar 10, 2021 at 10:49 AM Rob Herring wrote: > > On Mon, Mar 08, 2021 at 09:22:27PM +0800, Shengjiu Wang wrote: > > fsl_rpmsg cpu dai driver is driver for rpmsg audio, which is mainly used > > Bindings describe h/w blocks, not drivers. I will modify the desc

[RESEND PATCH v2] ASoC: wm8960: Remove bitclk relax condition in wm8960_configure_sysclk

2021-03-09 Thread Shengjiu Wang
it clock computation") Signed-off-by: Shengjiu Wang Signed-off-by: Daniel Baluta Acked-by: Charles Keepax --- changes in resend v2 - Add acked-by Charles changes in v2: - Find the real reason for the case, just patially remove bitclk relax sound/soc/codecs/wm8960.c | 12 +--- 1 fi

[PATCH v4 4/6] ASoC: imx-audio-rpmsg: Add rpmsg_driver for audio channel

2021-03-08 Thread Shengjiu Wang
This driver is used to accept the message from rpmsg audio channel, and if this driver is probed, it will help to register the platform driver, the platform driver will use this audio channel to send and receive messages to and from Cortex-M core. Signed-off-by: Shengjiu Wang --- sound/soc/fsl

[PATCH v4 3/6] ASoC: dt-bindings: fsl_rpmsg: Add binding doc for rpmsg cpu dai driver

2021-03-08 Thread Shengjiu Wang
fsl_rpmsg cpu dai driver is driver for rpmsg audio, which is mainly used for getting the user's configuration from device tree and configure the clocks which is used by Cortex-M core. So in this document define the needed property. Signed-off-by: Shengjiu Wang --- .../devicetree/bindings/sound

[PATCH v4 5/6] ASoC: imx-pcm-rpmsg: Add platform driver for audio base on rpmsg

2021-03-08 Thread Shengjiu Wang
. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/Kconfig | 5 + sound/soc/fsl/Makefile| 1 + sound/soc/fsl/imx-pcm-rpmsg.c | 919 ++ sound/soc/fsl/imx-pcm-rpmsg.h | 512 +++ 4 files changed, 1437 insertions(+) create mode 100644

[PATCH v4 2/6] ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg

2021-03-08 Thread Shengjiu Wang
This is a cpu dai driver for rpmsg audio use case, which is mainly used for getting the user's configuration from devicetree and configure the clocks which is used by Cortex-M core. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/Kconfig | 7 + sound/soc/fsl/Makefile| 2 + sound/soc

[PATCH v4 6/6] ASoC: imx-rpmsg: Add machine driver for audio base on rpmsg

2021-03-08 Thread Shengjiu Wang
The platform device is not registered by device tree or cpu dai driver, it is registered by the rpmsg channel, So add a dedicated machine driver to handle this case. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/Kconfig | 12 sound/soc/fsl/Makefile| 2 + sound/soc/fsl/imx

[PATCH v4 0/6] Add audio driver base on rpmsg on i.MX platform

2021-03-08 Thread Shengjiu Wang
the document according Rob's comments changes in v2: - update codes and comments according to Mark's comments Shengjiu Wang (6): ASoC: soc-component: Add snd_soc_pcm_component_ack ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg ASoC: dt-bindings: fsl_rpmsg: Add binding doc for rpmsg cpu

[PATCH v4 1/6] ASoC: soc-component: Add snd_soc_pcm_component_ack

2021-03-08 Thread Shengjiu Wang
Add snd_soc_pcm_component_ack back, which can be used to get an updated buffer pointer in the platform driver. On Asymmetric multiprocessor, this pointer can be sent to Cortex-M core for audio processing. Signed-off-by: Shengjiu Wang --- include/sound/soc-component.h | 3 +++ sound/soc/soc

Re: [PATCH v3 7/7] ASoC: dt-bindings: imx-rpmsg: Add binding doc for rpmsg machine driver

2021-03-08 Thread Shengjiu Wang
On Sun, Mar 7, 2021 at 4:37 AM Rob Herring wrote: > > On Thu, Feb 25, 2021 at 10:52:43AM +0800, Shengjiu Wang wrote: > > Imx-rpmsg is a new added machine driver for supporting audio on Cortex-M > > core. The Cortex-M core will control the audio interface, DMA and audi

[PATCH v2] ASoC: wm8962: Relax bit clock divider searching

2021-03-07 Thread Shengjiu Wang
, so that when no exact value can be derived from sysclk pick the closest value greater than expected bitclk. Signed-off-by: Shengjiu Wang Reviewed-by: Daniel Baluta --- changes in v2: - Add debug message according to Charles's comments sound/soc/codecs/wm8962.c | 23 +-- 1

[PATCH] ASoC: fsl_asrc_dma: request dma channel from specific controller

2021-03-05 Thread Shengjiu Wang
From: Robin Gong Request dma channel from specific dma controller instead of generic dma controller list, otherwise, may get the wrong dma controller if there are multi dma controllers such as i.MX8MP. Signed-off-by: Robin Gong Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_asrc_dma.c

Re: [PATCH v2 7/7] ASoC: dt-bindings: imx-rpmsg: Add binding doc for rpmsg machine driver

2021-03-04 Thread Shengjiu Wang
Hi On Fri, Mar 5, 2021 at 4:05 AM Rob Herring wrote: > > On Thu, Feb 18, 2021 at 1:23 AM Shengjiu Wang wrote: > > > > On Thu, Feb 11, 2021 at 6:18 AM Rob Herring wrote: > > > > > > On Sun, Feb 07, 2021 at 06:23:55PM +0800, Shengjiu Wang wrote: > > &

[PATCH] ASoC: wm8962: Relax bit clock divider searching

2021-03-03 Thread Shengjiu Wang
, so that when no exact value can be derived from sysclk pick the closest value greater than expected bitclk. Signed-off-by: Shengjiu Wang --- sound/soc/codecs/wm8962.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/sound/soc/codecs/wm8962.c b/sound

[PATCH v2] ASoC: wm8960: Remove bitclk relax condition in wm8960_configure_sysclk

2021-03-03 Thread Shengjiu Wang
it clock computation") Signed-off-by: Shengjiu Wang Signed-off-by: Daniel Baluta --- changes in v2: - Find the real reason for the case, just patially remove bitclk relax sound/soc/codecs/wm8960.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/sound/soc/code

[PATCH] ASoC: wm8960: Remove bitclk relax condition

2021-03-02 Thread Shengjiu Wang
ff-by: Daniel Baluta Signed-off-by: Shengjiu Wang --- sound/soc/codecs/wm8960.c | 29 +++-- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index df351519a3a6..368bec1dfbdb 100644 --- a/sound/soc/codecs/wm89

Re: [PATCH] ASoC: simple-card: Add dummy dai support simple sound card

2021-02-25 Thread Shengjiu Wang
On Thu, Feb 25, 2021 at 9:17 PM Mark Brown wrote: > > On Thu, Feb 25, 2021 at 08:08:32PM +0800, Shengjiu Wang wrote: > > > If sound card doesn't need specific codec device, just > > dummy codec is enough, then we can link the dummy component > > directly. > &

[PATCH] ASoC: simple-card: Add dummy dai support simple sound card

2021-02-25 Thread Shengjiu Wang
dummy component is specified. simple-audio-card,codec { sound-dai = <0>; }; Signed-off-by: Shengjiu Wang --- sound/soc/generic/simple-card.c | 9 + 1 file changed, 9 insertions(+) diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/

[PATCH v3 5/7] ASoC: imx-pcm-rpmsg: Add platform driver for audio base on rpmsg

2021-02-24 Thread Shengjiu Wang
. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/Kconfig | 5 + sound/soc/fsl/Makefile| 1 + sound/soc/fsl/imx-pcm-rpmsg.c | 919 ++ sound/soc/fsl/imx-pcm-rpmsg.h | 512 +++ 4 files changed, 1437 insertions(+) create mode 100644

[PATCH v3 6/7] ASoC: imx-rpmsg: Add machine driver for audio base on rpmsg

2021-02-24 Thread Shengjiu Wang
The platform device is not registered by device tree or cpu dai driver, it is registered by the rpmsg channel, So add a dedicated machine driver to handle this case. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/Kconfig | 12 sound/soc/fsl/Makefile| 2 + sound/soc/fsl/imx

[PATCH v3 7/7] ASoC: dt-bindings: imx-rpmsg: Add binding doc for rpmsg machine driver

2021-02-24 Thread Shengjiu Wang
the hardware. Signed-off-by: Shengjiu Wang --- .../bindings/sound/imx-audio-rpmsg.yaml | 55 +++ 1 file changed, 55 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/imx-audio-rpmsg.yaml diff --git a/Documentation/devicetree/bindings/sound/imx-audio

[PATCH v3 4/7] ASoC: imx-audio-rpmsg: Add rpmsg_driver for audio channel

2021-02-24 Thread Shengjiu Wang
This driver is used to accept the message from rpmsg audio channel, and if this driver is probed, it will help to register the platform driver, the platform driver will use this audio channel to send and receive message to and from Cortex-M core. Signed-off-by: Shengjiu Wang --- sound/soc/fsl

[PATCH v3 3/7] ASoC: dt-bindings: fsl_rpmsg: Add binding doc for rpmsg cpu dai driver

2021-02-24 Thread Shengjiu Wang
fsl_rpmsg cpu dai driver is driver for rpmsg audio, which is mainly used for getting the user's configuration from device tree and configure the clocks which is used by Cortex-M core. So in this document define the needed property. Signed-off-by: Shengjiu Wang --- .../devicetree/bindings/sound

[PATCH v3 0/7] Add audio driver base on rpmsg on i.MX platform

2021-02-24 Thread Shengjiu Wang
. changes in v3: - add local refcount for clk enablement in hw_params() - update the document according Rob's comments changes in v2: - update codes and comments according to Mark's comments Shengjiu Wang (7): ASoC: soc-component: Add snd_soc_pcm_component_ack ASoC: fsl_rpmsg: Add CPU DAI driver

[PATCH v3 1/7] ASoC: soc-component: Add snd_soc_pcm_component_ack

2021-02-24 Thread Shengjiu Wang
Add snd_soc_pcm_component_ack back, which can be used to get updated buffer pointer in platform driver. On Asymmetric multiprocessor, this pointer can be sent to Cortex-M core for audio processing. Signed-off-by: Shengjiu Wang --- include/sound/soc-component.h | 3 +++ sound/soc/soc

[PATCH v3 2/7] ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg

2021-02-24 Thread Shengjiu Wang
This is a cpu dai driver for rpmsg audio use case, which is mainly used for getting the user's configuration from devicetree and configure the clocks which is used by Cortex-M core. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/Kconfig | 7 + sound/soc/fsl/Makefile| 2 + sound/soc

[PATCH 2/2] ASoC: ak5558: Add MODULE_DEVICE_TABLE

2021-02-23 Thread Shengjiu Wang
Add missed MODULE_DEVICE_TABLE for the driver can be loaded automatically at boot. Fixes: 920884777480 ("ASoC: ak5558: Add support for AK5558 ADC driver") Cc: Signed-off-by: Shengjiu Wang --- sound/soc/codecs/ak5558.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/cod

[PATCH 1/2] ASoC: ak4458: Add MODULE_DEVICE_TABLE

2021-02-23 Thread Shengjiu Wang
Add missed MODULE_DEVICE_TABLE for the driver can be loaded automatically at boot. Fixes: 08660086eff9 ("ASoC: ak4458: Add support for AK4458 DAC driver") Cc: Signed-off-by: Shengjiu Wang --- sound/soc/codecs/ak4458.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/cod

[PATCH] ASoC: fsl_xcvr: move reset assert into runtime_resume

2021-02-22 Thread Shengjiu Wang
From: Viorel Suman Move reset assert into runtime_resume since we cannot rely on reset assert state when the device is put out from suspend. Signed-off-by: Viorel Suman Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_xcvr.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions

[PATCH] ASoC: fsl_sai: Add pm qos cpu latency support

2021-02-22 Thread Shengjiu Wang
On SoCs such as i.MX7ULP, cpuidle has some levels which may disable system/bus clocks, so need to add pm_qos to prevent cpuidle from entering low level idles and make sure system/bus clocks are enabled when sai is active. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_sai.c | 12

Re: [PATCH v2 2/7] ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg

2021-02-18 Thread Shengjiu Wang
On Wed, Feb 10, 2021 at 11:39 PM Mark Brown wrote: > > On Wed, Feb 10, 2021 at 02:35:29PM +0800, Shengjiu Wang wrote: > > On Wed, Feb 10, 2021 at 6:30 AM Mark Brown wrote: > > > > Like I say I'd actually recommend moving this control to DAPM. > > > I may understa

Re: [PATCH v2 7/7] ASoC: dt-bindings: imx-rpmsg: Add binding doc for rpmsg machine driver

2021-02-18 Thread Shengjiu Wang
On Thu, Feb 11, 2021 at 6:18 AM Rob Herring wrote: > > On Sun, Feb 07, 2021 at 06:23:55PM +0800, Shengjiu Wang wrote: > > Imx-rpmsg is a new added machine driver for supporting audio on Cortex-M > > core. The Cortex-M core will control the audio interface, DMA and audi

Re: [PATCH v2 3/7] ASoC: dt-bindings: fsl_rpmsg: Add binding doc for rpmsg cpu dai driver

2021-02-18 Thread Shengjiu Wang
On Thu, Feb 11, 2021 at 6:13 AM Rob Herring wrote: > > On Sun, Feb 07, 2021 at 06:23:51PM +0800, Shengjiu Wang wrote: > > fsl_rpmsg cpu dai driver is driver for rpmsg audio, which is mainly used > > for getting the user's configuration from device tree and configure the > &

Re: [PATCH v2 2/7] ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg

2021-02-09 Thread Shengjiu Wang
On Wed, Feb 10, 2021 at 6:30 AM Mark Brown wrote: > > On Tue, Feb 09, 2021 at 05:16:16PM +0800, Shengjiu Wang wrote: > > On Mon, Feb 8, 2021 at 7:53 PM Mark Brown wrote: > > > > hw_params() can be called multiple times and there's no need for it to > > > be

Re: [PATCH v2 2/7] ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg

2021-02-09 Thread Shengjiu Wang
On Mon, Feb 8, 2021 at 7:53 PM Mark Brown wrote: > > On Sun, Feb 07, 2021 at 06:23:50PM +0800, Shengjiu Wang wrote: > > > +static int fsl_rpmsg_hw_params(struct snd_pcm_substream *substream, > > +struct snd_pcm_hw_params *params, > > +

Re: [PATCH] ASoC: soc-pcm: change error message to debug message

2021-02-08 Thread Shengjiu Wang
On Tue, Feb 9, 2021 at 12:39 AM Pierre-Louis Bossart wrote: > > > > On 2/8/21 2:12 AM, Shengjiu Wang wrote: > > This log message should be a debug message, because it > > doesn't return directly but continue next loop. > > > > Signed-off-by: Shengjiu Wang &

[PATCH] ASoC: soc-pcm: change error message to debug message

2021-02-08 Thread Shengjiu Wang
This log message should be a debug message, because it doesn't return directly but continue next loop. Signed-off-by: Shengjiu Wang --- sound/soc/soc-pcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 605acec48971

[PATCH v2 5/7] ASoC: imx-pcm-rpmsg: Add platform driver for audio base on rpmsg

2021-02-07 Thread Shengjiu Wang
. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/Kconfig | 5 + sound/soc/fsl/Makefile| 1 + sound/soc/fsl/imx-pcm-rpmsg.c | 919 ++ sound/soc/fsl/imx-pcm-rpmsg.h | 512 +++ 4 files changed, 1437 insertions(+) create mode 100644

Re: [PATCH] ASoC: fsl: constify static snd_soc_dai_ops structs

2021-02-07 Thread Shengjiu Wang
ned-off-by: Rikard Falkeborn Acked-by: Shengjiu Wang

[PATCH v2 7/7] ASoC: dt-bindings: imx-rpmsg: Add binding doc for rpmsg machine driver

2021-02-07 Thread Shengjiu Wang
the hardware. Signed-off-by: Shengjiu Wang --- .../bindings/sound/imx-audio-rpmsg.yaml | 48 +++ 1 file changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/imx-audio-rpmsg.yaml diff --git a/Documentation/devicetree/bindings/sound/imx-audio

[PATCH v2 4/7] ASoC: imx-audio-rpmsg: Add rpmsg_driver for audio channel

2021-02-07 Thread Shengjiu Wang
This driver is used to accept the message from rpmsg audio channel, and if this driver is probed, it will help to register the platform driver, the platform driver will use this audio channel to send and receive message to and from Cortex-M core. Signed-off-by: Shengjiu Wang --- sound/soc/fsl

[PATCH v2 6/7] ASoC: imx-rpmsg: Add machine driver for audio base on rpmsg

2021-02-07 Thread Shengjiu Wang
The platform device is not registered by device tree or cpu dai driver, it is registered by the rpmsg channel, So add a dedicated machine driver to handle this case. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/Kconfig | 12 sound/soc/fsl/Makefile| 2 + sound/soc/fsl/imx

[PATCH v2 1/7] ASoC: soc-component: Add snd_soc_pcm_component_ack

2021-02-07 Thread Shengjiu Wang
Add snd_soc_pcm_component_ack back, which can be used to get updated buffer pointer in platform driver. On Asymmetric multiprocessor, this pointer can be sent to Cortex-M core for audio processing. Signed-off-by: Shengjiu Wang --- include/sound/soc-component.h | 3 +++ sound/soc/soc

[PATCH v2 3/7] ASoC: dt-bindings: fsl_rpmsg: Add binding doc for rpmsg cpu dai driver

2021-02-07 Thread Shengjiu Wang
fsl_rpmsg cpu dai driver is driver for rpmsg audio, which is mainly used for getting the user's configuration from device tree and configure the clocks which is used by Cortex-M core. So in this document define the needed property. Signed-off-by: Shengjiu Wang --- .../devicetree/bindings/sound

[PATCH v2 2/7] ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg

2021-02-07 Thread Shengjiu Wang
This is a cpu dai driver for rpmsg audio use case, which is mainly used for getting the user's configuration from devicetree and configure the clocks which is used by Cortex-M core. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/Kconfig | 7 ++ sound/soc/fsl/Makefile| 2 + sound/soc

[PATCH v2 0/7] Add audio driver base on rpmsg on i.MX platform

2021-02-07 Thread Shengjiu Wang
. changes in v2: - update codes and comments according to Mark's comments Shengjiu Wang (7): ASoC: soc-component: Add snd_soc_pcm_component_ack ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg ASoC: dt-bindings: fsl_rpmsg: Add binding doc for rpmsg cpu dai driver ASoC: imx-audio-rpmsg

Re: [PATCH 5/7] ASoC: imx-pcm-rpmsg: Add platform driver for audio base on rpmsg

2021-02-07 Thread Shengjiu Wang
On Fri, Feb 5, 2021 at 11:00 PM Mark Brown wrote: > > On Fri, Feb 05, 2021 at 02:57:28PM +0800, Shengjiu Wang wrote: > > > + if (params_format(params) == SNDRV_PCM_FORMAT_S16_LE) > > + msg->s_msg.param.format = RPMSG_S16_LE; > > +

Re: [PATCH 4/7] ASoC: imx-audio-rpmsg: Add rpmsg_driver for audio channel

2021-02-07 Thread Shengjiu Wang
On Fri, Feb 5, 2021 at 10:27 PM Mark Brown wrote: > > On Fri, Feb 05, 2021 at 02:57:27PM +0800, Shengjiu Wang wrote: > > > + /* TYPE C is notification from M core */ > > + if (r_msg->header.type == MSG_TYPE_C) { > > + if (r_msg

Re: [PATCH 2/7] ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg

2021-02-07 Thread Shengjiu Wang
On Fri, Feb 5, 2021 at 10:04 PM Mark Brown wrote: > > On Fri, Feb 05, 2021 at 02:57:25PM +0800, Shengjiu Wang wrote: > > This is a dummy cpu dai driver for rpmsg audio use case, > > which is mainly used for getting the user's configuration > > This is actually doing stuff,

[RESEND PATH] ASoC: dmaengine_pcm: add peripheral configuration

2021-02-04 Thread Shengjiu Wang
o also add this configuration for snd_dmaengine_dai_dma_data. Signed-off-by: Shengjiu Wang --- include/sound/dmaengine_pcm.h | 5 + sound/core/pcm_dmaengine.c| 2 ++ 2 files changed, 7 insertions(+) diff --git a/include/sound/dmaengine_pcm.h b/include/sound/dmaengine_pcm.h index 8c5e38180fb0..96

[PATCH 2/7] ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg

2021-02-04 Thread Shengjiu Wang
This is a dummy cpu dai driver for rpmsg audio use case, which is mainly used for getting the user's configuration from devicetree and configure the clocks which is used by Cortex-M core. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/Kconfig | 7 ++ sound/soc/fsl/Makefile| 2

[PATCH 4/7] ASoC: imx-audio-rpmsg: Add rpmsg_driver for audio channel

2021-02-04 Thread Shengjiu Wang
This driver is used to accept the message from rpmsg audio channel, and if this driver is probed, it will help to register the platform driver, the platform driver will use this audio channel to send and receive message to and from Cortex-M core. Signed-off-by: Shengjiu Wang --- sound/soc/fsl

[PATCH 5/7] ASoC: imx-pcm-rpmsg: Add platform driver for audio base on rpmsg

2021-02-04 Thread Shengjiu Wang
. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/Kconfig | 5 + sound/soc/fsl/Makefile| 1 + sound/soc/fsl/imx-pcm-rpmsg.c | 898 ++ sound/soc/fsl/imx-pcm-rpmsg.h | 512 +++ 4 files changed, 1416 insertions(+) create mode 100644

[PATCH 7/7] ASoC: dt-bindings: imx-rpmsg: Add binding doc for rpmsg machine driver

2021-02-04 Thread Shengjiu Wang
the hardware. Signed-off-by: Shengjiu Wang --- .../bindings/sound/imx-audio-rpmsg.yaml | 48 +++ 1 file changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/imx-audio-rpmsg.yaml diff --git a/Documentation/devicetree/bindings/sound/imx-audio

[PATCH 3/7] ASoC: dt-bindings: fsl_rpmsg: Add binding doc for rpmsg cpu dai driver

2021-02-04 Thread Shengjiu Wang
fsl_rpmsg cpu dai driver is dummy driver, which is mainly used for getting the user's configuration from device tree and configure the clocks which is used by Cortex-M core. So in this document define the needed property. Signed-off-by: Shengjiu Wang --- .../devicetree/bindings/sound/fsl

[PATCH 6/7] ASoC: imx-rpmsg: Add machine driver for audio base on rpmsg

2021-02-04 Thread Shengjiu Wang
The platform device is not registered by device tree or cpu dai driver, it is registered by the rpmsg channel, So add a dedicated machine driver to handle this case. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/Kconfig | 12 sound/soc/fsl/Makefile| 2 + sound/soc/fsl/imx

[PATCH 0/7] Add audio driver base on rpmsg on i.MX platform

2021-02-04 Thread Shengjiu Wang
. Shengjiu Wang (7): ASoC: soc-component: Add snd_soc_pcm_component_ack ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg ASoC: dt-bindings: fsl_rpmsg: Add binding doc for rpmsg cpu dai driver ASoC: imx-audio-rpmsg: Add rpmsg_driver for audio channel ASoC: imx-pcm-rpmsg: Add platform

[PATCH 1/7] ASoC: soc-component: Add snd_soc_pcm_component_ack

2021-02-04 Thread Shengjiu Wang
Add snd_soc_pcm_component_ack back, which can be used to get updated buffer pointer in platform driver. On Asymmetric multiprocessor, this pointer can be sent to Cortex-M core for audio processing. Signed-off-by: Shengjiu Wang --- include/sound/soc-component.h | 3 +++ sound/soc/soc

Re: [PATCH] ASoC: fsl_spdif: Utilize the defined parameter to clear code

2021-02-01 Thread Shengjiu Wang
On Thu, Jan 28, 2021 at 7:28 PM Tang Bin wrote: > > Utilize the defined parameter 'dev' to make the code cleaner. > > Signed-off-by: Tang Bin Acked-by: Shengjiu Wang

Re: [PATCH] ASoC: fsl_xcvr: remove unneeded semicolon

2021-02-01 Thread Shengjiu Wang
On Mon, Feb 1, 2021 at 4:08 PM Yang Li wrote: > > Eliminate the following coccicheck warning: > ./sound/soc/fsl/fsl_xcvr.c:739:2-3: Unneeded semicolon > > Reported-by: Abaci Robot > Signed-off-by: Yang Li Acked-by: Shengjiu Wang

[PATCH] ASoC: dmaengine_pcm: add peripheral configuration

2021-01-26 Thread Shengjiu Wang
o also add this configuration for snd_dmaengine_dai_dma_data. Signed-off-by: Shengjiu Wang --- include/sound/dmaengine_pcm.h | 5 + sound/core/pcm_dmaengine.c| 2 ++ 2 files changed, 7 insertions(+) diff --git a/include/sound/dmaengine_pcm.h b/include/sound/dmaengine_pcm.h index 8c5e38180fb0..96

  1   2   3   4   5   6   >