Commit graph

84 commits

Author SHA1 Message Date
Padmavathi Venna 770100108b ASoC: Samsung: Set RFS and BFS in slave mode
As per the User Manual, the RFS and BFS should be set in slave mode
for correct operation.

Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Reviewed-by: Simon Glass <sjg@google.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-11 12:06:39 +01:00
Mark Brown 0429ffeff4 ASoC: samsung: Remove obsolete GPIO based DT pinmuxing
Since the Samsung platforms have moved to pinctrl for pin muxing and that
is handled in the core the old GPIO based muxing code can just be removed.
Something similar had been submitted by Thomas Abraham back in March but
a resubmission following review never happened.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-02 13:14:05 +01:00
Mark Brown df00b71fbd Merge remote-tracking branch 'asoc/topic/samsung' into asoc-next 2013-04-12 13:57:13 +01:00
Arnd Bergmann 2af1955848 ASoC: samsung: fix module_device_table
The second argument to the module_device_table macro must be the
name of the device id array. In the samsung i2s driver, there
was a small typo, resulting in a build error when building it
as a loadable module.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-11 17:51:30 +01:00
Mark Brown 89cab4624a ASoC: core: Merge Samsung fixes to avoid trivial context conflict
Merge branch 'fix/samsung' of
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into
asoc-component to resolve trivial conflict

Conflicts:
	sound/soc/samsung/i2s.c
2013-04-03 18:22:51 +01:00
Prathyush K c6f9b1eb0e ASoC: Samsung: set drvdata before adding secondary device
Currently, a new platform device is created for secondary device
by calling platform_device_register_resndata and then the drvdata
is set for this device.

The following patch has been added to driver core:
"driver core: fix possible missing of device probe".

This results in the added device getting probed immediately but
the drvdata for the secondary device is not yet set.
This patch removes the platform_device_register_resndata call and
instead calls platform_device_alloc, platform_set_drvdata and
platform_device_add which fixes the above issue.

Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-03 17:56:44 +01:00
Prathyush K a9b977ecd3 ASoC: Samsung: return error if drvdata is not set
This patch fixes a possible crash in case drvdata for the secondary
device is not set.

Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-03 17:56:43 +01:00
Kuninori Morimoto 4b828535f7 ASoC: switch over to use snd_soc_register_component() on samsung 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:40 +00:00
R. Chandrasekar 5b1d3c3472 ASoC: Samsung: I2S: Add support for runtime S2R
This patch adds runtime suspend to resume support for I2S.
I2S clk is disabled at suspend and enabled at resume.

Signed-off-by: R. Chandrasekar <rcsekar@samsung.com>
Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-31 15:35:09 +08:00
Padmavathi Venna 40476f6189 ASoC: samsung: Add DT support for i2s
Add support for device based discovery.

Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-29 12:47:46 +08:00
Padmavathi Venna 2d77828d99 ASoC: Samsung: Add I2S S/W RST in startup function
I2S module need to be reset after S2R. Keeping the S/W rst
control part in resume didn't help in playing audio after resume.
So this patch adds S/W RST control part in startup function which
gets triggered for every new audio stream playback.

Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: R. Chandrasekar <rcsekar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-26 15:24:51 +08:00
Padmavathi Venna 7c62eebbf7 ASoC: samsung: Rename samsung i2s secondary device name
All Samsung SoCs has max 3 i2s controllers. So the i2s secondary fifo
interface device id was named as samsung-i2s.4. Renaming this to
"samsung-i2s-sec" to support device tree in i2s driver.

Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-24 14:40:13 +08:00
Bill Pemberton fdca21ad46 ASoC: Samsung: remove __dev* attributes
CONFIG_HOTPLUG is going away as an option.  As result the __dev*
markings will be going away.

Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-10 00:30:19 +09: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
Padmavathi Venna 1974a042dd ASoC: Samsung: Get I2S src_clk from clock alias id.
As the I2S src clks are registered with clkdev using generic
connection id, driver can get the clk name using generic id.
So the variable representing the array of rclk src clks is
deleted.

Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-28 19:18:00 +00:00
Thomas Abraham 98614cf689 ASoC: SAMSUNG: i2s: use clk_prepare_enable and clk_disable_unprepare
Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare
calls as required by common clock framework.

Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Acked-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-15 11:29:37 +09:00
Arnd Bergmann 436d42c61c ARM: samsung: move platform_data definitions
Platform data for device drivers should be defined in
include/linux/platform_data/*.h, not in the architecture
and platform specific directories.

This moves such data out of the samsung include directories

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: "Wolfram Sang (embedded platforms)" <w.sang@pengutronix.de>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Bryan Wu <bryan.wu@canonical.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Chris Ball <cjb@laptop.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: Liam Girdwood <lrg@ti.com>
Cc: linux-samsung-soc@vger.kernel.org
2012-09-19 17:42:18 +02:00
Sangsu Park 588fb705d5 ASoC: Samsung: Added to support mono recording
The dma size will be changed by requested number of
channel(mono/stereo) from platform. For mono recording,
channels_min value should be 1.

Signed-off-by: Sangsu Park <sangsu4u.park@samsung.com>
Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-16 18:50:41 +00:00
Jaswinder Singh df8ad33558 ASoC: Samsung: Update email id of the author
I moved on from a great employer and the email-id no longer exists.
Update email-id to a personal one, assuming I don't move on from
myself anytime soon. And when I do, people don't get the eulogies
bounced.

Signed-off-by: Jaswinder Singh <jassisinghbrar@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-29 23:37:57 +00:00
Jassi Brar c90887fe98 ASoC: Samsung: Merge two identical if-else clauses
Saves two lines and a hell of a lot of embarrassment looking at the code.

Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-29 23:37:28 +00:00
Mark Brown c5cf4dbc7f ASoC: Add trivial pm_runtime usage to Samsung DAI drivers
Currently this won't actually do anything but using this will help the
core SoC code track when the system is idle.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-23 12:08:32 +00:00
Mark Brown b960ce74a7 ASoC: Convert Samsung I2S driver to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Sangbeom Kim <sbkim73@samsung.com>
2011-12-07 23:56:50 +08:00
Mark Brown 9b8f5695a1 ASoC: Fix __iomem annotation for IDMA registers
We always store the register address as __iomem but pass it around as a
plain void * which upsets sparse.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-29 17:28:16 +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
Lars-Peter Clausen 85e7652d89 ASoC: Constify snd_soc_dai_ops structs
Commit 1ee46ebd("ASoC: Make the DAI ops constant in the DAI structure")
introduced the possibility to have constant DAI ops structures, yet this is
barley used in both existing drivers and also new drivers being submitted,
although none of them modifies its DAI ops structure. The later is not
surprising since existing drivers are often used as templates for new drivers.
So this patch just constifies all existing snd_soc_dai_ops structs to eliminate
the issue altogether.

The patch was generated with the following coccinelle semantic patch:
// <smpl>
@@
identifier ops;
@@
-struct snd_soc_dai_ops ops =
+const struct snd_soc_dai_ops ops =
{ ... };
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 10:40:46 +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 c4c5839f98 ASoC: samsung: Add __devexit_p at necessary places
According to the comments in include/linux/init.h:

"Pointers to __devexit functions must use __devexit_p(function_name), the
wrapper will insert either the function_name or NULL, depending on the confi
options."

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Jaswinder Singh <jassi.brar@samsung.com>
Cc: Ben Dooks <ben@simtec.co.uk>
Cc: Seungwhan Youn <sw.youn@samsung.com>
Cc: Jassi Brar <jassisinghbrar@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-02 19:58:44 +01:00
Sangbeom Kim 61100f405d ASoC: SAMSUNG: Modify I2S driver to support idma
Previously, I2S driver only can support system dma.
In this patch, i2s driver can support internal dma too.
IDMA h/w configuration is initialized on idma.c

Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-20 20:58:07 +01:00
Sangbeom Kim 172a453dcf ASoC: SAMSUNG: Move I2S common register definition
I2S registers can be used for control idma.
Previously, register is defined in i2s.c.
For sharing the registers, It is moved to i2s-regs.h

Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Acked-by: Jassi Brar <jaswinder.singh@linaro.org>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-26 12:05:17 +01:00
Sangbeom Kim 33195500ed ASoC: SAMSUNG: Fix the incorrect referencing of I2SCON register
If DMA active status should be checked, I2SCON register should be referenced.
In this patch, Fix the incorrect referencing of I2SCON register.

Reported-by : Lakkyung Jung <lakkyung.jung@samsung.com>
Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-06-10 10:54:46 +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 775bc97131 ASoC: Samsung: I2S: Flush FIFO after stop
Flush the FIFO while stopping the channel rather than starting.
This saves time during stream start and keeps the FIFOs clean
when the channel is idling.

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-12-20 13:45:48 +00:00
Jassi Brar 6ce534aac2 ASoC: Samsung: Set default rclk source rate
Since the rclk_srcrate is cleared upon startup, it should be
initialized upon second and later 'open' calls to the device
with same root-clock source. The bug is otherwise visible in
Codec-Slave mode.

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-12-20 13:45:27 +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/i2s.c (Browse further)