summaryrefslogtreecommitdiffstats
path: root/sound/soc/rockchip/rockchip_i2s.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: rockchip: Remove unused of_gpio.hAndy Shevchenko2024-06-101-1/+0
| | | | | | | | | | | | of_gpio.h is deprecated and subject to remove. The drivers in question don't use it, simply remove the unused header. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240605221446.2624964-4-andriy.shevchenko@linux.intel.com Reviewed-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Acked-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Use device_get_match_data()Rob Herring2023-10-091-5/+3
| | | | | | | | | | Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20231006-dt-asoc-header-cleanups-v3-5-13a4f0f7fee6@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rockchip: convert not to use asoc_xxx()Kuninori Morimoto2023-09-251-1/+1
| | | | | | | | | ASoC is now unified asoc_xxx() into snd_soc_xxx(). This patch convert asoc_xxx() to snd_soc_xxx(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/878r9cqngq.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rockchip: merge DAI call back functions into opsKuninori Morimoto2023-08-141-1/+1
| | | | | | | | | ALSA SoC merges DAI call backs into .ops. This patch merge these into one. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87r0od9m6i.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ALSA/ASoC: Convert to platform remove callbackMark Brown2023-03-211-4/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge series from Uwe Kleine-König <u.kleine-koenig@pengutronix.de>: Hello, this series adapts the platform drivers below sound/ to use the .remove_new() callback. Compared to the traditional .remove() callback .remove_new() returns no value. This is a good thing because the driver core doesn't (and cannot) cope for errors during remove. The only effect of a non-zero return value in .remove() is that the driver core emits a warning. The device is removed anyhow and an early return from .remove() usually yields a resource leak. By changing the remove callback to return void driver authors cannot reasonably assume any more that there is some kind of cleanup later. The first two patches simplify a driver each to return zero unconditionally, and then all drivers are trivially converted to .remove_new(). There are nearly no interdependencies in this patch set---only 1 <- 11 and 2 <- 16. So even if some individual problems are found (I don't expect that), the other patches can (and from my POV should) still be applied. Best regards Uwe Uwe Kleine-König (173): ALSA: sh: aica: Drop if blocks with always false condition ASoC: amd: acp: rembrandt: Drop if blocks with always false condition ALSA: pxa2xx: Convert to platform remove callback returning void ALSA: atmel: ac97: Convert to platform remove callback returning void ALSA: mts64: Convert to platform remove callback returning void ALSA: portman2x4: Convert to platform remove callback returning void ALSA: mips/hal2: Convert to platform remove callback returning void ALSA: mips/sgio2audio: Convert to platform remove callback returning void ALSA: hda/tegra: Convert to platform remove callback returning void ALSA: ppc/powermac: Convert to platform remove callback returning void ALSA: sh: aica: Convert to platform remove callback returning void ALSA: sh_dac_audio: Convert to platform remove callback returning void ASoC: adi: axi-i2s: Convert to platform remove callback returning void ASoC: adi: axi-spdif: Convert to platform remove callback returning void ASoC: amd: acp-pcm-dma: Convert to platform remove callback returning void ASoC: amd: acp: rembrandt: Convert to platform remove callback returning void ASoC: amd: acp: renoir: Convert to platform remove callback returning void ASoC: amd: ps: Convert to platform remove callback returning void ASoC: amd: raven: acp3x-pcm-dma: Convert to platform remove callback returning void ASoC: amd: raven: acp3x-pdm-dma: Convert to platform remove callback returning void ASoC: amd: vangogh: acp5x-pcm-dma: Convert to platform remove callback returning void ASoC: amd: yc: acp6x-pdm-dma: Convert to platform remove callback returning void ASoC: apple: mca: Convert to platform remove callback returning void ASoC: atmel: atmel-i2s: Convert to platform remove callback returning void ASoC: atmel: atmel_wm8904: Convert to platform remove callback returning void ASoC: atmel: mchp-i2s-mcc: Convert to platform remove callback returning void ASoC: atmel: mchp-pdmc: Convert to platform remove callback returning void ASoC: atmel: mchp-spdifrx: Convert to platform remove callback returning void ASoC: atmel: mchp-spdiftx: Convert to platform remove callback returning void ASoC: atmel: mikroe-proto: Convert to platform remove callback returning void ASoC: atmel: sam9g20_wm8731: Convert to platform remove callback returning void ASoC: atmel: sam9x5_wm8731: Convert to platform remove callback returning void ASoC: atmel: tse850-pcm5142: Convert to platform remove callback returning void ASoC: au1x: ac97c: Convert to platform remove callback returning void ASoC: au1x: i2sc: Convert to platform remove callback returning void ASoC: au1x: psc-ac97: Convert to platform remove callback returning void ASoC: au1x: psc-i2s: Convert to platform remove callback returning void ASoC: bcm: bcm63xx-i2s-whistler: Convert to platform remove callback returning void ASoC: bcm: cygnus-ssp: Convert to platform remove callback returning void ASoC: cirrus: edb93xx: Convert to platform remove callback returning void ASoC: cirrus: ep93xx-i2s: Convert to platform remove callback returning void ASoC: codecs: cs47l15: Convert to platform remove callback returning void ASoC: codecs: cs47l24: Convert to platform remove callback returning void ASoC: codecs: cs47l35: Convert to platform remove callback returning void ASoC: codecs: cs47l85: Convert to platform remove callback returning void ASoC: codecs: cs47l90: Convert to platform remove callback returning void ASoC: codecs: cs47l92: Convert to platform remove callback returning void ASoC: codecs: inno_rk3036: Convert to platform remove callback returning void ASoC: codecs: lpass-rx-macro: Convert to platform remove callback returning void ASoC: codecs: lpass-tx-macro: Convert to platform remove callback returning void ASoC: codecs: lpass-va-macro: Convert to platform remove callback returning void ASoC: codecs: lpass-wsa-macro: Convert to platform remove callback returning void ASoC: codecs: msm8916-wcd-analog: Convert to platform remove callback returning void ASoC: codecs: msm8916-wcd-digital: Convert to platform remove callback returning void ASoC: codecs: rk817_codec: Convert to platform remove callback returning void ASoC: codecs: wcd938x: Convert to platform remove callback returning void ASoC: codecs: wm5102: Convert to platform remove callback returning void ASoC: codecs: wm5110: Convert to platform remove callback returning void ASoC: codecs: wm8994: Convert to platform remove callback returning void ASoC: codecs: wm8997: Convert to platform remove callback returning void ASoC: codecs: wm8998: Convert to platform remove callback returning void ASoC: dwc: dwc-i2s: Convert to platform remove callback returning void ASoC: fsl: eukrea-tlv320: Convert to platform remove callback returning void ASoC: fsl: fsl_asrc: Convert to platform remove callback returning void ASoC: fsl: fsl_aud2htx: Convert to platform remove callback returning void ASoC: fsl: fsl_audmix: Convert to platform remove callback returning void ASoC: fsl: fsl_dma: Convert to platform remove callback returning void ASoC: fsl: fsl_easrc: Convert to platform remove callback returning void ASoC: fsl: fsl_esai: Convert to platform remove callback returning void ASoC: fsl: fsl_mqs: Convert to platform remove callback returning void ASoC: fsl: fsl_rpmsg: Convert to platform remove callback returning void ASoC: fsl: fsl_sai: Convert to platform remove callback returning void ASoC: fsl: fsl_spdif: Convert to platform remove callback returning void ASoC: fsl: fsl_ssi: Convert to platform remove callback returning void ASoC: fsl: fsl_xcvr: Convert to platform remove callback returning void ASoC: fsl: imx-audmux: Convert to platform remove callback returning void ASoC: fsl: imx-pcm-rpmsg: Convert to platform remove callback returning void ASoC: fsl: imx-sgtl5000: Convert to platform remove callback returning void ASoC: fsl: mpc5200_psc_ac97: Convert to platform remove callback returning void ASoC: fsl: mpc5200_psc_i2s: Convert to platform remove callback returning void ASoC: fsl: mpc8610_hpcd: Convert to platform remove callback returning void ASoC: fsl: p1022_ds: Convert to platform remove callback returning void ASoC: fsl: p1022_rdk: Convert to platform remove callback returning void ASoC: fsl: pcm030-audio-fabric: Convert to platform remove callback returning void ASoC: generic: test-component: Convert to platform remove callback returning void ASoC: img: img-i2s-in: Convert to platform remove callback returning void ASoC: img: img-i2s-out: Convert to platform remove callback returning void ASoC: img: img-parallel-out: Convert to platform remove callback returning void ASoC: img: img-spdif-in: Convert to platform remove callback returning void ASoC: img: img-spdif-out: Convert to platform remove callback returning void ASoC: img: pistachio-internal-dac: Convert to platform remove callback returning void ASoC: Intel: sst-mfld-platform-pcm: Convert to platform remove callback returning void ASoC: Intel: sst: Convert to platform remove callback returning void ASoC: Intel: bytcht_es8316: Convert to platform remove callback returning void ASoC: Intel: bytcr_rt5640: Convert to platform remove callback returning void ASoC: Intel: boards: bytcr_rt5651: Convert to platform remove callback returning void ASoC: Intel: bytcr_wm5102: Convert to platform remove callback returning void ASoC: Intel: cht_bsw_max98090_ti: Convert to platform remove callback returning void ASoC: Intel: sof_es8336: Convert to platform remove callback returning void ASoC: Intel: sof_pcm512x: Convert to platform remove callback returning void ASoC: Intel: sof_sdw: Convert to platform remove callback returning void ASoC: Intel: sof_wm8804: Convert to platform remove callback returning void ASoC: Intel: catpt: Convert to platform remove callback returning void ASoC: Intel: skl-ssp-clk: Convert to platform remove callback returning void ASoC: kirkwood: kirkwood-i2s: Convert to platform remove callback returning void ASoC: mediatek: mtk-btcvsd: Convert to platform remove callback returning void ASoC: mediatek: mt2701-afe-pcm: Convert to platform remove callback returning void ASoC: mediatek: mt6797-afe-pcm: Convert to platform remove callback returning void ASoC: mediatek: mt8173-afe-pcm: Convert to platform remove callback returning void ASoC: mediatek: mt8183-afe-pcm: Convert to platform remove callback returning void ASoC: mediatek: mt8188-afe-pcm: Convert to platform remove callback returning void ASoC: mediatek: mt8192-afe-pcm: Convert to platform remove callback returning void ASoC: mediatek: mt8195-afe-pcm: Convert to platform remove callback returning void ASoC: meson: aiu: Convert to platform remove callback returning void ASoC: mxs: mxs-sgtl5000: Convert to platform remove callback returning void ASoC: pxa: mmp-sspa: Convert to platform remove callback returning void ASoC: pxa: pxa2xx-ac97: Convert to platform remove callback returning void ASoC: qcom: qdsp6: Convert to platform remove callback returning void ASoC: rockchip: rockchip_i2s: Convert to platform remove callback returning void ASoC: rockchip: rockchip_i2s_tdm: Convert to platform remove callback returning void ASoC: rockchip: rockchip_pdm: Convert to platform remove callback returning void ASoC: rockchip: rockchip_rt5645: Convert to platform remove callback returning void ASoC: rockchip: rockchip_spdif: Convert to platform remove callback returning void ASoC: samsung: arndale: Convert to platform remove callback returning void ASoC: samsung: i2s: Convert to platform remove callback returning void ASoC: samsung: odroid: Convert to platform remove callback returning void ASoC: samsung: pcm: Convert to platform remove callback returning void ASoC: samsung: snow: Convert to platform remove callback returning void ASoC: samsung: spdif: Convert to platform remove callback returning void ASoC: sh: fsi: Convert to platform remove callback returning void ASoC: sh: hac: Convert to platform remove callback returning void ASoC: sh: rcar: Convert to platform remove callback returning void ASoC: sh: rz-ssi: Convert to platform remove callback returning void ASoC: sh: siu_dai: Convert to platform remove callback returning void ASoC: sprd: sprd-mcdt: Convert to platform remove callback returning void ASoC: stm: stm32_adfsdm: Convert to platform remove callback returning void ASoC: stm: stm32_i2s: Convert to platform remove callback returning void ASoC: stm: stm32_sai_sub: Convert to platform remove callback returning void ASoC: stm: stm32_spdifrx: Convert to platform remove callback returning void ASoC: sunxi: sun4i-codec: Convert to platform remove callback returning void ASoC: sunxi: sun4i-i2s: Convert to platform remove callback returning void ASoC: sunxi: sun4i-spdif: Convert to platform remove callback returning void ASoC: sunxi: sun50i-dmic: Convert to platform remove callback returning void ASoC: sunxi: sun8i-codec: Convert to platform remove callback returning void ASoC: tegra: tegra186_asrc: Convert to platform remove callback returning void ASoC: tegra: tegra186_dspk: Convert to platform remove callback returning void ASoC: tegra: tegra20_ac97: Convert to platform remove callback returning void ASoC: tegra: tegra20_i2s: Convert to platform remove callback returning void ASoC: tegra: tegra210_admaif: Convert to platform remove callback returning void ASoC: tegra: tegra210_adx: Convert to platform remove callback returning void ASoC: tegra: tegra210_ahub: Convert to platform remove callback returning void ASoC: tegra: tegra210_amx: Convert to platform remove callback returning void ASoC: tegra: tegra210_dmic: Convert to platform remove callback returning void ASoC: tegra: tegra210_i2s: Convert to platform remove callback returning void ASoC: tegra: tegra210_mixer: Convert to platform remove callback returning void ASoC: tegra: tegra210_mvc: Convert to platform remove callback returning void ASoC: tegra: tegra210_ope: Convert to platform remove callback returning void ASoC: tegra: tegra210_sfc: Convert to platform remove callback returning void ASoC: tegra: tegra30_ahub: Convert to platform remove callback returning void ASoC: tegra: tegra30_i2s: Convert to platform remove callback returning void ASoC: ti: ams-delta: Convert to platform remove callback returning void ASoC: ti: davinci-i2s: Convert to platform remove callback returning void ASoC: ti: davinci-mcasp: Convert to platform remove callback returning void ASoC: ti: omap-hdmi: Convert to platform remove callback returning void ASoC: ti: omap-mcbsp: Convert to platform remove callback returning void ASoC: uniphier: evea: Convert to platform remove callback returning void ASoC: ux500: mop500: Convert to platform remove callback returning void ASoC: ux500: ux500_msp_dai: Convert to platform remove callback returning void ASoC: xilinx: xlnx_formatter_pcm: Convert to platform remove callback returning void ASoC: xilinx: xlnx_spdif: Convert to platform remove callback returning void ASoC: xtensa: xtfpga-i2s: Convert to platform remove callback returning void ALSA: sparc/cs4231: Convert to platform remove callback returning void ALSA: sparc/dbri: Convert to platform remove callback returning void sound/arm/pxa2xx-ac97.c | 6 ++---- sound/atmel/ac97c.c | 6 ++---- sound/drivers/mts64.c | 6 ++---- sound/drivers/portman2x4.c | 6 ++---- sound/mips/hal2.c | 5 ++--- sound/mips/sgio2audio.c | 5 ++--- sound/pci/hda/hda_tegra.c | 6 ++---- sound/ppc/powermac.c | 5 ++--- sound/sh/aica.c | 7 ++----- sound/sh/sh_dac_audio.c | 5 ++--- sound/soc/adi/axi-i2s.c | 6 ++---- sound/soc/adi/axi-spdif.c | 6 ++---- sound/soc/amd/acp-pcm-dma.c | 6 ++---- sound/soc/amd/acp/acp-rembrandt.c | 13 +++---------- sound/soc/amd/acp/acp-renoir.c | 5 ++--- sound/soc/amd/ps/ps-pdm-dma.c | 5 ++--- sound/soc/amd/raven/acp3x-pcm-dma.c | 5 ++--- sound/soc/amd/renoir/acp3x-pdm-dma.c | 5 ++--- sound/soc/amd/vangogh/acp5x-pcm-dma.c | 5 ++--- sound/soc/amd/yc/acp6x-pdm-dma.c | 5 ++--- sound/soc/apple/mca.c | 5 ++--- sound/soc/atmel/atmel-i2s.c | 6 ++---- sound/soc/atmel/atmel_wm8904.c | 6 ++---- sound/soc/atmel/mchp-i2s-mcc.c | 6 ++---- sound/soc/atmel/mchp-pdmc.c | 6 ++---- sound/soc/atmel/mchp-spdifrx.c | 6 ++---- sound/soc/atmel/mchp-spdiftx.c | 6 ++---- sound/soc/atmel/mikroe-proto.c | 6 ++---- sound/soc/atmel/sam9g20_wm8731.c | 6 ++---- sound/soc/atmel/sam9x5_wm8731.c | 6 ++---- sound/soc/atmel/tse850-pcm5142.c | 6 ++---- sound/soc/au1x/ac97c.c | 6 ++---- sound/soc/au1x/i2sc.c | 6 ++---- sound/soc/au1x/psc-ac97.c | 6 ++---- sound/soc/au1x/psc-i2s.c | 6 ++---- sound/soc/bcm/bcm63xx-i2s-whistler.c | 5 ++--- sound/soc/bcm/cygnus-ssp.c | 6 ++---- sound/soc/cirrus/edb93xx.c | 6 ++---- sound/soc/cirrus/ep93xx-i2s.c | 5 ++--- sound/soc/codecs/cs47l15.c | 6 ++---- sound/soc/codecs/cs47l24.c | 6 ++---- sound/soc/codecs/cs47l35.c | 6 ++---- sound/soc/codecs/cs47l85.c | 6 ++---- sound/soc/codecs/cs47l90.c | 6 ++---- sound/soc/codecs/cs47l92.c | 6 ++---- sound/soc/codecs/inno_rk3036.c | 6 ++---- sound/soc/codecs/lpass-rx-macro.c | 6 ++---- sound/soc/codecs/lpass-tx-macro.c | 6 ++---- sound/soc/codecs/lpass-va-macro.c | 6 ++---- sound/soc/codecs/lpass-wsa-macro.c | 6 ++---- sound/soc/codecs/msm8916-wcd-analog.c | 6 ++---- sound/soc/codecs/msm8916-wcd-digital.c | 6 ++---- sound/soc/codecs/rk817_codec.c | 6 ++---- sound/soc/codecs/wcd938x.c | 6 ++---- sound/soc/codecs/wm5102.c | 6 ++---- sound/soc/codecs/wm5110.c | 6 ++---- sound/soc/codecs/wm8994.c | 6 ++---- sound/soc/codecs/wm8997.c | 6 ++---- sound/soc/codecs/wm8998.c | 6 ++---- sound/soc/dwc/dwc-i2s.c | 5 ++--- sound/soc/fsl/eukrea-tlv320.c | 6 ++---- sound/soc/fsl/fsl_asrc.c | 6 ++---- sound/soc/fsl/fsl_aud2htx.c | 6 ++---- sound/soc/fsl/fsl_audmix.c | 6 ++---- sound/soc/fsl/fsl_dma.c | 6 ++---- sound/soc/fsl/fsl_easrc.c | 6 ++---- sound/soc/fsl/fsl_esai.c | 6 ++---- sound/soc/fsl/fsl_mqs.c | 5 ++--- sound/soc/fsl/fsl_rpmsg.c | 6 ++---- sound/soc/fsl/fsl_sai.c | 6 ++---- sound/soc/fsl/fsl_spdif.c | 6 ++---- sound/soc/fsl/fsl_ssi.c | 6 ++---- sound/soc/fsl/fsl_xcvr.c | 5 ++--- sound/soc/fsl/imx-audmux.c | 6 ++---- sound/soc/fsl/imx-pcm-rpmsg.c | 6 ++---- sound/soc/fsl/imx-sgtl5000.c | 6 ++---- sound/soc/fsl/mpc5200_psc_ac97.c | 5 ++--- sound/soc/fsl/mpc5200_psc_i2s.c | 5 ++--- sound/soc/fsl/mpc8610_hpcd.c | 6 ++---- sound/soc/fsl/p1022_ds.c | 6 ++---- sound/soc/fsl/p1022_rdk.c | 6 ++---- sound/soc/fsl/pcm030-audio-fabric.c | 6 ++---- sound/soc/generic/test-component.c | 6 ++---- sound/soc/img/img-i2s-in.c | 6 ++---- sound/soc/img/img-i2s-out.c | 6 ++---- sound/soc/img/img-parallel-out.c | 6 ++---- sound/soc/img/img-spdif-in.c | 6 ++---- sound/soc/img/img-spdif-out.c | 6 ++---- sound/soc/img/pistachio-internal-dac.c | 6 ++---- sound/soc/intel/atom/sst-mfld-platform-pcm.c | 5 ++--- sound/soc/intel/atom/sst/sst_acpi.c | 5 ++--- sound/soc/intel/boards/bytcht_es8316.c | 5 ++--- sound/soc/intel/boards/bytcr_rt5640.c | 5 ++--- sound/soc/intel/boards/bytcr_rt5651.c | 5 ++--- sound/soc/intel/boards/bytcr_wm5102.c | 5 ++--- sound/soc/intel/boards/cht_bsw_max98090_ti.c | 6 ++---- sound/soc/intel/boards/sof_es8336.c | 6 ++---- sound/soc/intel/boards/sof_pcm512x.c | 6 ++---- sound/soc/intel/boards/sof_sdw.c | 6 ++---- sound/soc/intel/boards/sof_wm8804.c | 5 ++--- sound/soc/intel/catpt/device.c | 6 ++---- sound/soc/intel/skylake/skl-ssp-clk.c | 6 ++---- sound/soc/kirkwood/kirkwood-i2s.c | 6 ++---- sound/soc/mediatek/common/mtk-btcvsd.c | 5 ++--- sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 6 ++---- sound/soc/mediatek/mt6797/mt6797-afe-pcm.c | 6 ++---- sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 5 ++--- sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 6 ++---- sound/soc/mediatek/mt8188/mt8188-afe-pcm.c | 6 ++---- sound/soc/mediatek/mt8192/mt8192-afe-pcm.c | 5 ++--- sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 5 ++--- sound/soc/meson/aiu.c | 6 ++---- sound/soc/mxs/mxs-sgtl5000.c | 6 ++---- sound/soc/pxa/mmp-sspa.c | 7 +++---- sound/soc/pxa/pxa2xx-ac97.c | 5 ++--- sound/soc/qcom/qdsp6/q6routing.c | 6 ++---- sound/soc/rockchip/rockchip_i2s.c | 6 ++---- sound/soc/rockchip/rockchip_i2s_tdm.c | 6 ++---- sound/soc/rockchip/rockchip_pdm.c | 6 ++---- sound/soc/rockchip/rockchip_rt5645.c | 6 ++---- sound/soc/rockchip/rockchip_spdif.c | 6 ++---- sound/soc/samsung/arndale.c | 5 ++--- sound/soc/samsung/i2s.c | 8 +++----- sound/soc/samsung/odroid.c | 6 ++---- sound/soc/samsung/pcm.c | 6 ++---- sound/soc/samsung/snow.c | 6 ++---- sound/soc/samsung/spdif.c | 6 ++---- sound/soc/sh/fsi.c | 6 ++---- sound/soc/sh/hac.c | 5 ++--- sound/soc/sh/rcar/core.c | 6 ++---- sound/soc/sh/rz-ssi.c | 6 ++---- sound/soc/sh/siu_dai.c | 5 ++--- sound/soc/sprd/sprd-mcdt.c | 6 ++---- sound/soc/stm/stm32_adfsdm.c | 6 ++---- sound/soc/stm/stm32_i2s.c | 6 ++---- sound/soc/stm/stm32_sai_sub.c | 6 ++---- sound/soc/stm/stm32_spdifrx.c | 6 ++---- sound/soc/sunxi/sun4i-codec.c | 6 ++---- sound/soc/sunxi/sun4i-i2s.c | 6 ++---- sound/soc/sunxi/sun4i-spdif.c | 6 ++---- sound/soc/sunxi/sun50i-dmic.c | 6 ++---- sound/soc/sunxi/sun8i-codec.c | 6 ++---- sound/soc/tegra/tegra186_asrc.c | 6 ++---- sound/soc/tegra/tegra186_dspk.c | 6 ++---- sound/soc/tegra/tegra20_ac97.c | 6 ++---- sound/soc/tegra/tegra20_i2s.c | 6 ++---- sound/soc/tegra/tegra210_admaif.c | 6 ++---- sound/soc/tegra/tegra210_adx.c | 6 ++---- sound/soc/tegra/tegra210_ahub.c | 6 ++---- sound/soc/tegra/tegra210_amx.c | 6 ++---- sound/soc/tegra/tegra210_dmic.c | 6 ++---- sound/soc/tegra/tegra210_i2s.c | 6 ++---- sound/soc/tegra/tegra210_mixer.c | 6 ++---- sound/soc/tegra/tegra210_mvc.c | 6 ++---- sound/soc/tegra/tegra210_ope.c | 6 ++---- sound/soc/tegra/tegra210_sfc.c | 6 ++---- sound/soc/tegra/tegra30_ahub.c | 6 ++---- sound/soc/tegra/tegra30_i2s.c | 6 ++---- sound/soc/ti/ams-delta.c | 5 ++--- sound/soc/ti/davinci-i2s.c | 6 ++---- sound/soc/ti/davinci-mcasp.c | 6 ++---- sound/soc/ti/omap-hdmi.c | 5 ++--- sound/soc/ti/omap-mcbsp.c | 6 ++---- sound/soc/uniphier/evea.c | 6 ++---- sound/soc/ux500/mop500.c | 6 ++---- sound/soc/ux500/ux500_msp_dai.c | 6 ++---- sound/soc/xilinx/xlnx_formatter_pcm.c | 5 ++--- sound/soc/xilinx/xlnx_spdif.c | 5 ++--- sound/soc/xtensa/xtfpga-i2s.c | 5 ++--- sound/sparc/cs4231.c | 6 ++---- sound/sparc/dbri.c | 6 ++---- 171 files changed, 345 insertions(+), 654 deletions(-) base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6 -- 2.39.2
| * ASoC: rockchip: rockchip_i2s: Convert to platform remove callback returning voidUwe Kleine-König2023-03-201-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Link: https://lore.kernel.org/r/20230315150745.67084-120-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rockchip: i2s: Add compatible for RK3588Cristian Ciocaltea2023-03-201-0/+1
|/ | | | | | | | | The Rockchip I2S driver supports the RK3588/RK3588S SoCs, hence add the corresponding compatible string. Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Link: https://lore.kernel.org/r/20230315114806.3819515-9-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rockchip: i2s: use regmap_read_poll_timeout_atomic to poll I2S_CLRJudy Hsiao2022-09-301-12/+12
| | | | | | | | | | | | 1. Uses regmap_read_poll_timeout_atomic to poll I2S_CLR as it is called within a spin lock. 2. Fixes the typo of break condition in regmap_read_poll_timeout_atomic. Fixes: fbb0ec656ee5 ("ASoC: rockchip: i2s: use regmap_read_poll_timeout to poll I2S_CLR") Signed-off-by: Judy Hsiao <judyhsiao@chromium.org> Link: https://lore.kernel.org/r/20220930151546.2017667-1-judyhsiao@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rockchip: i2s: use regmap_read_poll_timeout to poll I2S_CLRJudy Hsiao2022-09-141-25/+16
| | | | | | | | | | | | Use regmap_read_poll_timeout to poll I2S_CLR. It also fixes the 'rockchip-i2s ff070000.i2s; fail to clear' when the read of I2S_CLR exceeds the retry limit. Fixes: 0ff9f8b9f592 ("ASoC: rockchip: i2s: Fix error code when fail to read I2S_CLR") Signed-off-by: Judy Hsiao <judyhsiao@chromium.org> Reviewed-by: Brian Norris <briannorris@chromium.org> Link: https://lore.kernel.org/r/20220914031234.2250298-1-judyhsiao@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Merge up fixesMark Brown2022-07-111-1/+0
|\ | | | | | | Needed for the Rockchip driver.
| * ASoC: rockchip: i2s: Fix NULL pointer dereference when pinctrl is not foundAlexandru Elisei2022-07-111-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit a5450aba737d ("ASoC: rockchip: i2s: switch BCLK to GPIO") switched BCLK to GPIO functions when probing the i2s bus interface, but missed adding a check for when devm_pinctrl_get() returns an error. This can lead to the following NULL pointer dereference on a rockpro64-v2 if there are no "pinctrl" properties in the i2s device tree node. Check that i2s->pinctrl is valid before attempting to search for the bclk_on and bclk_off pinctrl states. Fixes: a5450aba737d ("ASoC: rockchip: i2s: switch BCLK to GPIO") Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com> Link: https://lore.kernel.org/r/20220711130522.401551-1-alexandru.elisei@arm.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: rockchip: i2s: switch BCLK to GPIOJudy Hsiao2022-06-241-31/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We discoverd that the state of BCLK on, LRCLK off and SD_MODE on may cause the speaker melting issue. Removing LRCLK while BCLK is present can cause unexpected output behavior including a large DC output voltage as described in the Max98357a datasheet. In order to: 1. prevent BCLK from turning on by other component. 2. keep BCLK and LRCLK being present at the same time This patch switches BCLK to GPIO func before LRCLK output, and configures BCLK func back during LRCLK is output. Without this fix, BCLK is turned on 11 ms earlier than LRCK by the da7219. With this fix, BCLK is turned on only 0.4 ms earlier than LRCK by the rockchip codec. Signed-off-by: Judy Hsiao <judyhsiao@chromium.org> Link: https://lore.kernel.org/r/20220615045643.3137287-1-judyhsiao@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rockchip: i2s: Fix error code when fail to read I2S_CLRJudy Hsiao2022-07-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | Add the error code '-EBUSY' when fail to read I2S_CLR in rockchip_snd_rxctrl() and rockchip_snd_txctrl() Fixes: 44f362c2cc6d ("ASoC: rockchip: i2s: switch BCLK to GPIO") Signed-off-by: Judy Hsiao <judyhsiao@chromium.org> Reviewed-by: Brian Norris <briannorris@chromium.org> Link: https://lore.kernel.org/r/20220701021427.3120549-1-judyhsiao@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: Refactor non_legacy_dai_naming flagMark Brown2022-06-291-0/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>: Historically, the legacy DAI naming scheme was applied to platform drivers and the newer scheme to CODEC drivers. During componentisation the core lost the knowledge of if a driver was a CODEC or platform, they were all now components. To continue to support the legacy naming on older platform drivers a flag was added to the snd_soc_component_driver structure, non_legacy_dai_naming, to indicate to use the new scheme and this was applied to all CODECs as part of the migration. However, a slight issue appears to be developing with respect to this flag being opt in for the non-legacy scheme, which presumably we want to be the primary scheme used. Many codec drivers appear to forget to include this flag: grep -l -r "snd_soc_component_driver" sound/soc/codecs/*.c | xargs grep -L "non_legacy_dai_naming" | wc 48 48 556 Whilst in many cases the configuration of the DAIs themselves will cause the core to apply the new scheme anyway, it would seem more sensible to change the flag to legacy_dai_naming making the new scheme opt out. This patch series migrates across to such a scheme.
| * | ASoC: rockchip: Migrate to new style legacy DAI naming flagCharles Keepax2022-06-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). These drivers appear to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220623125250.2355471-27-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: rockchip: i2s: Remove unwanted dma settings in rockchip_i2s_probeJudy Hsiao2022-06-291-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the unwanted dma settings in rockchip_i2s_probe. Fixes: 44f362c2cc6d ("ASoC: rockchip: i2s: switch BCLK to GPIO") Signed-off-by: Judy Hsiao <judyhsiao@chromium.org> Link: https://lore.kernel.org/r/20220629080421.2427933-1-judyhsiao@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: rockchip: i2s: Fix the debug level on missing pinctrlJudy Hsiao2022-06-291-1/+1
|/ / | | | | | | | | | | | | | | | | Use dev_dbg on missing i2s->pinctrl as the pinctrl property is optional. Fixes: 44f362c2cc6d ("ASoC: rockchip: i2s: switch BCLK to GPIO") Signed-off-by: Judy Hsiao <judyhsiao@chromium.org> Link: https://lore.kernel.org/r/20220629080345.2427872-1-judyhsiao@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rockchip: i2s: Fix missing error code in rockchip_i2s_probe()Jiapeng Chong2022-06-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The error code is missing in this code scenario, add the error code '-EINVAL' to the return value 'ret'. This was found by coccicheck: sound/soc/rockchip/rockchip_i2s.c:810 rockchip_i2s_probe() warn: missing error code 'ret'. Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Link: https://lore.kernel.org/r/20220624082745.68367-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rockchip: i2s: switch BCLK to GPIOMark Brown2022-06-221-45/+35
|\ \ | | | | | | | | | | | | | | | | | | | | | Merge series from Judy Hsiao <judyhsiao@chromium.org>: The patches series is to fix the unexpected large DC output voltage of Max98357a that burns the speakers on the rockchip platform when BCLK and SD_MODE are ON but LRCLK is OFF.
| * | ASoC: rockchip: i2s: switch BCLK to GPIOJudy Hsiao2022-06-211-46/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We discoverd that the state of BCLK on, LRCLK off and SD_MODE on may cause the speaker melting issue. Removing LRCLK while BCLK is present can cause unexpected output behavior including a large DC output voltage as described in the Max98357a datasheet. In order to: 1. prevent BCLK from turning on by other component. 2. keep BCLK and LRCLK being present at the same time This patch switches BCLK to GPIO func before LRCLK output, and configures BCLK func back during LRCLK is output. Without this fix, BCLK is turned on 11 ms earlier than LRCK by the da7219. With this fix, BCLK is turned on only 0.4 ms earlier than LRCK by the rockchip codec. Signed-off-by: Judy Hsiao <judyhsiao@chromium.org> Reviewed-by: Brian Norris <briannorris@chromium.org> Link: https://lore.kernel.org/r/20220619095324.492678-2-judyhsiao@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: rockchip: i2s: Fix crash on missing pinctrlChen-Yu Tsai2022-06-221-15/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 44f362c2cc6d ("ASoC: rockchip: i2s: switch BCLK to GPIO") added pinctrl lookups, but did not skip the lookup if there was no pinctrl device tied to the I2S controller. As a result, the lookup was done on an invalid pointer in such cases, causing a kernel panic. Only do the subsequent pinctrl state lookups and switch if a pinctrl device was found. i2s_pinctrl_select_bclk_{on,off} already guard against missing pinctrl device or pinctrl state, so those two functions aren't touched. Fixes: 44f362c2cc6d ("ASoC: rockchip: i2s: switch BCLK to GPIO") Signed-off-by: Chen-Yu Tsai <wens@csie.org> Link: https://lore.kernel.org/r/20220621185747.2782-1-wens@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: Merge fixesMark Brown2022-06-221-31/+129
|\ \ \ | |/ / |/| | | | | Needed for new development.
| * | ASoC: rockchip: i2s: switch BCLK to GPIOJudy Hsiao2022-06-201-31/+129
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We discoverd that the state of BCLK on, LRCLK off and SD_MODE on may cause the speaker melting issue. Removing LRCLK while BCLK is present can cause unexpected output behavior including a large DC output voltage as described in the Max98357a datasheet. In order to: 1. prevent BCLK from turning on by other component. 2. keep BCLK and LRCLK being present at the same time This patch switches BCLK to GPIO func before LRCLK output, and configures BCLK func back during LRCLK is output. Without this fix, BCLK is turned on 11 ms earlier than LRCK by the da7219. With this fix, BCLK is turned on only 0.4 ms earlier than LRCK by the rockchip codec. Signed-off-by: Judy Hsiao <judyhsiao@chromium.org> Link: https://lore.kernel.org/r/20220615045643.3137287-1-judyhsiao@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rockchip: Rename set_fmt_new back to set_fmtCharles Keepax2022-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220519154318.2153729-46-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rockchip: Update to use set_fmt_new callbackCharles Keepax2022-06-061-4/+4
|/ | | | | | | | | | | As part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Tested-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com> Link: https://lore.kernel.org/r/20220519154318.2153729-19-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rockchip: i2s: Fix missing clk_disable_unprepare() in rockchip_i2s_probeMiaoqian Lin2022-03-081-5/+10
| | | | | | | | | | Fix the missing clk_disable_unprepare() before return from rockchip_i2s_probe() in the error handling case. Fixes: 01605ad12875 ("ASoC: rockchip-i2s: enable "hclk" for rockchip I2S controller") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Link: https://lore.kernel.org/r/20220307083553.26009-1-linmq006@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rockchip: Use generic dmaengine codeSugar Zhang2021-10-201-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 75b31192fe6ad20b42276b20ee3bdf1493216d63. The original purpose of customized pcm was to config prealloc buffer size flexibly. but, we can do the same thing by soc-generic-dmaengine-pcm. And the generic one can generated the better config by querying DMA capabilities from dmaengine driver rather than the Hard-Coded one. e.g. the customized one: static const struct snd_pcm_hardware snd_rockchip_hardware = { .info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME | SNDRV_PCM_INFO_INTERLEAVED, ... the generic one: ret = dma_get_slave_caps(chan, &dma_caps); if (ret == 0) { if (dma_caps.cmd_pause && dma_caps.cmd_resume) hw.info |= SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME; if (dma_caps.residue_granularity <= DMA_RESIDUE_GRANULARITY_SEGMENT) hw.info |= SNDRV_PCM_INFO_BATCH; ... So, let's revert back to use the generic dmaengine pcm. Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Reviewed-by: John Keeping <john@metanate.com> Link: https://lore.kernel.org/r/1632792957-80428-1-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rockchip: i2s: Fix concurrency between tx/rxSugar Zhang2021-09-031-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds lock to fix comcurrency between tx/rx to fix 'rockchip-i2s ff070000.i2s; fail to clear' Considering the situation; tx stream rx stream | | | disable enable | | reset After this patch: lock | tx stream | enable | unlock -------- --------- lock | rx stream | disable | reset | unlock Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Link: https://lore.kernel.org/r/1630674434-650-1-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rockchip: i2s: Add support for frame inversionSugar Zhang2021-08-261-3/+17
| | | | | | | | This patch adds support for frame inversion. Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Link: https://lore.kernel.org/r/1629950594-14345-2-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rockchip: i2s: Add compatible for more SoCsSugar Zhang2021-08-261-0/+10
| | | | | | | | This patch adds more compatible strings for SoCs. Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Link: https://lore.kernel.org/r/1629950562-14281-5-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rockchip: i2s: Make playback/capture optionalSugar Zhang2021-08-261-50/+79
| | | | | | | | | | There are some controllers which support playback only or capture only. so, make it optional. and initial capability by 'dma-names' of DT. Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Link: https://lore.kernel.org/r/1629950562-14281-4-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rockchip: i2s: Fixup config for DAIFMT_DSP_A/BXiaotan Luo2021-08-261-8/+8
| | | | | | | | | | - DSP_A: PCM delay 1 bit mode, L data MSB after FRM LRC - DSP_B: PCM no delay mode, L data MSB during FRM LRC Signed-off-by: Xiaotan Luo <lxt@rock-chips.com> Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Link: https://lore.kernel.org/r/1629950562-14281-3-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rockchip: i2s: Fix regmap_ops hangSugar Zhang2021-08-261-5/+14
| | | | | | | | | | API 'set_fmt' maybe called when PD is off, in the situation, any register access will hang the system. so, enable PD before r/w register. Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Link: https://lore.kernel.org/r/1629950520-14190-4-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rockchip: i2s: Improve dma data transfer efficiencySugar Zhang2021-08-261-2/+2
| | | | | | | | | This patch changes dma data burst from 4 to 8 to improve data transfer efficiency. Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Link: https://lore.kernel.org/r/1629950520-14190-3-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rockchip: i2s: Fixup clk div errorSugar Zhang2021-08-261-2/+2
| | | | | | | | | | | | | | MCLK maybe not precise as required because of PLL, but which still can be used and no side effect. so, using DIV_ROUND_CLOSEST instead div. e.g. set mclk to 11289600 Hz, but get 11289598 Hz. Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Link: https://lore.kernel.org/r/1629950520-14190-2-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rockchip: i2s: Add support for set bclk ratioSugar Zhang2021-08-261-1/+15
| | | | | | | | This patch adds support for set bclk ratio from machine driver. Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Link: https://lore.kernel.org/r/1629950520-14190-1-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rockchip: i2s: Use devm_platform_get_and_ioremap_resource()Yang Yingliang2021-06-161-2/+1
| | | | | | | | | Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20210615141502.1683686-1-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rockchip: sync parameter naming (rate/sample_bits)Kuninori Morimoto2021-01-211-1/+1
| | | | | | | | | | | | | | 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/87mtxaolhz.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: sync parameter naming : rate / sample_bitsKuninori Morimoto2021-01-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | snd_pcm_runtime / snd_soc_dai / snd_soc_dai_driver / snd_soc_dai_link have related parameter which is similar but not same naming. struct snd_pcm_runtime { ... (A) unsigned int rate; ... (B) unsigned int sample_bits; ... }; struct snd_soc_dai { ... (A) unsigned int rate; (B) unsigned int sample_bits; ... }; struct snd_soc_dai_driver { ... (A) unsigned int symmetric_rates:1; (B) unsigned int symmetric_samplebits:1; ... }; struct snd_soc_dai_link { ... (A) unsigned int symmetric_rates:1; (B) unsigned int symmetric_samplebits:1; ... }; Because it is similar but not same naming rule, code can be verbose / can't share macro. This patch sync naming rule for framework. - xxx_rates; + xxx_rate; - xxx_samplebits; + xxx_sample_bits; old name will be removed if all drivers were switched to new naming rule. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87wnweolj6.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rockchip: mark OF related data as maybe unusedKrzysztof Kozlowski2020-11-261-1/+1
| | | | | | | | | | | | | The driver can be compile tested with !CONFIG_OF making certain data unused: sound/soc/rockchip/rockchip_i2s.c:569:34: warning: ‘rockchip_i2s_match’ defined but not used [-Wunused-const-variable=] sound/soc/rockchip/rockchip_pdm.c:463:34: warning: ‘rockchip_pdm_match’ defined but not used [-Wunused-const-variable=] sound/soc/rockchip/rockchip_spdif.c:44:34: warning: ‘rk_spdif_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20201125164452.89239-12-krzk@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ALSA: rockchip_i2s: fix a possible divide-by-zero bug in ↵Tuo Li2020-09-111-1/+1
| | | | | | | | | | | | | | | | | | rockchip_i2s_hw_params() The variable bclk_rate is checked in: if (bclk_rate && mclk_rate % bclk_rate) This indicates that bclk_rate can be zero. If so, a divide-by-zero bug will occur: div_bclk = mclk_rate / bclk_rate; To fix this possible bug, the function returns -EINVAL when bclk_rate is zero. Signed-off-by: Tuo Li <tuoli96@outlook.com> Link: https://lore.kernel.org/r/TY2PR04MB4029799E60A5BCAAD5B7B5BBB8280@TY2PR04MB4029.apcprd04.prod.outlook.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rockchip: use asoc_substream_to_rtd()Kuninori Morimoto2020-07-231-1/+1
| | | | | | | | | Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87h7u30yu1.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoc: rockchip: i2s: Fix RPM imbalanceRobin Murphy2019-10-031-1/+1
| | | | | | | | | | | | If rockchip_pcm_platform_register() fails, e.g. upon deferring to wait for an absent DMA channel, we return without disabling RPM, which makes subsequent re-probe attempts scream with errors about the unbalanced enable. Don't do that. Fixes: ebb75c0bdba2 ("ASoC: rockchip: i2s: Adjust devm usage") Signed-off-by: Robin Murphy <robin.murphy@arm.com> Link: https://lore.kernel.org/r/bcb12a849a05437fb18372bc7536c649b94bdf07.1570029862.git.robin.murphy@arm.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rockchip: ignore 0Hz sysclkKatsuhiro Suzuki2019-09-091-0/+3
| | | | | | | | | | | | | This patch ignores sysclk setting if it is 0Hz. Some codecs treat 0Hz sysclk as signal of applying no constraints. This driver does not have such feature but current implementation outputs 'Failed to set mclk' error message if machine driver sets 0Hz sysclk to this driver. Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net> Link: https://lore.kernel.org/r/20190907174332.19586-1-katsuhiro@katsuster.net Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rockchip: Fix mono captureCheng-Yi Chiang2019-07-261-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit db51707b9c9aeedd310ebce60f15d5bb006567e0. Revert "ASoC: rockchip: i2s: Support mono capture" Previous discussion in https://patchwork.kernel.org/patch/10147153/ explains the issue of the patch. While device is configured as 1-ch, hardware is still generating a 2-ch stream. When user space reads the data and assumes it is a 1-ch stream, the rate will be slower by 2x. Revert the change so 1-ch is not supported. User space can selectively take one channel data out of two channel if 1-ch is preferred. Currently, both channels record identical data. Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org> Link: https://lore.kernel.org/r/20190726044202.26866-1-cychiang@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
* treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner2019-06-191-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ASoC: rockchip: add config for rockchip dmaengine pcm registerJianqun Xu2018-06-181-1/+2
| | | | | | | | This patch makes the rockchip i2s pcm configurable by adding rockchip pcm config for devm_snd_dmaengine_pcm_register. Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge remote-tracking branch 'asoc/topic/rockchip' into asoc-nextMark Brown2018-01-121-2/+3
|\
| * ASoC: rockchip: i2s: Support mono captureMatthias Kaehlcke2018-01-081-2/+3
| | | | | | | | | | | | | | | | | | | | The Rockchip I2S controller only allows to configure even numbers of capture channels. It is still possible to capture monophonic audio by using dual-channel mode and ignoring the 'data' from the second channel. Signed-off-by: Matthias Kaehlcke <mka@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rockchip: i2s: fix playback after runtime resumeJohn Keeping2018-01-081-0/+6
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | When restoring registers during runtime resume, we must not write to I2S_TXDR which is the transmit FIFO as this queues up a sample to be output and pushes all of the output channels down by one. This can be demonstrated with the speaker-test utility: for i in a b c; do speaker-test -c 2 -s 1; done which should play a test through the left speaker three times but if the I2S hardware starts runtime suspended the first sample will be played through the right speaker. Fix this by marking I2S_TXDR as volatile (which also requires marking it as readble, even though it technically isn't). This seems to be the most robust fix, the alternative of giving I2S_TXDR a default value is more fragile since it does not prevent regcache writing to the register in all circumstances. While here, also fix the configuration of I2S_RXDR and I2S_FIFOLR; these are not writable so they do not suffer from the same problem as I2S_TXDR but reading from I2S_RXDR does suffer from a similar problem. Fixes: f0447f6cbb20 ("ASoC: rockchip: i2s: restore register during runtime_suspend/resume cycle", 2016-09-07) Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org