Commit Graph

27 Commits

Author SHA1 Message Date
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
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
Kuninori Morimoto bb5e4a0324
ASoC: samsung: s3c24xx_uda134x: use modern dai_link style
ASoC is now supporting modern style dai_link
(= snd_soc_dai_link_component) for CPU/Codec/Platform.
This patch switches to use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-06-06 21:30:21 +01:00
Sylwester Nawrocki 4d19f2cf5f
ASoC: samsung: s3c24xx_uda134x: 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:54:59 +01:00
Donglin Peng 1107a293b7 ASoC: s3c24xx_uda134x: Remove unnecessary function call
First of all,the address of pdev->dev is assigned to card->dev,then
the function platform_set_drvdata copies the value the variable card
to pdev->dev.driver_data, but when calling snd_soc_register_card,the
function dev_set_drvdata(card->dev, card) will also do the same copy
operation,so i think that the former copy operation can be removed.

Signed-off-by: Peng Donglin <dolinux.peng@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-21 17:10:53 +01:00
Bhumika Goyal 2af236391f ASoC: samsung: make snd_soc_ops const
Make these const as they are only stored in the ops field of a
snd_soc_dai_link structure, which is const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-17 18:09:39 +01:00
Takashi Iwai 0994c03044 ASoC: samsung: Constify hw_constraints
snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the
const pointers.  Constify the corresponding static objects for better
hardening.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-13 21:33:26 +01:00
Sylwester Nawrocki 892ccf0f21 ASoC: s3c24xx_uda134x: Move global variables to driver's data structure
Gather all driver's private variables in common data structure
and allocate the data structure dynamically.

Also unused ENFORCE_RATES symbol and local variable (leftovers
from an erroneous rebase) are removed.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-10-25 14:06:19 +01:00
Mark Brown 096388b76a Merge remote-tracking branches 'asoc/topic/rt5659', 'asoc/topic/rt5660', 'asoc/topic/rt5677' and 'asoc/topic/samsung' into asoc-next 2016-09-29 12:44:37 -07:00
Sylwester Nawrocki 45ef4969d6 ASoC: samsung: s3c24xx_uda134x: debug/error trace cleanup
Switch from pr_* to dev_* macros and drop some debug traces.

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 28405212b5 ASoC: samsung: Convert s3c24xx_uda134x to use devm_snd_soc_register_card()
Suppreses a following kernel warning: "soc-audio soc-audio:
ASoC: machine S3C24XX_UDA134X should use snd_soc_register_card()".

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 2da1e487ca ASoC: s3c24xx_uda134x: Drop initialization of codec's platform data
It's already taken care by the codec and its platform_data defined
in the arch/arm/mach-s3c24xx/mach-mini2440.c board file.

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 84c5c20395 ASoC: s3c24xx_uda134x: Remove unused power() callback
The power() callback has always been empty so just remove it.

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 1bc610e7a1 ASoC: samsung: Fix clock handling in S3C24XX_UDA134X card
There is no "pclk" alias in the s3c2440 clk driver for "soc-audio"
device so related clk_get() fails, which prevents any operation
of the S3C24XX_UDA134X sound card.
Instead we get the clock on behalf of the I2S device, i.e. we use
the I2S block gate clock which has PCLK is its parent clock.

Without this patch there is an error like:

s3c24xx_uda134x_startup cannot get pclk
ASoC: UDA134X startup failed: -2

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-04 11:21:14 +01:00
Lars-Peter Clausen 517b9a2a90 ASoC: s3c24xx_uda134x: Use static DAI format setup
Set the dai_fmt field in the dai_link struct instead of manually calling
snd_soc_dai_fmt(). This makes the code cleaner and shorter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-06 17:34:31 +00:00
Wolfram Sang ac204d2290 ASoC: samsung: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20 16:22:13 +02:00
Arnd Bergmann 5d229ce569 ASoC: samsung: move plat/ headers to local directory
The plat/regs-iis.h and plat/regs-ac97.h files in the samsung platform
are only needed by the ASoC drivers, so they can be moved into the same
directory, as one more step towards a multiplatform build.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-11 18:17:38 +01:00
Padmavathi Venna a08485d8fd ASoC: Samsung: Do not register samsung audio dma device as pdev
Previously, the ASoC 'platform' (PCM/DMA) object was instantiated via a
platform_device. This didn't represent the hardware well, since there
was no separate hardware associated with this platform_device; it was a
virtual device with sole purpose to call snd_soc_register_platform().

This change removes the platform_device completely. Each Samsung DAI now
registers the ASoC 'platform' itself. Machine drivers are adjusted for
the new 'platform' name.

Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-07 19:36:07 +09:00
Axel Lin 095d79dc49 ASoC: samsung: Add .owner to struct snd_soc_card
Missed .owner of struct snd_soc_card will prevent the module from being
removed from underneath its users.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-22 11:04:18 +00:00
Mark Brown e00c3f555f ASoC: Convert Samsung directory to module_platform_driver
Saves some boilerplate code.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Sangbeom Kim <sbkim73@samsung.com>
2011-11-25 13:03:03 +00:00
Paul Gortmaker da155d5b40 sound: Add module.h to the previously silent sound users
Lots of sound drivers were getting module.h via the implicit presence
of it in <linux/device.h> but we are going to clean that up.  So
fix up those users now.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-31 19:31:21 -04:00
Axel Lin 7803e329bb ASoC: samsung: Fix checking return value of clk_get
clk_get() returns a pointer to the struct clk or an ERR_PTR().
This patch also use PTR_ERR() for return value.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-16 00:05:57 +01:00
Marek Belisko a110f4ef81 ASoC: mini2440: Fix uda134x codec problem.
ASoC audio for mini2440 platform in current kenrel doesn't work.
First problem is samsung_asoc_dma device is missing in initialization.
Next problem is with codec. Codec is initialized but never probed
because no platform_device exist for codec driver. It leads to errors
during codec binding to asoc dai. Next problem was platform data which
was passed from board to asoc main driver but not passed to codec when
called codec_soc_probe().

Following patch should fix issues. But not sure if in correct way.
Please review.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-03-11 12:17:11 +00:00
Mark Brown 16f9e062a7 Merge branch 'for-2.6.38' into for-2.6.39 2011-01-25 15:19:29 +00:00
Lars-Peter Clausen 518aa59f6e ASoC: Samsung: Fix outdated cpu_dai_name for s3c24xx i2s
During the multi-component patch the s3c24xx i2s driver was renamed from
"s3c24xx-i2s" to "s3c24xx-iis", while the sound board drivers were not
updated to reflect this change as well.

As a result there is no match between the dai_link and the i2s driver and no
sound card is instantiated.

This patch fixes the problem by updating the sound board drivers to use
"s3c24xx-iis" for the cpu_dai_name.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
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>
Cc: stable@kernel.org
2011-01-25 15:12:44 +00: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