summaryrefslogtreecommitdiffstats
path: root/sound/soc/atmel
AgeCommit message (Collapse)AuthorFilesLines
2013-10-31DMA-API: sound: fix dma mask handling in a lot of driversRussell King1-7/+4
This code sequence is unsafe in modules: static u64 mask = DMA_BIT_MASK(something); ... if (!dev->dma_mask) dev->dma_mask = &mask; as if a module is reloaded, the mask will be pointing at the original module's mask address, and this can lead to oopses. Moreover, they all follow this with: if (!dev->coherent_dma_mask) dev->coherent_dma_mask = mask; where 'mask' is the same value as the statically defined mask, and this bypasses the architecture's check on whether the DMA mask is possible. Fix these issues by using the new dma_coerce_coherent_and_mask() function. Acked-by: Mark Brown <broonie@linaro.org> Acked-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-09-04ASoC: atmel: disable error interruptBo Shen1-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>
2013-08-22Merge remote-tracking branch 'asoc/topic/atmel' into asoc-nextMark Brown6-119/+522
2013-08-06ASoC: atmel: machine driver for at91sam9x5-wm8731 boardsNicolas Ferre3-0/+220
Description of the Asoc machine driver for an at91sam9x5 based board with a wm8731 audio DAC. Wm8731 is clocked by a crystal and used as a master on the SSC/I2S interface. Its connections are a headphone jack and an Line input jack. [Richard: this is based on an old patch from Nicolas that I forward ported and reworked to use only device tree] Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-19ASoC: atmel: add wm8904 based audio machine driverBo Shen3-0/+266
Add wm8904 based audio machine driver for Atmel EK board The following ek board based on it - at91sam9n12ek - sama5d3xek (d31, d33, d34, d35) Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-15ASoC: atmel: Fix unlocked snd_pcm_stop() callTakashi Iwai1-0/+2
snd_pcm_stop() must be called in the PCM substream lock context. Cc: <stable@vger.kernel.org> Acked-by: Mark Brown <broonie@linaro.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-15ASoC: atmel-pcm: use generic dmaengine frameworkBo Shen2-88/+17
Align atmel pcm to use ASoC generic dmaengine framework DMA is fully device tree based 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>
2013-07-15ASoC: atmel-pcm-dma: move prepare for dma to dai prepareBo Shen2-14/+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>
2013-07-15ASoC: atmel_ssc_dai: add error mask defineBo Shen1-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>
2013-07-15ASoC: atmel_ssc_dai: move set dma data to startup callbackBo Shen1-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>
2013-05-12ASoC: sam9g20ek: Let device core handle pinctrlMark Brown1-9/+0
Since commit ab78029 (drivers/pinctrl: grab default handles from device core) we can rely on device core for handling pinctrl so remove devm_pinctrl_get_select_default() from the driver. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Tested-by: Bo Shen <voice.shen@atmel.com> Acked-by: Bo Shen <voice.shen@atmel.com>
2013-04-18Merge tag 'asoc-v3.10-2' of ↵Takashi Iwai1-3/+3
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: More updates for v3.10 The main additional change here is Lars-Peter's DMA work plus the platform conversions which have been tested - getting this in mainline will make life easier for development after the merge window. These factor a large chunk of code out of the drivers for the platforms using dmaengine, greatly simplifying development.
2013-04-17ASoC: dmaengine-pcm: Make requesting the DMA channel at PCM open optionalLars-Peter Clausen1-3/+3
Refactor the dmaengine PCM library to allow the DMA channel to be requested before opening a PCM substream. snd_dmaengine_pcm_open() now expects a DMA channel instead of a filter function and filter parameter as its parameters. snd_dmaengine_pcm_close() is updated to not release the DMA channel. This allows a dmaengine based PCM driver to request its channels before the substream is opened. The patch also introduces two new functions, snd_dmaengine_pcm_open_request_chan() and snd_dmaengine_pcm_close_release_chan(), which have the same signature and behaviour of the old snd_dmaengine_pcm_{open,close}() and internally use the new variants of these functions. All users of snd_dmaengine_pcm_{open,close}() are updated to use snd_dmaengine_pcm_open_request_chan() and snd_dmaengine_pcm_close_release_chan(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-12Merge remote-tracking branch 'asoc/topic/dma' into asoc-nextMark Brown1-18/+7
2013-04-12Merge remote-tracking branch 'asoc/topic/component' into asoc-nextMark Brown1-3/+8
2013-04-03ASoC: dmaengine_pcm: Setup device_fc in snd_hwparams_to_dma_slave_configLars-Peter Clausen1-2/+0
Usually device_fc should be set to false for audio DMAs. Initialize it in a common place so drivers don't have to do this manually. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-26ASoC: switch over to use snd_soc_register_component() on atmel sscKuninori Morimoto1-3/+8
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-26ASoC: atmel-pcm-dma: Do not use snd_dmaengine_pcm_{set,get}_data()Lars-Peter Clausen1-8/+6
We want to get rid of snd_dmaengine_pcm_{set,get}_data(). All instances of snd_dmaengine_pcm_get_data() in the atmel pcm driver can easily be replaced with snd_soc_dai_get_dma_data(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Tested-by: Bo Shen <voice.shen@atmel.com> Acked-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-26ASoC: atmel-pcm-dma: No need to wrap snd_dmaengine_pcm_close()Lars-Peter Clausen1-8/+1
If a PCM driver using the dmaengine PCM helper functions doesn't need to do anything special in its pcm_close callback, snd_dmaengine_pcm_close can be used directly for as the pcm_close callback and there is no need to wrap it in a custom function. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Tested-by: Bo Shen <voice.shen@atmel.com> Acked-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-04ASoC: atmel: Add slave mode support to SSC in DSP Mode AZoltan Puskas1-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>
2013-02-04ASoC: sam9g20_wm8731: disable clock and correct sequence when unloadBo Shen1-3/+3
disable clock and correct sequence when unload Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-04ASoC: atmel_ssc_dai: correct sequence when unloadBo Shen1-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>
2013-02-04ASoC: atmel_ssc_dai: remove error set private dataBo Shen1-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>
2013-02-04ASoC: atmel_pcm: make it buildable as moduleBo Shen1-2/+4
When build as module, it reports following error, using this patch fix it sound/soc/atmel/atmel-pcm-pdc.c:387: error: redefinition of 'atmel_pcm_pdc_platform_register' sound/soc/atmel/atmel-pcm.h:95: note: previous definition of 'atmel_pcm_pdc_platform_register' was here sound/soc/atmel/atmel-pcm-pdc.c:393: error: redefinition of 'atmel_pcm_pdc_platform_unregister' sound/soc/atmel/atmel-pcm.h:99: note: previous definition of 'atmel_pcm_pdc_platform_unregister' was here Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24ASoC: atmel-soc: make it buildable on other architecturesJoachim Eastwood4-8/+6
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>
2012-12-10ASoC: atmel: remove __dev* attributesBill Pemberton1-3/+3
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-02ASoC: atmel-pcm: dma support based on pcm dmaengineBo Shen5-2/+276
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>
2012-12-02ASoC: atmel-pcm: split into two fileBo Shen6-382/+441
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>
2012-11-16ASoC: at91sam9g20ek-wm8731: convert to dt supportBo Shen2-4/+62
convert at91sam9g20ek with wm8731 to device tree support Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-16ASoC: atmel-ssc-dai: match new method of dai and pcm registerBo Shen1-2/+10
Remove unneeded code with the new method of dai and pcm register Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-16ASoC: atmel-ssc-dai: register dai and pcm directlyBo Shen4-136/+50
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>
2012-11-06ASoC: sam9g20-wm8731: convert to use snd_soc_register_card()Bo Shen1-29/+22
Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-01ASoC: Convert afeb9260 to table based DAPM initAxel Lin1-8/+6
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-01ASoC: Use dai_fmt in afeb9260 machine driverAxel Lin1-21/+2
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20ASoC: replace 0xffffffff with DMA_BIT_MASK macroJoachim Eastwood1-2/+2
Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-10ASoC: Fix recursive dependency due to select ATMEL_SSC in SND_ATMEL_SOC_SSCAxel Lin1-2/+1
commit 739be96 "ASoC: Fix build dependency for SND_ATMEL_SOC_SSC" introduces below build warnings: drivers/misc/Kconfig:212:error: recursive dependency detected! drivers/misc/Kconfig:212: symbol ATMEL_SSC is selected by SND_ATMEL_SOC_SSC sound/soc/atmel/Kconfig:9: symbol SND_ATMEL_SOC_SSC is selected by SND_AT91_SOC_SAM9G20_WM8731 sound/soc/atmel/Kconfig:18: symbol SND_AT91_SOC_SAM9G20_WM8731 depends on ATMEL_SSC SND_ATMEL_SOC_SSC needs ATMEL_SSC to pass compilation. This patch remove the "select ATMEL_SSC" from SND_ATMEL_SOC_SSC to avoid above warnings. And then ensures all the machine drivers that select SND_ATMEL_SOC_SSC need to depend on ATMEL_SSC. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-07ASoC: check for substream not channels_min in pcm enginesJoachim Eastwood1-3/+2
This is a follow up on 53dea36c70c1857 which fixes the other affected pcm engines. Description from 53dea36c70c1857: Don't rely on the codec's channels_min information to decide wheter or not allocate a substream's DMA buffer. Rather check if the substream itself was allocated previously. Without this patch I was seeing null-pointer dereferenc in atmel-pcm. Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-05ASoC: Fix build dependency for SND_ATMEL_SOC_SSCAxel Lin1-0/+1
Make SND_ATMEL_SOC_SSC select ATMEL_SSC to fix below build errors: LD .tmp_vmlinux1 sound/built-in.o: In function `atmel_ssc_remove': sound/soc/atmel/atmel_ssc_dai.c:713: undefined reference to `ssc_free' sound/built-in.o: In function `atmel_ssc_probe': sound/soc/atmel/atmel_ssc_dai.c:700: undefined reference to `ssc_request' sound/built-in.o: In function `atmel_ssc_set_audio': sound/soc/atmel/atmel_ssc_dai.c:845: undefined reference to `ssc_request' sound/soc/atmel/atmel_ssc_dai.c:851: undefined reference to `ssc_free' make: *** [.tmp_vmlinux1] Error 1 Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-22ASoC: atmel: Add .owner to struct snd_soc_cardAxel Lin2-0/+2
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-11-25ASoC: Convert atmel directory to module_platform_driverAxel Lin2-22/+2
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>
2011-11-23Merge branch 'for-3.2' into for-3.3Mark Brown3-497/+1
2011-11-23ASoC: Constify snd_soc_dai_ops structsLars-Peter Clausen1-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>
2011-11-23ASoC: drop support for PlayPaq with WM8510Paul Bolle3-497/+1
SoC Audio support for PlayPaq with WM8510 got added in commit 9aaca9683b ("[ALSA] Revised AT32 ASoC Patch"). That support depends on BOARD_PLAYPAQ. That Kconfig symbol didn't exist when that support got added in v2.6.27. It still doesn't. It has never been possible to even build this driver. Drop it. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-08ASoC: Remove redundant snd_soc_dapm_sync() calls from machine driversMark Brown3-5/+0
The core will sync DAPM as part of the card initialization, there is no need for machine drivers to do so during their setup. OMAP drivers are omitted as I know Peter already has patches for them. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-09ASoC: playpaq_wm8510: Return proper error if clk_get failsAxel Lin1-1/+4
Return proper error instead of 0 if clk_get fails. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-10sound/atmel_ssc_dai: add a missing space to an error messageUwe Kleine-König1-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>
2011-06-07ASoC: core - Optimise and refactor pcm_new() to pass only rtdLiam Girdwood1-2/+4
Currently pcm_new() passes in 3 arguments :- card, pcm and DAI. Refactor this to only pass in 1 argument (i.e. the rtd) since struct rtd contains card, pcm and DAI along with other members too that are useful too. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-06ASoC: Add context parameter to card DAPM callbacksMark Brown1-0/+1
The card callback will get called for each DAPM context in the card so it can be useful for it to know which device is currently undergoing a transition. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06Merge branch 'for-3.0' into for-3.1Mark Brown1-2/+3
2011-06-03ASoC: atmel_ssc: Don't try to free ssc if request failedJoachim Eastwood1-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>