Commit graph

26 commits

Author SHA1 Message Date
Arnd Bergmann dcacbc0f9b
ASoC: samsung: s3c2412-i2s: avoid hardcoded S3C2410_PA_IIS
The constant requires indirectly including a machine header file,
but it's not actually used any more since commit 87b132bc03 ("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-08-19 20:15:45 +01:00
Kuninori Morimoto c101ce8883
ASoC: samsung: use asoc_substream_to_rtd()
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-07-23 19:07:26 +01:00
Krzysztof Kozlowski ec21bdc6dd
ASoC: samsung: s3c24xx-i2s: Fix build after removal of DAI suspend/resume
Commit 450312b640 ("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: 450312b640 ("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-04-14 12:16:22 +01:00
Kuninori Morimoto 7de6b6bc1a
ASoC: samsung: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
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>
2020-03-27 14:44:45 +00:00
Kefeng Wang 2304d447f9 ASoC: samsung: Use pr_warn instead of pr_warning
As said in commit f2c2cbcc35 ("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-10-18 15:02:39 +02:00
Sylwester Nawrocki 08ac76d01b
ASoC: samsung: s3c-i2s-v2: Convert to SPDX License Identifier
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>
2019-04-19 16:53:40 +01:00
Krzysztof Kozlowski 6f187f7ef1 ASoC: samsung: Add proper error paths to s3c24xx I2S driver
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-28 10:58:31 +01:00
Krzysztof Kozlowski 81ea6cc73c ASoC: samsung: Add missing prepare for iis clock of s3c24xx
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-28 10:58:27 +01:00
Krzysztof Kozlowski 776bac64bf ASoC: samsung: Fix possible double iounmap on s3c24xx driver probe failure
Commit 87b132bc03 ("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: 87b132bc03 ("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-28 10:58:23 +01:00
Krzysztof Kozlowski 2d397c518e ASoC: samsung: Remove non-existing CONFIG_CPU_S3C2413
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-07-17 15:15:34 +01:00
Calin Cruceru 114ab993e1 ASoC: samsung: Remove extra blank lines
This was reported by checkpatch.pl

Signed-off-by: Calin Cruceru <calin@rosedu.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-07 15:17:49 +01:00
Sylwester Nawrocki 9b08f30c4f ASoC: samsung: Remove unused now unused struct s3c_dma_params
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-08 11:55:20 +01:00
Sylwester Nawrocki ea37bd4df5 ASoC: samsung: Drop usage of struct s3c_dma_params from s3c2412-i2s.c
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-08-08 11:55:20 +01:00
Colin Ian King 48b418d7fd ASoC: samsung: fix spelling mistake: "unknwon" -> "unknown"
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-06-26 12:29:26 +01:00
Arnd Bergmann ba4bc32eaa ASoC: s3c24xx: use const snd_soc_component_driver pointer
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: eca3b01d08 ("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>
2016-01-27 14:59:46 +00:00
Arnd Bergmann dd2380e31c ASoC: samsung: remove unused DMA data
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-07-14 19:53:43 +01:00
Vasily Khoruzhick 87b132bc03 ASoC: samsung: s3c24{xx,12}-i2s: port to use generic dmaengine API
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-06-24 11:57:43 +01:00
Tushar Behera 88ce1465ec ASoC: samsung: Use params_width()
commit 8c5178fca4 ("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-26 17:04:20 +01:00
Tushar Behera 7253e354e7 ASoC: samsung: Use devm_snd_soc_register_component
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-05-22 00:20:11 +01:00
Sachin Kamat 9eeb95727c ASoC: Samsung: s3c-i2s-v2: Fix build error
Fixes the following error introduced by commit eca3b01d08
("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>
2014-01-22 17:13:45 +00:00
Tomasz Figa 7472a2f21b ASoC: samsung: Use CONFIG_ARCH_S3C64XX to check for S3C64XX support
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-10-06 09:01:56 +09:00
Sachin Kamat b3ff04668c ASoC: Samsung: Remove redundant comment
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-07-04 13:51:14 +01:00
Kuninori Morimoto eca3b01d08 ASoC: switch over to use snd_soc_register_component() on s3c i2s
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-26 21:57:31 +00:00
Axel Lin f3a54a283b ASoC: samsung: s3c-i2s-v2.c needs module.h
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-10-03 21:34:12 +01:00
Seungwhan Youn 0378b6acc8 ASoC: SAMSUNG: Clean-up header includes
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>
2011-01-11 11:28:33 +00:00
Jassi Brar 5033f43c66 ASoC: Samsung: Rename from s3c24xx to samsung
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>
2010-11-23 14:13:04 +00:00
Renamed from sound/soc/s3c24xx/s3c-i2s-v2.c (Browse further)