summaryrefslogtreecommitdiff
path: root/sound/soc/samsung/i2s.c
AgeCommit message (Collapse)Author
2013-12-12ASoC: samsung: Provide helper for DMA initMark Brown
In preparation for using the dmaengine helpers in ASoC rather than the dmaengine wrappers for the Samsung API wrap the configuration of dma_data. The dmaengine code expects different data to that used by the legacy API. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-04Merge remote-tracking branch 'asoc/topic/samsung' into asoc-nextMark Brown
2013-10-25ASoC: samsung: fix return value check in i2s_alloc_dai()Wei Yongjun
In case of error, the function platform_device_alloc() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-24Merge remote-tracking branch 'asoc/topic/samsung' into asoc-nextMark Brown
2013-10-20ASoC: samsung: Initialise DMA data at device probe timeMark Brown
This is a minor simplification and will help with converting the platform to use the dmaengine helpers. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-16ASoC: samsung-i2s: Use devm_snd_soc_register_component()Mark Brown
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-16ASoC: samsung: Allow mono in i2s driverCharles Keepax
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-22Merge remote-tracking branch 'asoc/topic/samsung' into asoc-nextMark Brown
2013-08-20ASoC: samsung: Rename DMA platform registration functionsMark Brown
The current naming with a simple asoc_ prefix is too generic for use in multiplatform kernels. Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Sangbeom Kim <sbkim73@samsung.com>
2013-08-13ASoC: Samsung: I2S: Modify the I2S driver to support I2S on Exynos5420Padmavathi Venna
Exynos5420 added support for I2S TDM mode. For this, there are some register changes in the I2S controller. This patch adds the relevant register changes to support I2S in normal mode. This patch adds a quirk for TDM mode and if TDM mode is present all the relevent changes will be applied. Signed-off-by: Padmavathi Venna <padma.v@samsung.com> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-13ASoC: Samsung: I2S: Add quirks as driver data in I2SPadmavathi Venna
Samsung has different versions of I2S introduced in different platforms. Each version has some new support added for multichannel, secondary fifo, s/w reset control and internal mux for rclk src clk. Each newly added change has a quirk. So this patch adds all the required quirks as driver data and based on compatible string from dtsi fetches the quirks. Signed-off-by: Padmavathi Venna <padma.v@samsung.com> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-01ASoC: samsung: Make secondary I2S DAI device a child of primaryMark Brown
More for neatness than for any great utility. Really we shouldn't be creating the child device at all, refactoring will follow. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-26ASoC: Samsung: I2S: Modify driver to give more flexibilityPadmavathi Venna
This patch modifies the i2s driver to give flexibility towards register handling. This is a pre requirement for enabling i2s support on Exynos5420. This patch modifies only the required registers as a pre-requirement to support on Exynos5420. Signed-off-by: Padmavathi Venna <padma.v@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-11ASoC: Samsung: Set RFS and BFS in slave modePadmavathi Venna
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-02ASoC: samsung: Remove obsolete GPIO based DT pinmuxingMark Brown
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-04-12Merge remote-tracking branch 'asoc/topic/samsung' into asoc-nextMark Brown
2013-04-11ASoC: samsung: fix module_device_tableArnd Bergmann
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-03ASoC: core: Merge Samsung fixes to avoid trivial context conflictMark Brown
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-03ASoC: Samsung: set drvdata before adding secondary devicePrathyush K
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-03ASoC: Samsung: return error if drvdata is not setPrathyush K
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-03-26ASoC: switch over to use snd_soc_register_component() on samsung i2sKuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-31ASoC: Samsung: I2S: Add support for runtime S2RR. Chandrasekar
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-29ASoC: samsung: Add DT support for i2sPadmavathi Venna
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-26ASoC: Samsung: Add I2S S/W RST in startup functionPadmavathi Venna
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-24ASoC: samsung: Rename samsung i2s secondary device namePadmavathi Venna
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>
2012-12-09ASoC: Samsung: remove __dev* attributesBill Pemberton
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-07ASoC: Samsung: Do not register samsung audio dma device as pdevPadmavathi Venna
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-11-28ASoC: Samsung: Get I2S src_clk from clock alias id.Padmavathi Venna
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-10-15ASoC: SAMSUNG: i2s: use clk_prepare_enable and clk_disable_unprepareThomas Abraham
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-09-19ARM: samsung: move platform_data definitionsArnd Bergmann
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-03-16ASoC: Samsung: Added to support mono recordingSangsu Park
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-02-29ASoC: Samsung: Update email id of the authorJaswinder Singh
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-29ASoC: Samsung: Merge two identical if-else clausesJassi Brar
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>
2011-12-23ASoC: Add trivial pm_runtime usage to Samsung DAI driversMark Brown
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-07ASoC: Convert Samsung I2S driver to devm_kzalloc()Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Sangbeom Kim <sbkim73@samsung.com>
2011-11-29ASoC: Fix __iomem annotation for IDMA registersMark Brown
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-25ASoC: Convert Samsung directory to module_platform_driverMark Brown
Saves some boilerplate code. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Sangbeom Kim <sbkim73@samsung.com>
2011-11-23ASoC: Constify snd_soc_dai_ops structsLars-Peter Clausen
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-10-31sound: Add module.h to the previously silent sound usersPaul Gortmaker
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-02ASoC: samsung: Add __devexit_p at necessary placesAxel Lin
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-07-20ASoC: SAMSUNG: Modify I2S driver to support idmaSangbeom Kim
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-06-26ASoC: SAMSUNG: Move I2S common register definitionSangbeom Kim
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-10ASoC: SAMSUNG: Fix the incorrect referencing of I2SCON registerSangbeom Kim
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-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-12-20ASoC: Samsung: I2S: Flush FIFO after stopJassi Brar
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-20ASoC: Samsung: Set default rclk source rateJassi Brar
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-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>