summaryrefslogtreecommitdiff
path: root/sound/soc/loongson/loongson_i2s.c
AgeCommit message (Collapse)Author
2025-06-08ASoC: loongson: Fix build warnings about export.hHuacai Chen
After commit 25704938c86d7b2 ("scripts/misc-check: check missing #include <linux/export.h> when W=1") and 1239f681359926101e ("scripts/misc-check: check unnecessary #include <linux/export.h> when W=1"), we get some build warnings with W=1: sound/soc/loongson/loongson_i2s.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing So fix these build warnings for ASoC/Loongson. Signed-off-by: Huacai Chen <chenhuacai@loongson.cn> Link: https://patch.msgid.link/20250608142737.168829-1-chenhuacai@loongson.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2024-10-17ASoC: loongson: make loongson-i2s.o a separate moduleArnd Bergmann
An object file should not be linked into multiple modules and/or vmlinux: scripts/Makefile.build:221: /home/arnd/arm-soc/sound/soc/loongson/Makefile: loongson_i2s.o is added to multiple modules: snd-soc-loongson-i2s-pci snd-soc-loongson-i2s-plat Change this one to make it a library module with two exported symbols that will work in any configuration. Fixes: ba4c5fad598c ("ASoC: loongson: Add I2S controller driver as platform device") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://patch.msgid.link/20241015150958.2294155-1-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-09ASoC: loongson: Factor out loongson i2s enable clock functionsBinbin Zhou
There are a few i2s clock enable operations in loongson_i2s_set_fmt(), convert them to simple helper functions called loongson_i2s_enable_mclk() and loongson_i2s_enable_bclk(). Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://patch.msgid.link/d6f6c818b0ecee87277f704b6a801cbbf5e712ce.1725844530.git.zhoubinbin@loongson.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-09ASoC: loongson: Replace if with ternary operatorBinbin Zhou
Replace an if statement with a ternary operator, making the code a tiny bit shorter. Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://patch.msgid.link/94ec2ac178610f50af4815ef5b719695915bba31.1725844530.git.zhoubinbin@loongson.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-03ASoC: loongson: remove unnecessary assignment in i2s_resume()tangbin
In this function, the assignment ret is unnecessary, thus remove it. Signed-off-by: tangbin <tangbin@cmss.chinamobile.com> Link: https://patch.msgid.link/20240903090301.6192-1-tangbin@cmss.chinamobile.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-08-14ASoC: loongson: merge DAI call back functions into opsKuninori Morimoto
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/87o7jh9m5w.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-16ASoC: loongson: fix compile testing on 32-bitArnd Bergmann
DIV_ROUND_CLOSEST() does not work on 64-bit variables when building for a 32-bit target: ld.lld: error: undefined symbol: __udivdi3 >>> referenced by loongson_i2s.c >>> sound/soc/loongson/loongson_i2s.o:(loongson_i2s_hw_params) in archive vmlinux.a Use DIV_ROUND_CLOSEST_ULL() instead. Fixes: d24028606e764 ("ASoC: loongson: Add Loongson ASoC Sound Card Support") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20230616090156.2347850-4-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-16ASoC: loongson: fix unused PM function warningArnd Bergmann
Build testing without CONFIG_PM_SLEEP causes a warning: sound/soc/loongson/loongson_i2s.c:246:12: error: unused function 'i2s_suspend' [-Werror,-Wunused-function] sound/soc/loongson/loongson_i2s.c:255:12: error: unused function 'i2s_resume' [-Werror,-Wunused-function] Use the modern SYSTEM_SLEEP_PM_OPS() instead of the old one to avoid this. Fixes: d24028606e764 ("ASoC: loongson: Add Loongson ASoC Sound Card Support") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20230616090156.2347850-2-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-15ASoC: Add support for Loongson I2S controllerYingkun Meng
Loongson I2S controller is found on 7axxx/2kxxx chips from loongson, it is a PCI device with two private DMA controllers, one for playback, the other for capture. The driver supports the use of DTS or ACPI to describe device resources. Signed-off-by: Yingkun Meng <mengyingkun@loongson.cn> Link: https://lore.kernel.org/r/20230615122718.3412942-1-mengyingkun@loongson.cn Signed-off-by: Mark Brown <broonie@kernel.org>