summaryrefslogtreecommitdiff
path: root/sound/soc/fsl
AgeCommit message (Collapse)AuthorFilesLines
2022-12-07ASoC: imx-audmux: use sysfs_emit() to instead of scnprintf()ye xingchen1-2/+1
Follow the advice of the Documentation/filesystems/sysfs.rst and show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Link: https://lore.kernel.org/r/202212051943476482106@zte.com.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29ASoC: Merge up fixesMark Brown4-3/+22
Merge the fixes branch up so we can apply further AMD work.
2022-11-24ASoC: Merge dropped fixes from v5.18Mark Brown1-0/+19
These fixes were queued for v5.18 but due to me changing my scripting they never actually got merged - pulling them up now.
2022-11-01ASoC: fsl_micfil: Add support when using eDMAChancel Liu1-0/+4
On i.MX93 platform MICFIL uses eDMA. The maxburst should be set to the number of channels in eDMA multiple FIFO mode. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20221028082750.991822-4-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-01ASoC: fsl_micfil: Add support for i.MX93 platformChancel Liu1-0/+9
Add compatible string and specific soc data to support MICFIL on i.MX93 platform. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20221028082750.991822-3-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-28ASoC: fsl_asrc fsl_esai fsl_sai: allow CONFIG_PM=NMaarten Zanders3-3/+3
When CONFIG_PM=N, pm_runtime_put_sync() returns -ENOSYS which breaks the probe function of these drivers. Other users of pm_runtime_put_sync() typically don't check the return value. In order to keep the program flow as intended, check for -ENOSYS. This commit is similar to commit 0434d3f (omap-mailbox.c). Fixes: cab04ab5900f ("ASoC: fsl_asrc: Don't use devm_regmap_init_mmio_clk") Fixes: 203773e39347 ("ASoC: fsl_esai: Don't use devm_regmap_init_mmio_clk") Fixes: 2277e7e36b4b ("ASoC: fsl_sai: Don't use devm_regmap_init_mmio_clk") Signed-off-by: Maarten Zanders <maarten.zanders@mind.be> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Link: https://lore.kernel.org/r/20221028141129.100702-1-maarten.zanders@mind.be Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-28Add support for SAI on i.MX93 platformMark Brown2-4/+20
Merge series from Chancel Liu <chancel.liu@nxp.com>: This patchset supports SAI on i.MX93 platform.
2022-10-28ASoC: fsl_xcvr: Add Counter registersShengjiu Wang2-0/+61
These counter registers are part of register list, add them to complete the register map - DMAC counter control registers - Data path Timestamp counter register - Data path bit counter register - Data path bit count timestamp register - Data path bit read timestamp register Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1666940627-7611-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-28ASoC: fsl_sai: Specify the maxburst to 8 on i.MX93 platformChancel Liu2-4/+8
There is a limit to eDMA AXI on i.MX93. Only TCD that has NBYTES in a multiple of 8bytes can enable scatter-gather. NBYTES is calculated by bus width times maxburst. On i.MX93 platform the value of maxburst is specified to 8. It makes sure that NBYTES is a multiple of 8bytes. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Link: https://lore.kernel.org/r/20221027060311.2549711-4-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-28ASoC: fsl_sai: Add support for i.MX93 platformChancel Liu1-0/+12
Add compatible string and specific soc data to support SAI on i.MX93 platform. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Link: https://lore.kernel.org/r/20221027060311.2549711-3-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-18Create a new sound card to access MICFIL based on rpmsg channelMark Brown4-8/+17
Merge series from Chancel Liu <chancel.liu@nxp.com>: At a previous time, we have successfully created a virtual sound card based on rpmsg. The sound card works under this mechanism Cortex-A core tells the Cortex-M core the format, rate, channel, .etc configuration of the PCM parameters and Cortex-M controls real hardware devices such as SAI and DMA. From the view of Linux side, the sound card is bound to a rpmsg channel through which it can access SAI. Here these patches are introduced to create a new virtual sound card to access MICFIL based on a new created rpmsg channel. It's easy to create a new rpmsg channel for MICFIL through rpmsg name service announcment. Also the other ASoC components bound to this rpmsg MICFIL sound card will be registered with these patches. If other sound cards using different hardware devices needs to be created over rpmsg in the future, these patches can be referred.
2022-10-17ASoC: fsl_micfil: Add Hardware Voice Activity Detector supportShengjiu Wang2-1/+439
The Hardware Voice Activity Detector (HWVAD) is a block responsible for detect voice activity in a channel selected by the user. It can be configured in Envelope-based or Energy-based mode. There are additional two interrupts for HWVAD, one is event interrupt, another is error interrupt. Enable hwvad in parallel with recording. when voice activity detected, HWVAD will be disabled and alsa control notification is triggerred. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1663925494-9941-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-17ASoC: imx-rpmsg: Assign platform driver used by machine driver to link withChancel Liu1-1/+5
Each ASoC platform driver is named by rpmsg channel. ASoC machine driver can parse "fsl,rpmsg-channel-name" property to figure out which ASoC platform driver it should link with. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20220930064441.2548505-8-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-17ASoC: fsl_rpmsg: Multi-channel support in CPU DAI driverChancel Liu1-2/+2
Some sound card based on rpmsg may support multi-channel. This patch expands the maximum channels to 32. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20220930064441.2548505-7-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-17ASoC: fsl_rpmsg: Register different ASoC machine devicesChancel Liu1-1/+1
This driver helps register ASoC machine device thus use of PLATFORM_DEVID_AUTO macro in API can automatically create device for each sound card based on rpmsg. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20220930064441.2548505-6-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-17ASoC: imx-pcm-rpmsg: Multi-channel support for sound card based on rpmsgChancel Liu1-1/+1
Some sound card based on rpmsg may support multi-channel. The number of channels can be sent to Cortex-M in rpmsg for process. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20220930064441.2548505-5-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-17ASoC: imx-pcm-rpmsg: Register different platform driversChancel Liu1-2/+6
This patch can register different ASoC platform drivers if there are several rpmsg channels. Thus sound cards based on different rpmsg channels can link to their respective platform drivers. Besides, the name of driver is equal to the name of rpmsg channel. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20220930064441.2548505-4-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-17ASoC: imx-audio-rpmsg: Create rpmsg channel for MICFILChancel Liu1-1/+2
Rpmsg channel for MICFIL can also be created through rpmsg name service announcement. If this driver is probed, Cortex-A can access MICFIL which is actually controlled by Cortex-M through rpmsg channel for MICFIL. This driver also helps register ASoC platform device thus use of PLATFORM_DEVID_AUTO macro in API can automatically create device for each rpmsg channel. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20220930064441.2548505-3-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-03Merge tag 'asoc-v6.1' of ↵Takashi Iwai9-29/+130
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v6.1 This has been a very quiet release for the core but quite a busy one for drivers with a big crop of new drivers and lots of feature additions and fixes to existing ones: - A new string helper parse_int_array_user(). - Improvements to the SOF IPC4 code, especially around trace. - Support for AMD Rembrant DSPs, AMD Pink Sardine ACP 6.2, Apple Silcon systems, Everest ES8326, Intel Sky Lake and Kaby Lake, MediaTek MT8186 support, NXP i.MX8ULP DSPs, Qualcomm SC8280XP, SM8250 and SM8450 and Texas Instruments SRC4392 There is a conflict with the conversion of I2C remove functions to void in the cs42l42 driver which is fairly straightforward to resolve but should be highlighted to Linus.
2022-09-23ASoC: fsl_asrc_dma: fully initialize structsSascha Hauer1-2/+1
The driver uses two statically ininitialized struct dma_slave_config, but only one of them is initialized to zero. Initialize config_be to zero as well to make sure that no fields are filled with random values. Let the compiler do this instead of explicitly calling memset() which makes it easier to read. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1663928147-10106-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: fsl_audmux: Fix amixer write errorsShengjiu Wang1-12/+4
This reverts commit 944c517b8c8388 ("ASoC: fsl_audmix: make clock and output src write only"). There is error after making clock and output src write only $amixer -c imxaudmix cset numid=1 1 amixer: Cannot read the given element from control sysdefault:3 Which is worse than before, so let's revert the change. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1662446961-20799-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: fsl: Remove unused inline function imx_pcm_dma_params_init_data()Gaosheng Cui1-9/+0
The imx_pcm_dma_params_init_data() are no longer used since commit c31da0b196f9 ("ASoC: imx-ssi: Remove unused driver"), and the function is used to initialize some members of "struct imx_dma_data", it's more readable to assign the value directly, imx_pcm_dma_params_init_data is useless, so remove it. Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com> Link: https://lore.kernel.org/r/20220923090355.507648-1-cuigaosheng1@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-19ASoC: fsl_spdif: add ALSA event on dpll lockedRobert Rosengren1-1/+20
Add an ALSA event on the RX Sample Rate controller upon the dpll locked interrupt, making it possible for audio applications to monitor changes in the hardware. Signed-off-by: Robert Rosengren <robert.rosengren@axis.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20220912105407.3157868-1-robert.rosengren@axis.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-15ASoC/qcom/arm64: Qualcomm ADSP DTS and binding fixesMark Brown2-5/+13
Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>: Hi, Dependencies/merging ==================== 1. The DTS patches are independent. 2. The binding patches should come together, because of context changes. Could be one of: Qualcomm SoC, ASoC or DT tree. Changes since v3 ================ 1. Patch 9-10: re-order, so first apr.yaml is corrected and then we convert to DT schema. This makes patchset fully bisectable in expense of changing the same lines twice. 2. Patch 11: New patch. Changes since v2 ================ 1. Patch 9: rename and extend commit msg. 2. Add Rb tags. Changes since v1 ================ 1. Patch 9: New patch. 2. Patch 10: Correct also sound/qcom,q6apm-dai.yaml (Rob). 2. Patch 13: New patch. 3. Add Rb/Tb tags. Best regards, Krzysztof Krzysztof Kozlowski (15): arm64: dts: qcom: sdm630: align APR services node names with dtschema arm64: dts: qcom: sdm845: align APR services node names with dtschema arm64: dts: qcom: sm8250: align APR services node names with dtschema arm64: dts: qcom: msm8996: fix APR services nodes arm64: dts: qcom: sdm845: align dai node names with dtschema arm64: dts: qcom: msm8996: align dai node names with dtschema arm64: dts: qcom: qrb5165-rb5: align dai node names with dtschema arm64: dts: qcom: sm8250: use generic name for LPASS clock controller dt-bindings: soc: qcom: apr: correct service children ASoC: dt-bindings: qcom,q6asm: convert to dtschema ASoC: dt-bindings: qcom,q6adm: convert to dtschema ASoC: dt-bindings: qcom,q6dsp-lpass-ports: cleanup example ASoC: dt-bindings: qcom,q6dsp-lpass-clocks: cleanup example ASoC: dt-bindings: qcom,q6apm-dai: adjust indentation in example dt-bindings: soc: qcom: apr: add missing properties .../bindings/soc/qcom/qcom,apr.yaml | 112 ++++++++++++++++-- .../bindings/sound/qcom,q6adm-routing.yaml | 52 ++++++++ .../devicetree/bindings/sound/qcom,q6adm.txt | 39 ------ .../bindings/sound/qcom,q6apm-dai.yaml | 21 ++-- .../bindings/sound/qcom,q6asm-dais.yaml | 112 ++++++++++++++++++ .../devicetree/bindings/sound/qcom,q6asm.txt | 70 ----------- .../sound/qcom,q6dsp-lpass-clocks.yaml | 36 +++--- .../sound/qcom,q6dsp-lpass-ports.yaml | 64 +++++----- arch/arm64/boot/dts/qcom/msm8996.dtsi | 10 +- arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 4 +- arch/arm64/boot/dts/qcom/sdm630.dtsi | 8 +- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 2 +- .../boot/dts/qcom/sdm845-xiaomi-beryllium.dts | 2 +- .../boot/dts/qcom/sdm845-xiaomi-polaris.dts | 4 +- arch/arm64/boot/dts/qcom/sdm845.dtsi | 8 +- arch/arm64/boot/dts/qcom/sm8250.dtsi | 10 +- 16 files changed, 346 insertions(+), 208 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6adm-routing.yaml delete mode 100644 Documentation/devicetree/bindings/sound/qcom,q6adm.txt create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6asm-dais.yaml delete mode 100644 Documentation/devicetree/bindings/sound/qcom,q6asm.txt -- 2.34.1
2022-09-14ASoC: eureka-tlv320: Hold reference returned from of_find_xxx APILiang He1-3/+5
In eukrea_tlv320_probe(), we need to hold the reference returned from of_find_compatible_node() which has increased the refcount and then call of_node_put() with it when done. Fixes: 66f232908de2 ("ASoC: eukrea-tlv320: Add DT support.") Co-authored-by: Kelin Wang <wangkelin2023@163.com> Signed-off-by: Liang He <windhl@126.com> Link: https://lore.kernel.org/r/20220914134354.3995587-1-windhl@126.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-13ASoC: imx-card: Fix refcount issue with of_node_putShengjiu Wang1-0/+4
imx_card_parse_of will search all the node with loop, if there is defer probe happen in the middle of loop, the previous released codec node will be released twice, then cause refcount issue. Here assign NULL to pointer of released nodes to fix the issue. Fixes: aa736700f42f ("ASoC: imx-card: Add imx-card machine driver") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1663059601-29259-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-10ASoC: fsl_asrc: Add initialization finishing check in runtime resumeShengjiu Wang1-1/+28
If the initialization is not finished, then filling input data to the FIFO may fail. So it is better to add initialization finishing check in the runtime resume for suspend & resume case. And consider the case of three instances working in parallel, increase the retry times to 50 for more initialization time. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Nicolin Chen <nicolinc@gmail.com> Link: https://lore.kernel.org/r/1662695098-24602-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-31ASoC: fsl: fsl-utils: remove useless assignmentPierre-Louis Bossart1-1/+1
cppcheck warning: sound/soc/fsl/fsl_utils.c:127:10: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int ret = 0; ^ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Chao Song <chao.song@intel.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20220822184239.169757-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-25ASoC: fsl_aud2htx: Add error handler for pm_runtime_enableShengjiu Wang1-0/+2
Call pm_runtime_disable() when error happens in probe() Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1661430460-5234-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-25ASoC: fsl_aud2htx: register platform component before registering cpu daiShengjiu Wang1-4/+10
There is no defer probe when adding platform component to snd_soc_pcm_runtime(rtd), the code is in snd_soc_add_pcm_runtime() snd_soc_register_card() -> snd_soc_bind_card() -> snd_soc_add_pcm_runtime() -> adding cpu dai -> adding codec dai -> adding platform component. So if the platform component is not ready at that time, then the sound card still registered successfully, but platform component is empty, the sound card can't be used. As there is defer probe checking for cpu dai component, then register platform component before cpu dai to avoid such issue. And the behavior of imx_pcm_dma_init() is same as common devm_snd_dmaengine_pcm_register(), so use devm_snd_dmaengine_pcm_register() instead Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1661430460-5234-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23ASoC: fsl_sai: Update slots number according to bclk_ratioShengjiu Wang1-3/+5
The bclk_ratio is set by .set_bclk_ratio API. bclk_ratio = slots * slot_width So if slots is not set by .set_tdm_slot, then it can be calculated by bclk_ratio. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1659681926-13493-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23ASoC: fsl_sai: Add support multi fifo sdma scriptShengjiu Wang2-1/+39
With disabling combine mode, the multiple successive FIFO registers or non successive FIFO registers of SAI module can work with the sdma multi fifo script. This patch is to configure the necessary information to the SDMA engine driver for support multi fifo script. 'words_per_fifo' is the channels for each dataline 'n_fifos_src' and 'n_fifos_dst' are the fifo number 'stride_fifos_src' and 'stride_fifos_dst' are the stride between enable FIFOs 'maxburst' is the multiply of datalines Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1661218573-2154-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23ASoC: fsl_mqs: Fix supported clock DAI formatShengjiu Wang1-1/+1
The MQS works as codec DAI, not cpu DAI. It is clock consumer, not clock privider. Fixes: 3b14c15a333b ("ASoC: fsl: Update to use set_fmt_new callback") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1661247308-2650-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-17ASoC: fsl_sai: Remove unnecessary FIFO reset in ISRShengjiu Wang1-8/+2
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. Fixes: e2681a1bf5ae ("ASoC: fsl_sai: Add isr to deal with error flag") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1660713867-26921-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-16ASoC: fsl_sai: fix incorrect mclk number in error messagePieterjan Camerlynck1-1/+1
In commit c3ecef21c3f26 ("ASoC: fsl_sai: add sai master mode support") the loop was changed to start iterating from 1 instead of 0. The error message however was not updated, reporting the wrong clock to the user. Signed-off-by: Pieterjan Camerlynck <pieterjan.camerlynck@gmail.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20220813083353.8959-1-pieterjan.camerlynck@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-16ASoC: fsl_sai: fix incorrect mclk number in error messagePieterjan Camerlynck1-1/+1
In commit c3ecef21c3f26 ("ASoC: fsl_sai: add sai master mode support") the loop was changed to start iterating from 1 instead of 0. The error message however was not updated, reporting the wrong clock to the user. Signed-off-by: Pieterjan Camerlynck <pieterjan.camerlynck@gmail.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20220813083353.8959-1-pieterjan.camerlynck@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-15ASoC: imx-rpmsg: Support configure sysclk for codec daiShengjiu Wang1-0/+29
Some codecs need to configure the sysclk even with slave mode, otherwise it may not work properly with some case. wm8960 is the one that need sysclk be configured, so add late_probe() to call the snd_soc_dai_set_sysclk() of codec Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1659495748-10876-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-21ASoC: imx-card: use snd_pcm_format_t type for asrc_formatShengjiu Wang1-3/+5
Fix sparse warning: sound/soc/fsl/imx-card.c:653:59: sparse: warning: incorrect type in assignment (different base types) sound/soc/fsl/imx-card.c:653:59: sparse: expected unsigned int [usertype] asrc_format sound/soc/fsl/imx-card.c:653:59: sparse: got restricted snd_pcm_format_t [usertype] sound/soc/fsl/imx-card.c:655:59: sparse: warning: incorrect type in assignment (different base types) sound/soc/fsl/imx-card.c:655:59: sparse: expected unsigned int [usertype] asrc_format sound/soc/fsl/imx-card.c:655:59: sparse: got restricted snd_pcm_format_t [usertype] Fixes: aa736700f42f ("ASoC: imx-card: Add imx-card machine driver") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1658399393-28777-6-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-21ASoC: fsl_easrc: use snd_pcm_format_t type for sample_formatShengjiu Wang2-4/+7
Fix sparse warning: sound/soc/fsl/fsl_easrc.c:562:33: sparse: warning: restricted snd_pcm_format_t degrades to integer sound/soc/fsl/fsl_easrc.c:563:34: sparse: warning: restricted snd_pcm_format_t degrades to integer sound/soc/fsl/fsl_easrc.c:565:38: sparse: warning: restricted snd_pcm_format_t degrades to integer sound/soc/fsl/fsl_easrc.c:566:39: sparse: warning: restricted snd_pcm_format_t degrades to integer sound/soc/fsl/fsl_easrc.c:608:33: sparse: warning: restricted snd_pcm_format_t degrades to integer sound/soc/fsl/fsl_easrc.c:609:34: sparse: warning: restricted snd_pcm_format_t degrades to integer sound/soc/fsl/fsl_easrc.c:615:40: sparse: warning: restricted snd_pcm_format_t degrades to integer sound/soc/fsl/fsl_easrc.c:616:41: sparse: warning: restricted snd_pcm_format_t degrades to integer sound/soc/fsl/fsl_easrc.c:1465:51: sparse: warning: incorrect type in assignment (different base types) sound/soc/fsl/fsl_easrc.c:1465:51: sparse: expected unsigned int sample_format sound/soc/fsl/fsl_easrc.c:1465:51: sparse: got restricted snd_pcm_format_t [usertype] format sound/soc/fsl/fsl_easrc.c:1467:52: sparse: warning: incorrect type in assignment (different base types) sound/soc/fsl/fsl_easrc.c:1467:52: sparse: expected unsigned int sample_format sound/soc/fsl/fsl_easrc.c:1467:52: sparse: got restricted snd_pcm_format_t [usertype] asrc_format sound/soc/fsl/fsl_easrc.c:1470:52: sparse: warning: incorrect type in assignment (different base types) sound/soc/fsl/fsl_easrc.c:1470:52: sparse: expected unsigned int sample_format sound/soc/fsl/fsl_easrc.c:1470:52: sparse: got restricted snd_pcm_format_t [usertype] format sound/soc/fsl/fsl_easrc.c:1472:51: sparse: warning: incorrect type in assignment (different base types) sound/soc/fsl/fsl_easrc.c:1472:51: sparse: expected unsigned int sample_format sound/soc/fsl/fsl_easrc.c:1472:51: sparse: got restricted snd_pcm_format_t [usertype] asrc_format sound/soc/fsl/fsl_easrc.c:1484:41: sparse: warning: incorrect type in argument 2 (different base types) sound/soc/fsl/fsl_easrc.c:1484:41: sparse: expected restricted snd_pcm_format_t [usertype] *in_raw_format sound/soc/fsl/fsl_easrc.c:1484:41: sparse: got unsigned int * sound/soc/fsl/fsl_easrc.c:1485:41: sparse: warning: incorrect type in argument 3 (different base types) sound/soc/fsl/fsl_easrc.c:1485:41: sparse: expected restricted snd_pcm_format_t [usertype] *out_raw_format sound/soc/fsl/fsl_easrc.c:1485:41: sparse: got unsigned int * sound/soc/fsl/fsl_easrc.c:1937:60: sparse: warning: incorrect type in argument 3 (different base types) sound/soc/fsl/fsl_easrc.c:1937:60: sparse: expected unsigned int [usertype] *out_value sound/soc/fsl/fsl_easrc.c:1937:60: sparse: got restricted snd_pcm_format_t * sound/soc/fsl/fsl_easrc.c:1943:49: sparse: warning: restricted snd_pcm_format_t degrades to integer Fixes: 955ac624058f ("ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1658399393-28777-5-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-21ASoC: fsl-asoc-card: force cast the asrc_format typeShengjiu Wang1-2/+3
Fix sparse warning: sound/soc/fsl/fsl-asoc-card.c:833:45: sparse: warning: incorrect type in argument 3 (different base types) sound/soc/fsl/fsl-asoc-card.c:833:45: sparse: expected unsigned int [usertype] *out_value sound/soc/fsl/fsl-asoc-card.c:833:45: sparse: got restricted snd_pcm_format_t * Fixes: 859e364302c5 ("ASoC: fsl-asoc-card: Support new property fsl, asrc-format") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1658399393-28777-4-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-21ASoC: fsl_asrc: force cast the asrc_format typeShengjiu Wang1-2/+4
Fix sparse warning: sound/soc/fsl/fsl_asrc.c:1177:60: sparse: warning: incorrect type in argument 3 (different base types) sound/soc/fsl/fsl_asrc.c:1177:60: sparse: expected unsigned int [usertype] *out_value sound/soc/fsl/fsl_asrc.c:1177:60: sparse: got restricted snd_pcm_format_t * sound/soc/fsl/fsl_asrc.c:1200:47: sparse: warning: restricted snd_pcm_format_t degrades to integer Fixes: 4520af41fd21 ("ASoC: fsl_asrc: Support new property fsl,asrc-format") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1658399393-28777-3-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-21ASoC: fsl_sai: Don't use plain integer as NULL pointerShengjiu Wang1-1/+1
Fix sparse warning: sound/soc/fsl/fsl_sai.c:64:39: sparse: warning: Using plain integer as NULL pointer Fixes: b4ee8a913e61 ("ASoc: fsl_sai: Add pinctrl operation for PDM and DSD") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1658399393-28777-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-11ASoC: fsl_utils: Drop usage of __clk_get_name()Shengjiu Wang1-1/+1
Avoid build errors when CONFIG_COMMON_CLK is not set/enabled. ERROR: modpost: "__clk_get_name" [sound/soc/fsl/snd-soc-fsl-utils.ko] undefined! Fixes: 7bad8125549c ("ASoC: fsl_utils: Add function to handle PLL clock source") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1657507190-14546-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-07ASoC: fsl_utils: Don't use plain integer as NULL pointerShengjiu Wang1-1/+1
Fix sparse warning: sound/soc/fsl/fsl_utils.c:125:31: sparse: warning: Using plain integer as NULL pointer sound/soc/fsl/fsl_utils.c:125:42: sparse: warning: Using plain integer as NULL pointer Fixes: 7bad8125549c ("ASoC: fsl_utils: Add function to handle PLL clock source") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1657192806-10569-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-06ASoC: imx-card: Fix DSD/PDM mclk frequencyShengjiu Wang1-3/+11
The DSD/PDM rate not only DSD64/128/256/512, which are the multiple rate of 44.1kHz, but also support the multiple rate of 8kHz, so can't force all mclk frequency to be 22579200Hz, need to assign the frequency according to rate. Fixes: aa736700f42f ("ASoC: imx-card: Add imx-card machine driver") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1657100575-8261-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-05ASoC: fsl_sai: Add support for PLL switch at runtimeShengjiu Wang3-0/+41
i.MX8MQ/MN/MM/MP platforms typically have 2 AUDIO PLLs being configured to handle 8kHz and 11kHz series audio rates. The patch implements the functionality to select at runtime the appropriate AUDIO PLL as function of sysclk rate. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1656667961-1799-5-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-05ASoC: fsl_micfil: Add support for PLL switch at runtimeShengjiu Wang2-0/+32
i.MX8MQ/MN/MM/MP platforms typically have 2 AUDIO PLLs being configured to handle 8kHz and 11kHz series audio rates. The patch implements the functionality to select at runtime the appropriate AUDIO PLL as function of audio file rate. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1656667961-1799-4-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-05ASoC: fsl_spdif: Add support for PLL switch at runtime.Shengjiu Wang2-5/+44
i.MX8MQ/MN/MM/MP platforms typically have 2 AUDIO PLLs being configured to handle 8kHz and 11kHz series audio rates. The patch implements the functionality to select at runtime the appropriate AUDIO PLL as function of audio file rate. As the clock parent may be changed, need to probe txclk according to sample rate again. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1656667961-1799-3-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-05ASoC: fsl_utils: Add function to handle PLL clock sourceShengjiu Wang2-0/+76
i.MX8MQ/MN/MM/MP platforms typically have 2 AUDIO PLLs being configured to handle 8kHz and 11kHz series audio rates. Add common function in fsl_utils to handle these two PLL clock source, which are needed by CPU DAI drivers Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1656667961-1799-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-04ASoC: fsl_asrc_dma: Add legacy_dai_naming flagShengjiu Wang1-0/+1
Need to add legacy_dai_naming flag otherwise there will be issue when registerring component, that cause the probe failure. Fixes: 1e63fcc74ace ("ASoC: fsl: Migrate to new style legacy DAI naming flag") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1656899417-4775-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>