summaryrefslogtreecommitdiff
path: root/sound/soc/fsl
AgeCommit message (Collapse)Author
2021-06-08Merge tag 'asoc-fix-v5.13-rc4' of ↵Takashi Iwai
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.13 A collection of fixes and device ID updates that have come up in the past few -rcs, none of which stand out particularly.
2021-06-01ASoC: fsl-asoc-card: Set .owner attribute when registering card.Nicolas Cavallari
Otherwise, when compiled as module, a WARN_ON is triggered: WARNING: CPU: 0 PID: 5 at sound/core/init.c:208 snd_card_new+0x310/0x39c [snd] [...] CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 5.10.39 #1 Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) Workqueue: events deferred_probe_work_func [<c0111988>] (unwind_backtrace) from [<c010c8ac>] (show_stack+0x10/0x14) [<c010c8ac>] (show_stack) from [<c092784c>] (dump_stack+0xdc/0x104) [<c092784c>] (dump_stack) from [<c0129710>] (__warn+0xd8/0x114) [<c0129710>] (__warn) from [<c0922a48>] (warn_slowpath_fmt+0x5c/0xc4) [<c0922a48>] (warn_slowpath_fmt) from [<bf0496f8>] (snd_card_new+0x310/0x39c [snd]) [<bf0496f8>] (snd_card_new [snd]) from [<bf1d7df8>] (snd_soc_bind_card+0x334/0x9c4 [snd_soc_core]) [<bf1d7df8>] (snd_soc_bind_card [snd_soc_core]) from [<bf1e9cd8>] (devm_snd_soc_register_card+0x30/0x6c [snd_soc_core]) [<bf1e9cd8>] (devm_snd_soc_register_card [snd_soc_core]) from [<bf22d964>] (fsl_asoc_card_probe+0x550/0xcc8 [snd_soc_fsl_asoc_card]) [<bf22d964>] (fsl_asoc_card_probe [snd_soc_fsl_asoc_card]) from [<c060c930>] (platform_drv_probe+0x48/0x98) [...] Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20210527163409.22049-1-nicolas.cavallari@green-communications.fr Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-25Merge tag 'asoc-fix-v5.13-rc3' of ↵Takashi Iwai
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.13 A collection of fixes that have come in since the merge window, mainly device specific things. The fixes to the generic cards from Morimoto-san are handling regressions that were introduced in the merge window on at least the Kontron sl28-var3-ads2.
2021-05-18ASoC: fsl: fix SND_SOC_IMX_RPMSG dependencyArnd Bergmann
Kconfig produces a warning with SND_SOC_FSL_RPMSG=y and SND_IMX_SOC=m: WARNING: unmet direct dependencies detected for SND_SOC_IMX_RPMSG Depends on [m]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_IMX_SOC [=m] && RPMSG [=y] Selected by [y]: - SND_SOC_FSL_RPMSG [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && COMMON_CLK [=y] && RPMSG [=y] && SND_IMX_SOC [=m]!=n Add a dependency to prevent this configuration. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20210514213118.630427-1-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-23Merge remote-tracking branch 'asoc/for-5.13' into asoc-nextMark Brown
2021-04-08ASoC: fsl: sunxi: remove redundant dev_err callMuhammad Usama Anjum
devm_ioremap_resource() prints error message in itself. Remove the dev_err call to avoid redundant error message. Signed-off-by: Muhammad Usama Anjum <musamaanjum@gmail.com> Link: https://lore.kernel.org/r/20210407095634.GA1379642@LEGION Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-02ASoC: fsl_esai: Fix TDM slot setup for I2S modeAlexander Shiyan
When using the driver in I2S TDM mode, the fsl_esai_startup() function rewrites the number of slots previously set by the fsl_esai_set_dai_tdm_slot() function to 2. To fix this, let's use the saved slot count value or, if TDM is not used and the number of slots is not set, the driver will use the default value (2), which is set by fsl_esai_probe(). Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Link: https://lore.kernel.org/r/20210402081405.9892-1-shc_work@mail.ru Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-29ASoC: fsl_rpmsg: initialise pointers to NULLShengjiu Wang
This fixes the following sparse warnings: sound/soc/fsl/fsl_rpmsg.c:45:45: sparse: sparse: Using plain integer as NULL pointer sound/soc/fsl/fsl_rpmsg.c:45:56: sparse: sparse: Using plain integer as NULL pointer Fixes: b73d9e6225e8 ("ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/r/1616988868-971-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-25Merge series "Add audio driver base on rpmsg on i.MX platform" from Shengjiu ↵Mark Brown
Wang <shengjiu.wang@nxp.com>: On Asymmetric multiprocessor, there is Cortex-A core and Cortex-M core, Linux is running on A core, RTOS is running on M core. The audio hardware device can be controlled by Cortex-M device, So audio playback/capture can be handled by M core. Rpmsg is the interface for sending and receiving msg to and from M core, that we can create a virtual sound on Cortex-A core side. A core will tell the Cortex-M core sound format/rate/channel, where is the data buffer, what is the period size, when to start, when to stop and when suspend or resume happen, each of this behavior there is defined rpmsg command. Especially we designed the low power audio case, that is to allocate a large buffer and fill the data, then Cortex-A core can go to sleep mode, Cortex-M core continue to play the sound, when the buffer is consumed, Cortex-M core will trigger the Cortex-A core to wakeup to fill data. changes in v5: - remove unneeded property in binding doc and driver - update binding doc according to Rob's comments. - Fix link issue reported by kernel test robot changes in v4: - remove the sound card node, merge the property to cpu dai node according to Rob's comments. - sound card device 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-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 audio device ASoC: imx-audio-rpmsg: Add rpmsg_driver for audio channel ASoC: imx-pcm-rpmsg: Add platform driver for audio base on rpmsg ASoC: imx-rpmsg: Add machine driver for audio base on rpmsg .../devicetree/bindings/sound/fsl,rpmsg.yaml | 108 +++ include/sound/soc-component.h | 3 + sound/soc/fsl/Kconfig | 30 + sound/soc/fsl/Makefile | 6 + sound/soc/fsl/fsl_rpmsg.c | 279 ++++++ sound/soc/fsl/fsl_rpmsg.h | 35 + sound/soc/fsl/imx-audio-rpmsg.c | 140 +++ sound/soc/fsl/imx-pcm-rpmsg.c | 918 ++++++++++++++++++ sound/soc/fsl/imx-pcm-rpmsg.h | 512 ++++++++++ sound/soc/fsl/imx-rpmsg.c | 150 +++ sound/soc/soc-component.c | 14 + sound/soc/soc-pcm.c | 2 + 12 files changed, 2197 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml create mode 100644 sound/soc/fsl/fsl_rpmsg.c create mode 100644 sound/soc/fsl/fsl_rpmsg.h create mode 100644 sound/soc/fsl/imx-audio-rpmsg.c create mode 100644 sound/soc/fsl/imx-pcm-rpmsg.c create mode 100644 sound/soc/fsl/imx-pcm-rpmsg.h create mode 100644 sound/soc/fsl/imx-rpmsg.c -- 2.27.0
2021-03-25ASoC: fsl-asoc-card: Add support for WM8958 codecShengjiu Wang
WM8958 codec is used on some i.MX based platform. So add it support in this generic driver. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1615986303-27959-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-25ASoC: imx-rpmsg: Add machine driver for audio base on rpmsgShengjiu 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 <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1615516725-4975-7-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-25ASoC: imx-pcm-rpmsg: Add platform driver for audio base on rpmsgShengjiu Wang
Platform driver based on rpmsg is the interface for sending and receiving rpmsg to and from M core. It will tell the Cortex-M core sound format/rate/channel, where is the data buffer, where is the period size, when to start, when to stop and when suspend or resume happen, each this behavior there is defined rpmsg command. Especially we designed the low power audio case, that is to allocate a large buffer and fill the data, then Cortex-A core can go to sleep mode, Cortex-M core continue to play the sound, when the buffer is consumed, Cortex-M core will trigger the Cortex-A core to wake up. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1615516725-4975-6-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-25ASoC: imx-audio-rpmsg: Add rpmsg_driver for audio channelShengjiu 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 <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1615516725-4975-5-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-25ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsgShengjiu 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 <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1615516725-4975-3-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-24ASoC: fsl_micfil: Don't use devm_regmap_init_mmio_clkShengjiu Wang
When there is power domain bind with ipg_clk clock, The call flow: devm_regmap_init_mmio_clk - clk_prepare() - clk_pm_runtime_get() cause the power domain of clock always be enabled after regmap_init(). which impact the power consumption. So use devm_regmap_init_mmio instead of devm_regmap_init_mmio_clk,but explicitly enable clock when it is used. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Viorel Suman <viorel.suman@nxp.com> Link: https://lore.kernel.org/r/1616579928-22428-7-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-24ASoC: fsl_audmix: Don't use devm_regmap_init_mmio_clkShengjiu Wang
When there is power domain bind with ipg clock, The call flow: devm_regmap_init_mmio_clk - clk_prepare() - clk_pm_runtime_get() cause the power domain of clock always be enabled after regmap_init(). which impact the power consumption. So use devm_regmap_init_mmio instead of devm_regmap_init_mmio_clk,but explicitly enable clock when it is used. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1616579928-22428-6-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-24ASoC: fsl_easrc: Don't use devm_regmap_init_mmio_clkShengjiu Wang
When there is power domain bind with mem clock, The call flow: devm_regmap_init_mmio_clk - clk_prepare() - clk_pm_runtime_get() cause the power domain of clock always be enabled after regmap_init(). which impact the power consumption. So use devm_regmap_init_mmio instead of devm_regmap_init_mmio_clk,but explicitly enable clock when it is used. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1616579928-22428-5-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-24ASoC: fsl_asrc: Don't use devm_regmap_init_mmio_clkShengjiu Wang
When there is power domain bind with mem clock, The call flow: devm_regmap_init_mmio_clk - clk_prepare() - clk_pm_runtime_get() cause the power domain of clock always be enabled after regmap_init(). which impact the power consumption. So use devm_regmap_init_mmio instead of devm_regmap_init_mmio_clk,but explicitly enable clock when it is used. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1616579928-22428-4-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-24ASoC: fsl_spdif: Don't use devm_regmap_init_mmio_clkShengjiu Wang
When there is power domain bind with core clock, The call flow: devm_regmap_init_mmio_clk - clk_prepare() - clk_pm_runtime_get() cause the power domain of clock always be enabled after regmap_init(). which impact the power consumption. So use devm_regmap_init_mmio instead of devm_regmap_init_mmio_clk,but explicitly enable clock when it is used. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1616579928-22428-3-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-24ASoC: fsl_esai: Don't use devm_regmap_init_mmio_clkShengjiu Wang
When there is power domain bind with bus clock, The call flow: devm_regmap_init_mmio_clk - clk_prepare() - clk_pm_runtime_get() cause the power domain of clock always be enabled after regmap_init(). which impact the power consumption. So use devm_regmap_init_mmio instead of devm_regmap_init_mmio_clk,but explicitly enable clock when it is used. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1616579928-22428-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-22ASoC: fsl_sai: Don't use devm_regmap_init_mmio_clkShengjiu Wang
When there is power domain bind with bus clock, The call flow: devm_regmap_init_mmio_clk - clk_prepare() - clk_pm_runtime_get() cause the power domain of clock always be enabled after regmap_init(). which impact the power consumption. So use devm_regmap_init_mmio instead 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 <shengjiu.wang@nxp.com> Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Link: https://lore.kernel.org/r/1616141203-13344-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-16ASoC: imx-hdmi: fix platform_no_drv_owner.cocci warningsYang Li
./sound/soc/fsl/imx-hdmi.c:226:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Reviewed-by: Fabio Estevam <festevam@gmail.com> Link: https://lore.kernel.org/r/1614848881-29637-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-16ASoC: fsl_spdif: use snd_ctl_boolean_mono_infoViorel Suman
Remove redundant code and use snd_ctl_boolean_mono_info instead. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1615887736-31217-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-12ASoC: fsl_asrc_dma: request dma channel from specific controllerRobin 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 <yibin.gong@nxp.com> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1614935977-21638-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10ASoC: fsl_xcvr: Use devm_platform_ioremap_resource_byname() to simplify codeTang Bin
In this function, devm_platform_ioremap_resource_byname() should be suitable to simplify code. Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20210302125002.23900-1-tangbin@cmss.chinamobile.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10Merge series "ASoC: remove more make W=1 warnings" from Pierre-Louis Bossart ↵Mark Brown
<pierre-louis.bossart@linux.intel.com>: These warnings get in the way of automation/CI, let's remove them. Pierre-Louis Bossart (9): ASoC: cs4270: fix kernel-doc ASoC: jz4760: fix set but not used warning ASoC: rt5631: fix kernel-doc warning ASoC: sigmadsp-regmap: fix kernel-doc warning ASoC: amd: renoir: remove invalid kernel-doc comment ASoC: fsl: fsl_ssi: fix kernel-doc warning ASoC: fsl: fsl_easrc: fix kernel-doc warning ASoC: Intel: bytcr_wm5102: remove unused static variable ASoC: qcom: q6dsp: fix kernel-doc warning sound/soc/amd/renoir/rn-pci-acp3x.c | 2 +- sound/soc/codecs/cs4270.c | 1 + sound/soc/codecs/jz4760.c | 4 ++-- sound/soc/codecs/rt5631.c | 2 +- sound/soc/codecs/sigmadsp-regmap.c | 2 +- sound/soc/fsl/fsl_easrc.c | 2 +- sound/soc/fsl/fsl_ssi.c | 2 +- sound/soc/intel/boards/bytcr_wm5102.c | 8 -------- sound/soc/qcom/qdsp6/q6afe.c | 2 +- 9 files changed, 9 insertions(+), 16 deletions(-) -- 2.25.1
2021-03-10ASoC: fsl: fsl_easrc: Fix uninitialized variable st2_mem_allocColin Ian King
A previous cleanup commit removed the ininitialization of st2_mem_alloc. Fix this by restoring the original behaviour by initializing it to zero. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: e80382fe721f ("ASoC: fsl: fsl_easrc: remove useless assignments") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20210303091835.5024-1-colin.king@canonical.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10ASoC: fsl: fsl_easrc: fix kernel-doc warningPierre-Louis Bossart
make W=1 warning: sound/soc/fsl/fsl_easrc.c:383: warning: wrong kernel-doc identifier on line: * Scale filter coefficients (64 bits float) Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210302205926.49063-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10ASoC: fsl: fsl_ssi: fix kernel-doc warningPierre-Louis Bossart
make W=1 warning: sound/soc/fsl/fsl_ssi.c:371: warning: expecting prototype for fsl_ssi_irq(). Prototype was for fsl_ssi_isr() instead Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210302205926.49063-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10Merge series "drop unneeded snd_soc_dai_set_drvdata" from Julia Lawall ↵Mark Brown
<Julia.Lawall@inria.fr>: snd_soc_dai_set_drvdata is not needed when the set data comes from snd_soc_dai_get_drvdata or dev_get_drvdata. --- sound/soc/fsl/fsl_micfil.c | 2 -- sound/soc/fsl/fsl_sai.c | 2 -- sound/soc/fsl/fsl_xcvr.c | 1 - sound/soc/mxs/mxs-saif.c | 10 ---------- sound/soc/pxa/mmp-sspa.c | 1 - sound/soc/sunxi/sun4i-i2s.c | 2 -- 6 files changed, 18 deletions(-)
2021-03-10Merge series "ASoC: fsl: remove cppcheck warnings" from Pierre-Louis Bossart ↵Mark Brown
<pierre-louis.bossart@linux.intel.com>: Nothing critical and no functional changes. The only change that needs attention if the 'fsl_ssi: remove unnecessary tests' patch, where variables are to zero, then tested to set register fields. Either the tests are indeed redundant or the entire programming sequence is incorrect. Pierre-Louis Bossart (9): ASoC: fsl: fsl_asrc: remove useless assignment ASoC: fsl: fsl_dma: remove unused variable ASoC: fsl: fsl_easrc: remove useless assignments ASoC: fsl: fsl_esai: clarify expression ASoC: fsl: fsl_ssi: remove unnecessary tests ASoC: fsl: imx-hdmi: remove unused structure members ASoC: fsl: mpc5200: signed parameter in snprintf format ASoC: fsl: mpc8610: remove useless assignment ASoC: fsl: p1022_ds: remove useless assignment sound/soc/fsl/fsl_asrc.c | 2 +- sound/soc/fsl/fsl_dma.c | 3 --- sound/soc/fsl/fsl_easrc.c | 6 +++--- sound/soc/fsl/fsl_esai.c | 2 +- sound/soc/fsl/fsl_ssi.c | 5 ++--- sound/soc/fsl/imx-hdmi.c | 4 ---- sound/soc/fsl/mpc5200_dma.c | 2 +- sound/soc/fsl/mpc8610_hpcd.c | 2 +- sound/soc/fsl/p1022_ds.c | 2 +- 9 files changed, 10 insertions(+), 18 deletions(-) -- 2.25.1
2021-03-10ASoC: fsl_xcvr: move reset assert into runtime_resumeViorel 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 <viorel.suman@nxp.com> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1613984990-5534-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10ASoC: fsl_sai: Add pm qos cpu latency supportShengjiu 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 <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1613983220-5373-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10ASoC: fsl: drop unneeded snd_soc_dai_set_drvdataJulia Lawall
snd_soc_dai_set_drvdata is not needed when the set data comes from snd_soc_dai_get_drvdata or dev_get_drvdata. The problem was fixed usingthe following semantic patch: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x,y,e; @@ x = dev_get_drvdata(y->dev) ... when != x = e - snd_soc_dai_set_drvdata(y,x); @@ expression x,y,e; @@ x = snd_soc_dai_get_drvdata(y) ... when != x = e - snd_soc_dai_set_drvdata(y,x); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Link: https://lore.kernel.org/r/20210213101907.1318496-5-Julia.Lawall@inria.fr Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10ASoC: fsl: p1022_ds: remove useless assignmentPierre-Louis Bossart
cppcheck warning: sound/soc/fsl/p1022_ds.c:344:6: style: Redundant initialization for 'ret'. The initialized value is overwritten before it is read. [redundantInitialization] ret = fsl_asoc_get_dma_channel(np, "fsl,playback-dma", &mdata->dai[0], ^ sound/soc/fsl/p1022_ds.c:203:10: note: ret is initialized int ret = -ENODEV; ^ sound/soc/fsl/p1022_ds.c:344:6: note: ret is overwritten ret = fsl_asoc_get_dma_channel(np, "fsl,playback-dma", &mdata->dai[0], ^ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210219232937.6440-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10ASoC: fsl: mpc8610: remove useless assignmentPierre-Louis Bossart
cppcheck warning: sound/soc/fsl/mpc8610_hpcd.c:333:6: style: Redundant initialization for 'ret'. The initialized value is overwritten before it is read. [redundantInitialization] ret = fsl_asoc_get_dma_channel(np, "fsl,playback-dma", ^ sound/soc/fsl/mpc8610_hpcd.c:193:10: note: ret is initialized int ret = -ENODEV; ^ sound/soc/fsl/mpc8610_hpcd.c:333:6: note: ret is overwritten ret = fsl_asoc_get_dma_channel(np, "fsl,playback-dma", ^ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210219232937.6440-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10ASoC: fsl: mpc5200: signed parameter in snprintf formatPierre-Louis Bossart
cppcheck warning: sound/soc/fsl/mpc5200_dma.c:414:2: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] snprintf(psc_dma->name, sizeof psc_dma->name, "PSC%u", psc_dma->id); ^ Also fix sizeof use, missing parentheses reported by checkpatch.pl Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210219232937.6440-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10ASoC: fsl: imx-hdmi: remove unused structure membersPierre-Louis Bossart
cppcheck warning: sound/soc/fsl/imx-hdmi.c:21:16: style: struct member 'cpu_priv::sysclk_freq' is never used. [unusedStructMember] unsigned long sysclk_freq[2]; ^ Additional checks show the sysclk_dir member is also not used. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210219232937.6440-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10ASoC: fsl: fsl_ssi: remove unnecessary testsPierre-Louis Bossart
cppcheck warnings: sound/soc/fsl/fsl_ssi.c:767:34: style: Condition 'div2' is always false [knownConditionTrueFalse] stccr = SSI_SxCCR_PM(pm + 1) | (div2 ? SSI_SxCCR_DIV2 : 0) | ^ sound/soc/fsl/fsl_ssi.c:722:9: note: Assignment 'div2=0', assigned value is 0 div2 = 0; ^ sound/soc/fsl/fsl_ssi.c:767:34: note: Condition 'div2' is always false stccr = SSI_SxCCR_PM(pm + 1) | (div2 ? SSI_SxCCR_DIV2 : 0) | ^ sound/soc/fsl/fsl_ssi.c:768:4: style: Condition 'psr' is always false [knownConditionTrueFalse] (psr ? SSI_SxCCR_PSR : 0); ^ sound/soc/fsl/fsl_ssi.c:721:8: note: Assignment 'psr=0', assigned value is 0 psr = 0; ^ sound/soc/fsl/fsl_ssi.c:768:4: note: Condition 'psr' is always false (psr ? SSI_SxCCR_PSR : 0); ^ Upon further analysis, the variables 'div2' and 'psr' are set to zero and never modified. All the tests can be removed. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210219232937.6440-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10ASoC: fsl: fsl_esai: clarify expressionPierre-Louis Bossart
cppcheck warning: sound/soc/fsl/fsl_esai.c:307:16: style: Clarify calculation precedence for '%' and '?'. [clarifyCalculation] clk_id % 2 ? "extal" : "fsys"); ^ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210219232937.6440-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10ASoC: fsl: fsl_easrc: remove useless assignmentsPierre-Louis Bossart
cppcheck warnings: sound/soc/fsl/fsl_easrc.c:751:53: style: Variable 'st2_mem_alloc' is assigned a value that is never used. [unreadVariable] int st1_chanxexp, st1_mem_alloc = 0, st2_mem_alloc = 0; ^ sound/soc/fsl/fsl_easrc.c:1331:11: style: Variable 'size' is assigned a value that is never used. [unreadVariable] int size = 0; ^ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210219232937.6440-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10ASoC: fsl: fsl_dma: remove unused variablePierre-Louis Bossart
cppcheck warning: sound/soc/fsl/fsl_dma.c:411:10: style: Variable 'channel' is assigned a value that is never used. [unreadVariable] channel = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? 0 : 1; ^ Removing this line shows the variable isn't needed any longer so remove declaration as well. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210219232937.6440-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10ASoC: fsl: fsl_asrc: remove useless assignmentPierre-Louis Bossart
cppcheck warning: sound/soc/fsl/fsl_asrc.c:613:8: style: Variable 'i' is assigned a value that is never used. [unreadVariable] int i = 0, j = 0; ^ The same issue occurs for the 'j' variable. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210219232937.6440-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-10ASoC: fsl_ssi: Fix TDM slot setup for I2S modeAlexander Shiyan
When using the driver in I2S TDM mode, the _fsl_ssi_set_dai_fmt() function rewrites the number of slots previously set by the fsl_ssi_set_dai_tdm_slot() function to 2 by default. To fix this, let's use the saved slot count value or, if TDM is not used and the slot count is not set, proceed as before. Fixes: 4f14f5c11db1 ("ASoC: fsl_ssi: Fix number of words per frame for I2S-slave mode") Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Link: https://lore.kernel.org/r/20210216114221.26635-1-shc_work@mail.ru Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-08ASoC: fsl_esai: Remove unused 'imx' fieldFabio Estevam
The 'imx' field is not used anywhere, so get rid of it. Signed-off-by: Fabio Estevam <festevam@gmail.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20210206142753.536459-1-festevam@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-08ASoC: fsl: constify static snd_soc_dai_ops structsRikard Falkeborn
The only usage of these is to assign their address to the 'ops' field in the snd_soc_dai_driver struct, which is a pointer to const. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20210206225849.51071-1-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-05Merge branch 'asoc-5.11' into asoc-5.12Mark Brown
2021-02-02ASoC: fsl_spdif: Utilize the defined parameter to clear codeTang Bin
Utilize the defined parameter 'dev' to make the code cleaner. Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20210128112714.16324-1-tangbin@cmss.chinamobile.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-21ASoC: fsl: sync parameter naming (rate/sample_bits)Kuninori Morimoto
This patch syncs naming rule. - xxx_rates; + xxx_rate; - xxx_samplebits; + xxx_sample_bits; Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87eeimolh5.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-20ASoC: fsl_spdif: Remove of_device_get_match_data() error checkFabio Estevam
The only way this driver can be probed is via devicetree, which always provides driver data. Remove the unneeded of_device_get_match_data() error check, as it can never fail. Signed-off-by: Fabio Estevam <festevam@gmail.com> Link: https://lore.kernel.org/r/20210118123815.1630882-6-festevam@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>