summaryrefslogtreecommitdiffstats
path: root/sound/soc/atmel/atmel_ssc_dai.c
Commit message (Collapse)AuthorAgeFilesLines
* sound: Remove unnecessary semicolonsJoe Perches2013-10-141-1/+1
| | | | | | | These aren't necessary after switch and if blocks. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ASoC: atmel: disable error interruptBo Shen2013-09-041-1/+1
| | | | | | | | | | | | As once the error interrupt is triggered, it can not be cleared. So, disable it. No side effect found while testing on sama5d3xek and at91sam9x5ek boards. Signed-off-by: Bo Shen <voice.shen@atmel.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: atmel-pcm-dma: move prepare for dma to dai prepareBo Shen2013-07-151-0/+1
| | | | | | | | | | as prepare callback for dma is acctually access ssc register which better done in dai driver, so move it to dai prepare callback function Signed-off-by: Bo Shen <voice.shen@atmel.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: atmel_ssc_dai: add error mask defineBo Shen2013-07-151-0/+2
| | | | | | | | add error mask define, which will be used when execute DMA transfer Signed-off-by: Bo Shen <voice.shen@atmel.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: atmel_ssc_dai: move set dma data to startup callbackBo Shen2013-07-151-17/+16
| | | | | | | | | | | move set dma data to startup callback function, if the set dma data exist in hw_params callback, so the dma data only usable when call hw_params, if want use it before hw_params callback, it will cause NULL pointer access oops Signed-off-by: Bo Shen <voice.shen@atmel.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* Merge remote-tracking branch 'asoc/topic/component' into asoc-nextMark Brown2013-04-121-3/+8
|\
| * ASoC: switch over to use snd_soc_register_component() on atmel sscKuninori Morimoto2013-03-261-3/+8
| | | | | | | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: atmel: Add slave mode support to SSC in DSP Mode AZoltan Puskas2013-03-041-0/+43
|/ | | | | | | | Add previously unsupported slave mode to the SSC peripheral when using DSP/PCM Mode A format on the Atmel ARM platform. Signed-off-by: Zoltan Puskas <zpuskas@dension.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: atmel_ssc_dai: correct sequence when unloadBo Shen2013-02-041-1/+1
| | | | | | | correct the sequence when unload this module Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: atmel_ssc_dai: remove error set private dataBo Shen2013-02-041-10/+0
| | | | | | | | ssc private data has been set in ssc driver, this cause the error private data set to ssc, remove it Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: atmel-soc: make it buildable on other architecturesJoachim Eastwood2012-12-241-2/+0
| | | | | | | | | | | Not very useful on non AT91/AVR32 platforms but it provides more build coverage and prepares for ARM multiplatform. Also fixes a couple of format type warnings. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: atmel-pcm: dma support based on pcm dmaengineBo Shen2012-12-021-2/+15
| | | | | | | | | | Specify overrun bit in interrupt mask Add dmaengine specific routines Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> [voice.shen@atmel.com: adapt to soc dmaengine framework] Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: atmel-pcm: split into two fileBo Shen2012-12-021-2/+2
| | | | | | | | | | | This patch is split original atmel-pcm.c into new atmel-pcm.c and atmel-pcm-pdc.c two files. The new atmel-pcm.c is the share routine while will be used for pdc or dma transfer. Using SND_ATMEL_SOC_PDC to select using PDC for audio transfer Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: atmel-ssc-dai: register dai and pcm directlyBo Shen2012-11-161-118/+39
| | | | | | | | | | | change the method for register dai and pcm - let the atmel-ssc-dai no longer as a standalone platform device - remap ssc and then register dai directly - register pcm from dai directly - modify the code which related with this change Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Convert atmel directory to module_platform_driverAxel Lin2011-11-251-11/+1
| | | | | | | | Factor out some boilerplate code. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Constify snd_soc_dai_ops structsLars-Peter Clausen2011-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 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>
* sound/atmel_ssc_dai: add a missing space to an error messageUwe Kleine-König2011-06-101-1/+1
| | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge branch 'for-3.0' into for-3.1Mark Brown2011-06-061-2/+3
|\
| * ASoC: atmel_ssc: Don't try to free ssc if request failedJoachim Eastwood2011-06-031-2/+3
| | | | | | | | | | | | | | | | | | We should only call ssc_free() when ssc_request() succeeds or bad things will happen. Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: atmel_ssc_dai: fix ssc error pathNicolas Ferre2011-05-261-3/+1
|/ | | | | | | | We do not have to free a resource that is not allocated yet. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Fix common misspellingsLucas De Marchi2011-03-311-1/+1
| | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* ASoC: Add simplfied device registration for Atmel SSC devicesMark Brown2010-08-181-3/+54
| | | | | | | | | | | Since the SSC is already being registered as a device under arch and the DMA and SSC hardware are pretty much the same provide a simplified device registration function for the Atmel SSC which will add the ASoC-specific devices within the ASoC code, parenting the SSC device off the actual SSC device. Also use it in the sam9g20-ek driver. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
* ASoC: multi-component - ASoC Multi-Component SupportLiam Girdwood2010-08-121-25/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch extends the ASoC API to allow sound cards to have more than one CODEC and more than one platform DMA controller. This is achieved by dividing some current ASoC structures that contain both driver data and device data into structures that only either contain device data or driver data. i.e. struct snd_soc_codec ---> struct snd_soc_codec (device data) +-> struct snd_soc_codec_driver (driver data) struct snd_soc_platform ---> struct snd_soc_platform (device data) +-> struct snd_soc_platform_driver (driver data) struct snd_soc_dai ---> struct snd_soc_dai (device data) +-> struct snd_soc_dai_driver (driver data) struct snd_soc_device ---> deleted This now allows ASoC to be more tightly aligned with the Linux driver model and also means that every ASoC codec, platform and (platform) DAI is a kernel device. ASoC component private data is now stored as device private data. The ASoC sound card struct snd_soc_card has also been updated to store lists of it's components rather than a pointer to a codec and platform. The PCM runtime struct soc_pcm_runtime now has pointers to all its components. This patch adds DAPM support for ASoC multi-component and removes struct snd_soc_socdev from DAPM core. All DAPM calls are now made on a card, codec or runtime PCM level basis rather than using snd_soc_socdev. Other notable multi-component changes:- * Stream operations now de-reference less structures. * close_delayed work() now runs on a DAI basis rather than looping all DAIs in a card. * PM suspend()/resume() operations can now handle N CODECs and Platforms per sound card. * Added soc_bind_dai_link() to bind the component devices to the sound card. * Added soc_dai_link_probe() and soc_dai_link_remove() to probe and remove DAI link components. * sysfs entries can now be registered per component per card. * snd_soc_new_pcms() functionailty rolled into dai_link_probe(). * snd_soc_register_codec() now does all the codec list and mutex init. This patch changes the probe() and remove() of the CODEC drivers as follows:- o Make CODEC driver a platform driver o Moved all struct snd_soc_codec list, mutex, etc initialiasation to core. o Removed all static codec pointers (drivers now support > 1 codec dev) o snd_soc_register_pcms() now done by core. o snd_soc_register_dai() folded into snd_soc_register_codec(). CS4270 portions: Acked-by: Timur Tabi <timur@freescale.com> Some TLV320aic23 and Cirrus platform fixes. Signed-off-by: Ryan Mallon <ryan@bluewatersys.com> TI CODEC and OMAP fixes Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Samsung platform and misc fixes :- Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Jassi Brar <jassi.brar@samsung.com> Signed-off-by: Seungwhan Youn <sw.youn@samsung.com> MPC8610 and PPC fixes. Signed-off-by: Timur Tabi <timur@freescale.com> i.MX fixes and some core fixes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> J4740 platform fixes:- Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> CC: Tony Lindgren <tony@atomide.com> CC: Nicolas Ferre <nicolas.ferre@atmel.com> CC: Kevin Hilman <khilman@deeprootsystems.com> CC: Sascha Hauer <s.hauer@pengutronix.de> CC: Atsushi Nemoto <anemo@mba.ocn.ne.jp> CC: Kuninori Morimoto <morimoto.kuninori@renesas.com> CC: Daniel Gloeckner <dg@emlix.com> CC: Manuel Lauss <mano@roarinelk.homelinux.net> CC: Mike Frysinger <vapier.adi@gmail.com> CC: Arnaud Patard <apatard@mandriva.com> CC: Wan ZongShun <mcuos.com@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
* ASoC: atmel: trivial code cleanupWan ZongShun2010-06-071-1/+0
| | | | | | | | | Remove break after return, it is not needed. Signed-off-by: Wan ZongShun <mcuos.com@gmail.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ALSA: ASoC: move dma_data from snd_soc_dai to snd_soc_pcm_streamDaniel Mack2010-04-051-3/+3
| | | | | | | | | | | | | | | | | | | This fixes a memory corruption when ASoC devices are used in full-duplex mode. Specifically for pxa-ssp code, where this pointer is dynamically allocated for each direction and destroyed upon each stream start. All other platforms are fixed blindly, I couldn't even compile-test them. Sorry for any breakage I may have caused. [Note that this is a backported version for 2.6.34. Upstream commit is fd23b7dee] Signed-off-by: Daniel Mack <daniel@caiaq.de> Reported-by: Sven Neumann <s.neumann@raumfeld.com> Reported-by: Michael Hirsch <m.hirsch@raumfeld.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: make ops a pointer in 'struct snd_soc_dai'Eric Miao2009-03-041-21/+12
| | | | | | | | | | | | | | | | Considering the fact that most cpu_dai or codec_dai are using a same 'snd_soc_dai_ops' for several similar interfaces, 'ops' would be better made a pointer instead, to make sharing easier and code a bit cleaner. The patch below is rather preliminary since the asoc tree is being actively developed, and this touches almost every piece of code, (and possibly many others in development need to be changed as well). Building of all codecs are OK, yet to every SoC, I didn't test that. Signed-off-by: Eric Miao <eric.miao@marvell.com> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ALSA: ASoC: email - update email addresses.Liam Girdwood2009-02-031-1/+1
| | | | | | | | This just updates my email address on some drivers I'd forgotten in a previous patch. Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ASoC - Fix wrong section typesTakashi Iwai2008-12-101-1/+1
| | | | | | The module init entries should be __init instead of __devinit. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ASoC: Fix typos in Atmel module registrationMark Brown2008-12-091-2/+3
| | | | | | I wish I had boards which work with unmodified kernels :/ Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Register platform DAIsMark Brown2008-12-091-0/+11
| | | | | | | | | | | Register all platform DAIs with the core. In line with current behaviour this is done at module probe time rather than when the devices are probed (since currently that only happens as the entire ASoC card is registered except for those drivers that currently implement some kind of hotplug). Since the core currently ignores DAI registration this has no practical effect. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Remove platform device from DAI suspend and resume operationsMark Brown2008-12-031-4/+2
| | | | | | | None of the DAIs use it except s3c2412-i2s which only uses it for dev_() printouts. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Remove DAI type informationMark Brown2008-11-241-3/+0
| | | | | | | | | | | DAI type information is only ever used within ASoC in order to special case AC97 and for diagnostic purposes. Since modern CPUs and codecs support multi function DAIs which can be configured for several modes it is more trouble than it's worth to maintain anything other than a flag identifying AC97 DAIs so remove the type field and replace it with an ac97_control flag. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Merge snd_soc_ops into snd_soc_dai_opsMark Brown2008-11-211-10/+11
| | | | | | | | | | | | | Liam Girdwood's ASoC v2 work avoids having two different ops structures for DAIs by merging the members of struct snd_soc_ops into struct snd_soc_dai_ops, allowing per DAI configuration for everything. Backport this change. This paves the way for future work allowing any combination of DAIs to be connected rather than having fixed purpose CODEC and CPU DAIs and only allowing CODEC<->CPU interconnections. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Merge AT91 and AVR32 support into a single atmel architectureSedji Gaouaou2008-10-311-0/+782
The Ateml AT91 and AVR32 SoC share common IP for audio and can share the same driver code using the atmel-ssc API provided for both architectures. Do this, creating a new unified atmel ASoC architecture to replace the previous at32 and at91 ones. [This was contributed as a patch series for reviewability but has been squashed down to a single commit to help preserve both the history and bisectability. A small bugfix from Jukka is included.] Tested-by: Jukka Hynninen <ext-jukka.hynninen@vaisala.com> Signed-off-by: Sedji Gaouaou <sedji.gaouaou@atmel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
OpenPOWER on IntegriCloud