summaryrefslogtreecommitdiff
path: root/sound/soc/samsung/s3c-i2s-v2.c
AgeCommit message (Collapse)Author
2023-01-16ASoC: samsung: remove unused driversArnd Bergmann
The s3c24xx SoC platform was completely removed, as were most of the s3c64xx based board files, leaving only the DT based machines as well as the MACH_WLF_CRAGG_6410 machine. All other board specific ASoC driver can can now be recycled. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-06-27ASoC: samsung: s3c-i2s-v2: Allow build for unsupported hardwareKrzysztof Kozlowski
There is no particular need to restrict building of S3C I2S driver to supported platforms within the C unit, because Kconfig does it. Removing such restricting #ifdef from s3c-i2s-v2 allows compile testing it on other platforms. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20220627143412.477226-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-06-06ASoC: samsung: Rename set_fmt_new back to set_fmtCharles Keepax
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> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20220519154318.2153729-47-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-06-06ASoC: samsung: Update to use set_fmt_new callbackCharles Keepax
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> Link: https://lore.kernel.org/r/20220519154318.2153729-20-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-27ASoC: samsung: add missing "fallthrough;"Arnd Bergmann
With gcc, we get a warning in this file: In file included from include/linux/io.h:13, from sound/soc/samsung/s3c-i2s-v2.c:16: sound/soc/samsung/s3c-i2s-v2.c: In function 's3c2412_i2s_trigger': arch/arm/include/asm/io.h:92:22: error: this statement may fall through [-Werror=implicit-fallthrough=] #define __raw_writel __raw_writel ^ arch/arm/include/asm/io.h:299:29: note: in expansion of macro '__raw_writel' #define writel_relaxed(v,c) __raw_writel((__force u32) cpu_to_le32(v),c) ^~~~~~~~~~~~ arch/arm/include/asm/io.h:307:36: note: in expansion of macro 'writel_relaxed' #define writel(v,c) ({ __iowmb(); writel_relaxed(v,c); }) ^~~~~~~~~~~~~~ sound/soc/samsung/s3c-i2s-v2.c:398:3: note: in expansion of macro 'writel' writel(0x0, i2s->regs + S3C2412_IISFIC); ^~~~~~ sound/soc/samsung/s3c-i2s-v2.c:400:2: note: here case SNDRV_PCM_TRIGGER_RESUME: ^~~~ From all I can tell, this was indeed meant to fall through, so add "fallthrough;" statement to avoid the warning. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Link: https://lore.kernel.org/r/20210927095449.1070639-1-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-19ASoC: samsung: s3c2412-i2s: avoid hardcoded S3C2410_PA_IISArnd Bergmann
The constant requires indirectly including a machine header file, but it's not actually used any more since commit 87b132bc0315 ("ASoC: samsung: s3c24{xx,12}-i2s: port to use generic dmaengine API"), so remove it completely. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20200806182059.2431-27-krzk@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23ASoC: samsung: use asoc_substream_to_rtd()Kuninori Morimoto
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/87lfjf0yuf.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-04-14ASoC: samsung: s3c24xx-i2s: Fix build after removal of DAI suspend/resumeKrzysztof Kozlowski
Commit 450312b640f9 ("ASoC: soc-core: remove DAI suspend/resume") removed the DAI side suspend/resume hooks and switched entirely to component suspend/resume. However the Samsung SoC s3c-i2s-v2 driver was not updated. Move the suspend/resume hooks from s3c-i2s-v2.c to s3c2412-i2s.c while changing dai to component which allows to keep the struct snd_soc_component_driver const. This fixes build errors: sound/soc/samsung/s3c-i2s-v2.c: In function ‘s3c_i2sv2_register_component’: sound/soc/samsung/s3c-i2s-v2.c:730:9: error: ‘struct snd_soc_dai_driver’ has no member named ‘suspend’ dai_drv->suspend = s3c2412_i2s_suspend; Reported-by: Arnd Bergmann <arnd@arndb.de> Fixes: 450312b640f9 ("ASoC: soc-core: remove DAI suspend/resume") Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20200413124548.28197-1-krzk@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-27ASoC: samsung: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointerKuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87ftdzir57.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-10-18ASoC: samsung: Use pr_warn instead of pr_warningKefeng Wang
As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of pr_warning"), removing pr_warning so all logging messages use a consistent <prefix>_warn style. Let's do it. Link: http://lkml.kernel.org/r/20191018031850.48498-28-wangkefeng.wang@huawei.com To: linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski <krzk@kernel.org> Cc: Sangbeom Kim <sbkim73@samsung.com> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.com> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Petr Mladek <pmladek@suse.com>
2019-04-19ASoC: samsung: s3c-i2s-v2: Convert to SPDX License IdentifierSylwester Nawrocki
Replace GPL v2.0 license statements with SPDX license identifier. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-28ASoC: samsung: Add proper error paths to s3c24xx I2S driverKrzysztof Kozlowski
s3c2412_i2s_probe() might fail so driver has to revert work done by s3c_i2sv2_probe() (clock enabling). Missing doing this would lead to clock enable in-balance. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-28ASoC: samsung: Add missing prepare for iis clock of s3c24xxKrzysztof Kozlowski
The s3c_i2sv2_probe() only enabled iis clock. Missing prepare isn't probably fatal, because for SoC clocks this is usually no-op, but for correctness this clock should be prepared. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Arvind Yadav<arvind.yadav.cs@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-28ASoC: samsung: Fix possible double iounmap on s3c24xx driver probe failureKrzysztof Kozlowski
Commit 87b132bc0315 ("ASoC: samsung: s3c24{xx,12}-i2s: port to use generic dmaengine API") moved ioremap() call from s3c-i2s-v2.c:s3c_i2sv2_probe() to s3c2412-i2s.c:s3c2412_iis_dev_probe() and converted it to devm- resource managed interface. However the error path in first of them - s3c_i2sv2_probe() - was not updated. If getting a iis clock in s3c_i2sv2_probe() failed, the address space would be unmapped there. This could lead to: 1. double iounmap() later from devm-interface of s3c2412_iis_dev_probe()), 2. accessing the memory by other functions in s3c2412-i2s.c unit. Anyway, the owner of this mapped region should be s3c2412-i2s.c because it starts the mapping. Affected are drivers for S3C24xx family although issue was not reproduced. Fixes: 87b132bc0315 ("ASoC: samsung: s3c24{xx,12}-i2s: port to use generic dmaengine API") Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Arvind Yadav<arvind.yadav.cs@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-17ASoC: samsung: Remove non-existing CONFIG_CPU_S3C2413Krzysztof Kozlowski
There is no CONFIG_CPU_S3C2413 so get rid of it. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-07ASoC: samsung: Remove extra blank linesCalin Cruceru
This was reported by checkpatch.pl Signed-off-by: Calin Cruceru <calin@rosedu.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08ASoC: samsung: Remove unused now unused struct s3c_dma_paramsSylwester Nawrocki
There is no user of this data structure now, all users have been converted to use struct snd_dmaengine_dai_dma_data instead. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08ASoC: samsung: Drop usage of struct s3c_dma_params from s3c2412-i2s.cSylwester Nawrocki
struct s3c_dma_params already includes struct snd_dmaengine_dai_dma_data, there is no need for such an indirection so switch to using struct snd_dmaengine_dai_dma_data instead of struct s3c_dma_params. This also allows us to use snd_soc_dai_init_dma_data() function instead of the platform specific samsung_asoc_init_dma_data helper. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-26ASoC: samsung: fix spelling mistake: "unknwon" -> "unknown"Colin Ian King
trivial fix to spelling mistake in pr_err message Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-01-27ASoC: s3c24xx: use const snd_soc_component_driver pointerArnd Bergmann
An older patch to convert the API in the s3c i2s driver ended up passing a const pointer into a function that takes a non-const pointer, so we now get a warning: sound/soc/samsung/s3c2412-i2s.c: In function 's3c2412_iis_dev_probe': sound/soc/samsung/s3c2412-i2s.c:172:9: error: passing argument 3 of 's3c_i2sv2_register_component' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] However, the s3c_i2sv2_register_component() function again passes the pointer into another function taking a const, so we just need to change its prototype. Fixes: eca3b01d0885 ("ASoC: switch over to use snd_soc_register_component() on s3c i2s") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-07-14ASoC: samsung: remove unused DMA dataArnd Bergmann
The s3c_dma_client structures and the 'ch' and 'ops' members in s3c_dma_params were only used by the legacy DMA driver and serve no function any more. This removes any reference to them. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-24ASoC: samsung: s3c24{xx,12}-i2s: port to use generic dmaengine APIVasily Khoruzhick
Use dmaengine instead of legacy s3c24xx DMA API for s3c24xx and s3c2412 Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: samsung: Use params_width()Tushar Behera
commit 8c5178fca4ce ("ALSA: Add params_width() helpers") introduces a helper to get the sample width. Updating Samsung related sound drivers to use this helper. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-22ASoC: samsung: Use devm_snd_soc_register_componentTushar Behera
Replaced snd_soc_register_component with its devres equivalent, devm_snd_soc_register_component. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-22ASoC: Samsung: s3c-i2s-v2: Fix build errorSachin Kamat
Fixes the following error introduced by commit eca3b01d0885 ("ASoC: switch over to use snd_soc_register_component() on s3c i2s"): sound/soc/samsung/s3c-i2s-v2.c:732:32: error: ‘drv’ undeclared (first use in this function) Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-06ASoC: samsung: Use CONFIG_ARCH_S3C64XX to check for S3C64XX supportTomasz Figa
Since CONFIG_PLAT_S3C64XX is going to be removed, this patch modifies the s3c-i2s-v2 driver to use the proper way of checking for S3C64xx support - CONFIG_ARCH_S3C64XX. Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com> Acked-by: Mark Brown <broonie@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2013-07-04ASoC: Samsung: Remove redundant commentSachin Kamat
There is a typo in the filename (i2c mentioned instead of i2s). However, this is a redundant piece of information. Delete it altogether. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-03-26ASoC: switch over to use snd_soc_register_component() on s3c i2sKuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-03ASoC: samsung: s3c-i2s-v2.c needs module.hAxel Lin
Include <linux/module.h> to fix below build error: CC sound/soc/samsung/s3c-i2s-v2.o sound/soc/samsung/s3c-i2s-v2.c:573: warning: data definition has no type or storage class sound/soc/samsung/s3c-i2s-v2.c:573: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' sound/soc/samsung/s3c-i2s-v2.c:573: warning: parameter names (without types) in function declaration sound/soc/samsung/s3c-i2s-v2.c:638: warning: data definition has no type or storage class sound/soc/samsung/s3c-i2s-v2.c:638: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' sound/soc/samsung/s3c-i2s-v2.c:638: warning: parameter names (without types) in function declaration sound/soc/samsung/s3c-i2s-v2.c:677: warning: data definition has no type or storage class sound/soc/samsung/s3c-i2s-v2.c:677: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' sound/soc/samsung/s3c-i2s-v2.c:677: warning: parameter names (without types) in function declaration sound/soc/samsung/s3c-i2s-v2.c: In function 's3c_i2sv2_register_dai': sound/soc/samsung/s3c-i2s-v2.c:736: warning: initialization discards qualifiers from pointer target type sound/soc/samsung/s3c-i2s-v2.c: At top level: sound/soc/samsung/s3c-i2s-v2.c:754: warning: data definition has no type or storage class sound/soc/samsung/s3c-i2s-v2.c:754: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' sound/soc/samsung/s3c-i2s-v2.c:754: warning: parameter names (without types) in function declaration sound/soc/samsung/s3c-i2s-v2.c:756: error: expected declaration specifiers or '...' before string constant sound/soc/samsung/s3c-i2s-v2.c:756: warning: data definition has no type or storage class sound/soc/samsung/s3c-i2s-v2.c:756: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE' sound/soc/samsung/s3c-i2s-v2.c:756: warning: function declaration isn't a prototype make[3]: *** [sound/soc/samsung/s3c-i2s-v2.o] Error 1 make[2]: *** [sound/soc/samsung] Error 2 make[1]: *** [sound/soc] Error 2 make: *** [sound] Error 2 Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-11ASoC: SAMSUNG: Clean-up header includesSeungwhan Youn
This patch remove including unnecessary/duplicated headers which relative with Samsung SoCs. Signed-off-by: Seungwhan Youn <sw.youn@samsung.com> Acked-by: Jassi Brar <jassi.brar@samsung.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-23ASoC: Samsung: Rename from s3c24xx to samsungJassi Brar
Finally, move the 's3c24xx' directory to 'samsung' Signed-off-by: Jassi Brar <jassi.brar@samsung.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>