summaryrefslogtreecommitdiff
path: root/sound/soc/fsl
AgeCommit message (Collapse)Author
2022-05-19Merge remote-tracking branch 'gh-fslc/5.4-2.3.x-imx' into toradex_5.4-2.3.x-imxPhilippe Schenker
2022-05-19Merge tag 'v5.4.193' into update-to-2.3.7__5.4-2.3.x-imxPhilippe Schenker
This is the 5.4.193 stable release Conflicts: arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts drivers/edac/synopsys_edac.c drivers/mmc/host/sdhci-esdhc-imx.c drivers/mmc/host/sdhci.c drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c sound/soc/codecs/msm8916-wcd-analog.c
2022-04-15ASoC: imx-es8328: Fix error return code in imx_es8328_probe()Wang Wensheng
[ Upstream commit 3b891513f95cba3944e72c1139ea706d04f3781b ] Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 7e7292dba215 ("ASoC: fsl: add imx-es8328 machine driver") Signed-off-by: Wang Wensheng <wangwensheng4@huawei.com> Link: https://lore.kernel.org/r/20220310091902.129299-1-wangwensheng4@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-02-08ASoC: fsl: Add missing error handling in pcm030_fabric_probeMiaoqian Lin
commit fb25621da5702c104ce0a48de5b174ced09e5b4e upstream. Add the missing platform_device_put() and platform_device_del() before return from pcm030_fabric_probe in the error handling case. Fixes: c912fa913446 ("ASoC: fsl: register the wm9712-codec") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Link: https://lore.kernel.org/r/20220127131336.30214-1-linmq006@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-05Merge commit '28910e01c43d9735f06fddbeaa42df3e112d1b3e' into ↵Marcel Ziswiler
toradex_5.4-2.3.x-imx This basically contains NXP BSP Patch L5.4.70_2.3.2 plus kernel.org v5.4.115 from https://github.com/Freescale/linux-fslc/tree/5.4-2.3.x-imx. Related-to: ELB-3958 Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2021-04-21Merge tag 'v5.4.114' into 5.4-2.3.x-imxAndrey Zhizhikin
This is the 5.4.114 stable release Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
2021-04-21fsl_sai: work around missing MCLK on i.mx 8m plusMax Krummenacher
Some audio codecs need the MCLK during setup of the codec, however for the i.MX 8M Plus it is gated with the bce bit. So enable the bit already in fsl_sai_hw_params() which is an early state when initalizing sai and codec. Notably the WM8904 codec on the Dahlia carrier board is affected. Fixes a timeout on audio start: root@verdin-imx8mp:~# aplay sound/Gong.wav [ 1356.402716] wm8904 3-001a: DC servo timed out [ 1362.410401] wm8904 3-001a: DC servo timed out Playing WAVE 'sound/Gong.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo Related-to: ELB-3554 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2021-04-21ASoC: fsl_esai: Fix TDM slot setup for I2S modeAlexander Shiyan
[ Upstream commit e7a48c710defa0e0fef54d42b7d9e4ab596e2761 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-06Merge tag 'v5.4.108' into 5.4-2.3.x-imxAndrey Zhizhikin
This is the 5.4.108 stable release Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
2021-03-24ASoC: fsl_ssi: Fix TDM slot setup for I2S modeAlexander Shiyan
commit 87263968516fb9507d6215d53f44052627fae8d8 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-28sound: soc: fsl-spdif: Fix runtime PM imbalance on errorOleksandr Suvorov
In case of any error occurs after enabling the PM runtime framework for the fsl-spdif-dai device, the next probing generates the warning: "fsl-spdif-dai 2004000.spdif: Unbalanced pm_runtime_enable!" Add the error handling path to keep the PM runtime usage counter balanced. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2021-01-27fsl_dsp.c: test for dsp existence before installing driverMax Krummenacher
The DSP is an optional silicon feature of i.MX8, i.MX8X SoCs. This prevents the following message which is often followed by a kernel oops. | Failed power operation on resource 512 sc_err 3, power_on 1 Test the DSP disable fuse in the drivers init call and don't install the driver if the SoC we are running on has no DSP. Fuse code taken from vpu_encoder_b0.c. Related-to: ELB-1380 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 8a963914393d412043712032d0c59b71f6b860b0) squashed (cherry picked from commit 9b909ffdf190d8c82d846bd5641bfd3e5b20a4cf)
2021-01-27mxc_spdif.c: set the validity bit to 'valid'Max Krummenacher
Each spdif sample is qualified by the validity bit. The bit shall be logic '0' if the audio sample is valid. This commit configures the transmitter to always send '0' rather than always send '1'. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit 0bef909d061cd800da3f553d24129fc48bf3af01) (cherry picked from commit 6ff91330b3dee51b14cde4442f78a07e87d21d68) (cherry picked from commit 3295861e36076e7bdd72f5c1a60233ef7ead20e6)
2021-01-11Merge tag 'v5.4.73' into 5.4-2.3.x-imxAndrey Zhizhikin
This is the 5.4.73 stable release Conflicts: - arch/arm/boot/dts/imx6sl.dtsi: Commit [a1767c90194e2] in NXP tree is now covered with commit [5c4c2f437cead] from upstream. - drivers/gpu/drm/mxsfb/mxsfb_drv.c: Resolve merge hunk for patch [ed8b90d303cf0] from upstream - drivers/media/i2c/ov5640.c: Patch [aa4bb8b8838ff] in NXP tree is now covered by patches [79ec0578c7e0a] and [b2f8546056b35] from upstream. Changes from NXP patch [99aa4c8c18984] are covered in upstream version as well. - drivers/net/ethernet/freescale/fec_main.c: Fix merge fuzz for patch [9e70485b40c83] from upstream. - drivers/usb/cdns3/gadget.c: Keep NXP version of the file, upstream version is not compatible. - drivers/usb/dwc3/core.c: - drivers/usb/dwc3/core.h: Fix merge fuzz of patch [08045050c6bd2] together wth NXP patch [b30e41dc1e494] - sound/soc/fsl/fsl_sai.c: - sound/soc/fsl/fsl_sai.h: Commit [2ea70e51eb72a] in NXP tree is now covered with commit [1ad7f52fe6683] from upstream. Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
2020-11-19MLK-24930-1: sound: soc: fsl: imx pcm512x: iqaudio dacAdrian Alonso
ASoC machine sound driver for IQAudio PiDAC plus/pro Rev3 for iMX SoC, high resolution codec supporting upto 384khz sample rate on SAI; Include support for Hifiberry audio hats that uses external oscillators for dac system clock. Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com> (cherry picked from commit b52d3587cba2b3db60cf316430478969918fed7a)
2020-11-16LF-2700: ASoC: fsl: imx-cdnhdmi: Fix error promptShengjiu Wang
Add widget to fix error prompt: imx-cdnhdmi sound-hdmi: ASoC: DAPM unknown pin HDMI Jack Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Peng Zhang <peng.zhang_8@nxp.com>
2020-11-16MLK-25005 ASoC: fsl_dsp: Add state check for DSPZhang Peng
When set_params return error, we should avoid to delete the component in free function again. This may cause kernel crash. Check cstream state to avoid such issue. Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
2020-11-13MLK-25004-1: ASoC: fsl_dsp: remove unused pll clockShengjiu Wang
Remove unused pll8k and pll11k clock. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Peng Zhang <peng.zhang_8@nxp.com>
2020-11-13MLK-24966 ASoC: fsl_dsp: Fix kernel crash when DSP has no responseZhang Peng
When DSP has no response with cplay and try to force exit, kernel met crash. Reason is kernel locks a mutex proxy->lock twice then kernel crash. Use MU_SendMessageTimeout instead MU_SendMessage then kernel can release the mutex. Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
2020-11-11LF-2721: ASoC: imx-cs42888: Get card name from model propertyShengjiu Wang
Get card name from model property, which is to align the name with Linux Fractory. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-11-05MLK-24965: ASoC: fsl_xcvr: bit and timestamp countersViorel Suman
Add support for bit and timestamp counters. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-11-02MLK-24957-1 ASoC: fsl_xcvr: sync with upstream versionViorel Suman
Sync fsl_xcvr driver with the upstream accepted version. Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2020-10-29ASoC: fsl_sai: Instantiate snd_soc_dai_driverShengjiu Wang
[ Upstream commit 22a16145af824f91014d07f8664114859900b9e6 ] Instantiate snd_soc_dai_driver for independent symmetric control. Otherwise the symmetric setting may be overwritten by other instance. Fixes: 08fdf65e37d5 ("ASoC: fsl_sai: Add asynchronous mode support") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1600424760-32071-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-29ASoC: fsl: imx-es8328: add missing put_device() call in imx_es8328_probe()Yu Kuai
[ Upstream commit e525db7e4b44c5b2b5aac0dad24e23cb58c54d22 ] if of_find_device_by_node() succeed, imx_es8328_probe() doesn't have a corresponding put_device(). Thus add a jump target to fix the exception handling for this function implementation. Fixes: 7e7292dba215 ("ASoC: fsl: add imx-es8328 machine driver") Signed-off-by: Yu Kuai <yukuai3@huawei.com> Link: https://lore.kernel.org/r/20200825130224.1488694-1-yukuai3@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-29MLK-24929 ASoC: fsl_dsp: Support aac streams for cplayZhang Peng
Add support aac streams for cplay, set necessary parameters to comp. Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
2020-10-28MLK-24924-2 dsp: 8mp: change ocram layout for lpaBing Song
ATF put into the end of OCRAM on 8mp A1. Change the ocram layout for lpa. Signed-off-by: Bing Song <bing.song@nxp.com>
2020-10-27MA-17897 ASoC: fsl_dsp: Support building as moduleJindong
Make fsl_dsp_cpu as a separate driver, otherwise below build error will occur when set CONFIG_SND_SOC_FSL_DSP=m ld.lld: error: duplicate symbol: init_module >>> defined at fsl_dsp.c >>> sound/soc/fsl/fsl_dsp.o:(init_module) >>> defined at fsl_dsp_cpu.c >>> sound/soc/fsl/fsl_dsp_cpu.o:(.init.text+0x0) Signed-off-by: Jindong <jindong.yue@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-10-27MA-17837 ASoC: fsl: Fixup rpmsg driver dependencyJindong
After enable remote proc drvier, audio rpmsg driver should not depend on HAVE_IMX_RPMSG. Signed-off-by: Jindong <jindong.yue@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-10-27MA-17777 ASoC: imx-pcm-rpmsg: Move i2s rpmsg driver to individual fileJindong
Move i2s rpmsg driver to a new file: imx-i2s-rpmsg.c This new driver should be probed after fsl_rpmsg_i2s, which calls imx_rpmsg_platform_register (in imx-pcm-rpmsg) to fill global variable: i2s_info_g. Signed-off-by: Jindong <jindong.yue@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-10-26MLK-24916-2: ASoC: fsl_aud2htx: Add S32_LE supportShengjiu Wang
Add S32_LE support. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2020-10-20MA-17597-4 ASoC: fsl_dsp_audiomix: add license for module buildJindong
Add license to support module build. Signed-off-by: Jindong <jindong.yue@nxp.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-10-15MLK-24883 ASoC: fsl_dsp: Add sections check for dsp firmwareZhang Peng
Add to check more sections for dsp firmware due to xtensa tools upgrade, dsp firmware binary adds sections. Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
2020-10-09MLK-24875-1: ASoC: imx-wm8960: instantiate snd_soc_dai_linkShengjiu Wang
instantiate snd_soc_dai_link for multi instance on 8dxl evk board. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2020-10-08Merge tag 'v5.4.70' into imx_5.4.yJason Liu
* tag 'v5.4.70': (3051 commits) Linux 5.4.70 netfilter: ctnetlink: add a range check for l3/l4 protonum ep_create_wakeup_source(): dentry name can change under you... ... Conflicts: arch/arm/mach-imx/pm-imx6.c arch/arm64/boot/dts/freescale/imx8mm-evk.dts arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts drivers/crypto/caam/caamalg.c drivers/gpu/drm/imx/dw_hdmi-imx.c drivers/gpu/drm/imx/imx-ldb.c drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c drivers/mmc/host/sdhci-esdhc-imx.c drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c drivers/net/ethernet/freescale/enetc/enetc.c drivers/net/ethernet/freescale/enetc/enetc_pf.c drivers/thermal/imx_thermal.c drivers/usb/cdns3/ep0.c drivers/xen/swiotlb-xen.c sound/soc/fsl/fsl_esai.c sound/soc/fsl/fsl_sai.c Signed-off-by: Jason Liu <jason.hui.liu@nxp.com>
2020-10-07MLK-24615-4: Remove FSL DAI driverDaniel Baluta
As per discussion with upstream this is not the correct way to handle DSP resources. All the resource management was moved to SOF IMX driver so this code is no longer used. Removed it! Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-09-18MLK-24816-2 ASoc: fsl_dsp: Correct set connected component portZhang Peng
When connect two components, should be one component output port links to the other one input port. Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
2020-09-18MLK-24816-1 ASoc: fsl_dsp: Support seek for compress pipelineZhang Peng
For supporting seek for compress pipeline, remove delate comp operation in dsp_platform_compr_trigger_stop. Remove connect comp operation in dsp_platform_compr_trigger_start. Only connect component once. Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
2020-09-10MLK-24753-2: ASoC: fsl_esai_mix: get pointer from dma driver directlyShengjiu Wang
Previously update pointer in mix function according to dma callback, which is not accurate for the callback maybe triggerred very late, that cause the read pointer and write pointer point to same period, then there is noise in output. So get pointer directly from dma driver to avoid such issue. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Peng Zhang <peng.zhang_8@nxp.com>
2020-09-10MLK-24753-1: ASoC: fsl_esai_mix: Using workqueue for mix handlerShengjiu Wang
Previously doing mixing in softirq, the mixing causing too much time ( period size is 512 sample, the time is about 2.5ms), so move the mixing to workqueue to reduce irq loading Use 4 period instead of pingpong buffer for leverage instant loading. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Peng Zhang <peng.zhang_8@nxp.com>
2020-09-09LF-809 ASoc: fsl_dsp: Prevent compress dsp playing secend instanceZhang Peng
Compress dsp now only support one instance in the meantime, prevent to play the secend one. Fix issue The DSP stops to work if try to start the second cplay to DSP. Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
2020-09-01MLK-24612-5: ASoC: imx-cs42888: Add missed codec nodeShengjiu Wang
When there is no asrc node, there will be below error: imx-cs42888 sound-cs42888: ASoC: Neither/both codec name/of_node are set for HiFi-ASRC-BE Add codec node to fix this issue Fixes: 44dec4241b61 ("MLK-24612-3: ASoC: imx-cs42888: Support two client device") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Peng Zhang <peng.zhang_8@nxp.com>
2020-08-31MLK-24612-3: ASoC: imx-cs42888: Support two client deviceShengjiu Wang
Support two client device, each client is 2 channel 48000Hz, 16bits. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Peng Zhang <peng.zhang_8@nxp.com>
2020-08-31MLK-24612-2: ASoC: fsl_esai: Add esai mix driverShengjiu Wang
ESAI mixer is for mixing the data from clients. There is a ping-pong buffer in the mixer for storing the mixed data. The period size is same as the period size in client (unit is sample number). Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Peng Zhang <peng.zhang_8@nxp.com>
2020-08-31MLK-24612-1: ASoC: fsl_esai: Add esai client driverShengjiu Wang
ESAI client driver is working as cpu dai in front-end. ESAI is an unity, which can't be separated to multiple device in hardware. so we need to separate it in software view. Each client device can accept data from user space indepedently. Then the data of different client is mixed together before sent to ESAI interface. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Peng Zhang <peng.zhang_8@nxp.com>
2020-08-31MLK-24611-3: ASoC: imx-cdnhdmi: Add hdmi jackShengjiu Wang
Add hdmi jack, which report the plug/unplug status. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
2020-08-19ASoC: fsl_sai: Fix value of FSL_SAI_CR1_RFW_MASKShengjiu Wang
[ Upstream commit 5aef1ff2397d021f93d874b57dff032fdfac73de ] The fifo_depth is 64 on i.MX8QM/i.MX8QXP, 128 on i.MX8MQ, 16 on i.MX7ULP. Original FSL_SAI_CR1_RFW_MASK value 0x1F is not suitable for these platform, the FIFO watermark mask should be updated according to the fifo_depth. Fixes: a860fac42097 ("ASoC: fsl_sai: Add support for imx7ulp/imx8mq") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Fabio Estevam <festevam@gmail.com> Link: https://lore.kernel.org/r/1596176895-28724-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-08-14MLK-24501-5 dsp: add lpa pcm support.Bing Song
Use reserved memory as PCM mode need more memory. Use ping-pong buffer for PCM LPA playback to avoid underrun. Signed-off-by: Bing Song <bing.song@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-08-14MLK-24501-4 dsp: disable mxc_hifi4 when LPA.Bing Song
FW is locate on OCRAM_A when lpa. core decoder can't put in reserved memory as HIFI4 has 1G memory limitation. Disable DSP wrapper decoder when lpa. lpa PCM mode will use SW decoder. Signed-off-by: Bing Song <bing.song@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-08-14MLK-24501-3 dsp: interrupt suspend when lpa.Bing Song
Input buffer maybe return when suspending. Interrupt suspend if MU from DSP to ARM core. Signed-off-by: Bing Song <bing.song@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-08-14MLK-24501-1 dsp: change input buffer size for lpa.Bing Song
Enlarge the buffer size to 128K. So ARM can sleep longer time for MP3 LPA playback. Signed-off-by: Bing Song <bing.song@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>