summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/rk3328_codec.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: do not include pm_runtime.h if not usedClaudiu Beznea2023-05-231-1/+0
| | | | | | | | | | Do not include pm_runtime.h header in files where APIs exported by pm_runtime.h are not used. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> # for omap-mcbsp-st.c Link: https://lore.kernel.org/r/20230517094903.2895238-2-claudiu.beznea@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rk3328: Use modern ASoC DAI format terminologyMark Brown2022-06-061-3/+3
| | | | | | | | | As part of moving to remove the old style defines for the bus clocks update the rk3328 driver to use more modern terminology for clocking. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20220602135316.3554400-4-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rk3328: fix disabling mclk on pclk probe failureNicolas Frattaroli2022-05-031-1/+1
| | | | | | | | | | | | If preparing/enabling the pclk fails, the probe function should unprepare and disable the previously prepared and enabled mclk, which it doesn't do. This commit rectifies this. Fixes: c32759035ad2 ("ASoC: rockchip: support ACODEC for rk3328") Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com> Reviewed-by: Katsuhiro Suzuki <katsuhiro@katsuster.net> Link: https://lore.kernel.org/r/20220427172310.138638-1-frattaroli.nicolas@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rk3328: fix missing clk_disable_unprepare() on error in ↵Yang Yingliang2021-05-181-6/+22
| | | | | | | | | | | | | rk3328_platform_probe() Fix the missing clk_disable_unprepare() before return from rk3328_platform_probe() in the error handling case. Fixes: c32759035ad2 ("ASoC: rockchip: support ACODEC for rk3328") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20210518075847.1116983-1-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rk3328: 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/codecs/rk3328_codec.c:502:34: warning: ‘rk3328_codec_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20201125164452.89239-6-krzk@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: codecs: merge .digital_mute() into .mute_stream()Kuninori Morimoto2020-07-161-2/+3
| | | | | | | | | | | | | | | | | | | | | | | snd_soc_dai_digital_mute() is internally using both mute_stream() (1) or digital_mute() (2), but the difference between these 2 are only handling direction. We can merge digital_mute() into mute_stream int snd_soc_dai_digital_mute(xxx, int direction) { ... else if (dai->driver->ops->mute_stream) (1) return dai->driver->ops->mute_stream(xxx, direction); else if (direction == SNDRV_PCM_STREAM_PLAYBACK && dai->driver->ops->digital_mute) (2) return dai->driver->ops->digital_mute(xxx); ... } Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/875zaxxxi4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rockchip: Make RK3328 GPIO_MUTE control explicitRobin Murphy2020-02-191-15/+16
| | | | | | | | | | | | | | | The RK3328 reference design uses an external line driver IC as a buffer on the analog codec output, enabled by the GPIO_MUTE pin, and such a configuration is currently assumed in the codec driver's direct poking of GRF_SOC_CON10 to control the GPIO_MUTE output value. However, some boards wire up analog audio yet use that pin for some other purpose, so that assumption doesn't always hold. Update this functionality to rely on an explicit GPIO descriptor, such that it can be managed at the board level. Signed-off-by: Robin Murphy <robin.murphy@arm.com> Link: https://lore.kernel.org/r/5bc383ed1832f0f5d1dcb3c97ad92fd68e5217e3.1581376744.git.robin.murphy@arm.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rockchip: use devm_platform_ioremap_resource() to simplify codeYueHaibing2019-07-311-3/+1
| | | | | | | | | | Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20190727150738.54764-4-yuehaibing@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rockchip: fix platform_no_drv_owner.cocci warningsYueHaibing2019-01-031-1/+0
| | | | | | | | Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rockchip: add workaround for silence of rk3288 ACODECKatsuhiro Suzuki2019-01-031-1/+4
| | | | | | | | | | | This patch adds reset and precharge in shutdown of PCM device. ACODEC goes to silence if we change Fs to 44.1kHz from 48kHz. This workaround seems to work but I don't know this workaround is correct sequence or not for ACODEC. Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rockchip: support ACODEC for rk3328Katsuhiro Suzuki2019-01-031-0/+517
This patch adds support for audio CODEC core of rk3328. Rockchip does not publish detail specification of this core but driver source code is opened on their GitHub repository. https://github.com/rockchip-linux/kernel So I ported this code to linux-next and added some trivial fixes. Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net> Signed-off-by: Mark Brown <broonie@kernel.org>