summaryrefslogtreecommitdiffstats
path: root/sound/soc/pxa
AgeCommit message (Collapse)AuthorFilesLines
2014-05-19ASoC: Remove needless snd_soc_dapm_enable_pin() from machine driver initsJarkko Nikula4-18/+0
ALSA SoC core marks widgets as connected by default when they are initialized in snd_soc_dapm_new_control() so there is no need to call snd_soc_dapm_enable_pin() from machine driver init functions. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-19ASoC: Remove needless snd_soc_dapm_sync() from machine driver initsJarkko Nikula1-2/+0
ALSA SoC core takes care of calling snd_soc_dapm_sync() at the end snd_soc_instantiate_card() so there is no need to call it from machine driver init functions. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-01ASoC: pxa: TTC DKB audio needs I2CArnd Bergmann1-1/+1
The missing dependency can lead to build errors, so make it explicit in Kconfig. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-13ASoC: pxa: tosa: Convert to table based DAPM and control setupLars-Peter Clausen1-22/+13
Use table based setup to register the controls and DAPM widgets and routes. This on one hand makes the code a bit shorter and cleaner and on the other hand the board level DAPM elements get registered in the card's DAPM context rather than in the CODEC's DAPM context. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-13ASoC: pxa: magician: Convert to table based DAPM and control setupLars-Peter Clausen1-22/+12
Use table based setup to register the controls and DAPM widgets and routes. This on one hand makes the code a bit shorter and cleaner and on the other hand the board level DAPM elements get registered in the card's DAPM context rather than in the CODEC's DAPM context. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-13Merge branch 'topic/dapm' of ↵Mark Brown4-63/+80
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-pxa
2014-03-03ASoC: pxa: zylonite: Convert to table based DAPM setupLars-Peter Clausen1-12/+5
Use table based setup to register the DAPM widgets and routes. This on one hand makes the code a bit cleaner and on the other hand the board level DAPM elements get registered in the card's DAPM context rather than in the CODEC's DAPM context. Also drop the two snd_soc_dapm_enable_pin() since pins are enabled by default and there is no matching snd_soc_dapm_disable_pin() in the driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-03ASoC: pxa: mioa701_wm9713: Convert to table based DAPM setupLars-Peter Clausen1-14/+5
Use table based setup to register the DAPM widgets and routes. This on one hand makes the code a bit cleaner and on the other hand the board level DAPM elements get registered in the card's DAPM context rather than in the CODEC's DAPM context. Also remove the snd_soc_dapm_enable_pin() calls, since pins are enabled by default and there are no matching snd_soc_dapm_disable_pin() calls. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-03ASoC: pxa: e800_wm9712: Convert to table based DAPM setupLars-Peter Clausen1-14/+5
Use table based setup to register the DAPM widgets and routes. This on one hand makes the code a bit cleaner and on the other hand the board level DAPM elements get registered in the card's DAPM context rather than in the CODEC's DAPM context. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-03ASoC: pxa: e750_wm9705: Convert to table based DAPM setupLars-Peter Clausen1-5/+5
Use table based setup to register the DAPM widgets and routes. This on one hand makes the code a bit cleaner and on the other hand the board level DAPM elements get registered in the card's DAPM context rather than in the CODEC's DAPM context. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-03ASoC: pxa: e740_wm9705: Convert to table based DAPM setupLars-Peter Clausen1-5/+5
Use table based setup to register the DAPM widgets and routes. This on one hand makes the code a bit cleaner and on the other hand the board level DAPM elements get registered in the card's DAPM context rather than in the CODEC's DAPM context. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-03ASoC: pxa: Pass correct DAPM context to {corgi,poodle,spitz}_ext_controlLars-Peter Clausen3-6/+3
When calling {corgi,poodle,spitz}_ext_control() from the startup callback we pass the CODEC's DAPM context instead of the card's DAPM context. This is not a problem per se since all the DAPM functions in ext_control() fallback to widgets from other DAPM contexts, but passing the card's context is more consistent. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-23ASoC: pxa: Remove superfluous lockingLars-Peter Clausen5-20/+0
The locking here was added in commit 71a295602e ("ASoC: Lock the CODEC in PXA external jack controls") to protect the DAPM changes that are made inside of ${board}_ext_control() against concurrent updates. The ASoC core was updated in commit a73fb2df01 ("ASoC: dapm: Use DAPM mutex for DAPM ops instead of codec mutex") to use a card wide lock rather the CODEC mutex to protect DAPM operations. We now have proper locking inside ${board}_ext_control() itself, so taking the CODEC lock can be removed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20ASoC: pxa: tosa: Update locking around use of DAPM pin APICharles Keepax1-12/+16
The pin updates in this driver look like they are intended to be done atomically, update to do so. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20ASoC: pxa: spitz: Update locking around use of DAPM pin APICharles Keepax1-23/+28
The pin updates in this driver look like they are intended to be done atomically, update to do so. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20ASoC: pxa: magician: Update locking around use of DAPM pin APICharles Keepax1-9/+13
The pin updates in this driver look like they are intended to be done atomically, update to do so. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20ASoC: pxa: corgi: Update locking around use of DAPM pin APICharles Keepax1-19/+23
The pin updates in this driver look like they are intended to be done atomically, update to do so. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-30ASoC: mmp: Don't set unused struct snd_pcm_hardware fieldsLars-Peter Clausen1-6/+0
The ASoC core assumes that the PCM component of the ASoC card transparently moves data around and does not impose any restrictions on the memory layout or the transfer speed. It ignores all fields from the snd_pcm_hardware struct for the PCM driver that are related to this. Setting these fields in the PCM driver might suggest otherwise though, so rather not set them. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-17ASoC: mmp-pcm: config pcm slave via generic dmaengineQiao Zhou2-16/+4
use snd_dmaengine_pcm_prepare_slave_config to set slave config, and remove the max_burst_size = 4 hard code. select SND_SOC_GENERIC_DMAENGINE_PCM for mmp-pcm. Signed-off-by: Qiao Zhou <zhouqiao@marvell.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-14Merge branch 'for-linus-dma-masks' of git://git.linaro.org/people/rmk/linux-armLinus Torvalds1-7/+4
Pull DMA mask updates from Russell King: "This series cleans up the handling of DMA masks in a lot of drivers, fixing some bugs as we go. Some of the more serious errors include: - drivers which only set their coherent DMA mask if the attempt to set the streaming mask fails. - drivers which test for a NULL dma mask pointer, and then set the dma mask pointer to a location in their module .data section - which will cause problems if the module is reloaded. To counter these, I have introduced two helper functions: - dma_set_mask_and_coherent() takes care of setting both the streaming and coherent masks at the same time, with the correct error handling as specified by the API. - dma_coerce_mask_and_coherent() which resolves the problem of drivers forcefully setting DMA masks. This is more a marker for future work to further clean these locations up - the code which creates the devices really should be initialising these, but to fix that in one go along with this change could potentially be very disruptive. The last thing this series does is prise away some of Linux's addition to "DMA addresses are physical addresses and RAM always starts at zero". We have ARM LPAE systems where all system memory is above 4GB physical, hence having DMA masks interpreted by (eg) the block layers as describing physical addresses in the range 0..DMAMASK fails on these platforms. Santosh Shilimkar addresses this in this series; the patches were copied to the appropriate people multiple times but were ignored. Fixing this also gets rid of some ARM weirdness in the setup of the max*pfn variables, and brings ARM into line with every other Linux architecture as far as those go" * 'for-linus-dma-masks' of git://git.linaro.org/people/rmk/linux-arm: (52 commits) ARM: 7805/1: mm: change max*pfn to include the physical offset of memory ARM: 7797/1: mmc: Use dma_max_pfn(dev) helper for bounce_limit calculations ARM: 7796/1: scsi: Use dma_max_pfn(dev) helper for bounce_limit calculations ARM: 7795/1: mm: dma-mapping: Add dma_max_pfn(dev) helper function ARM: 7794/1: block: Rename parameter dma_mask to max_addr for blk_queue_bounce_limit() ARM: DMA-API: better handing of DMA masks for coherent allocations ARM: 7857/1: dma: imx-sdma: setup dma mask DMA-API: firmware/google/gsmi.c: avoid direct access to DMA masks DMA-API: dcdbas: update DMA mask handing DMA-API: dma: edma.c: no need to explicitly initialize DMA masks DMA-API: usb: musb: use platform_device_register_full() to avoid directly messing with dma masks DMA-API: crypto: remove last references to 'static struct device *dev' DMA-API: crypto: fix ixp4xx crypto platform device support DMA-API: others: use dma_set_coherent_mask() DMA-API: staging: use dma_set_coherent_mask() DMA-API: usb: use new dma_coerce_mask_and_coherent() DMA-API: usb: use dma_set_coherent_mask() DMA-API: parport: parport_pc.c: use dma_coerce_mask_and_coherent() DMA-API: net: octeon: use dma_coerce_mask_and_coherent() DMA-API: net: nxp/lpc_eth: use dma_coerce_mask_and_coherent() ...
2013-11-13sound/soc/pxa/mmp-pcm.c: use gen_pool_dma_alloc() to allocate dma bufferNicolin Chen1-2/+1
Since gen_pool_dma_alloc() is introduced, we implement it to simplify code. Signed-off-by: Nicolin Chen <b42378@freescale.com> Cc: Eric Miao <eric.y.miao@gmail.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-08Merge remote-tracking branch 'asoc/topic/warn' into asoc-nextMark Brown1-1/+2
2013-11-08Merge remote-tracking branch 'asoc/topic/pxa' into asoc-nextMark Brown12-31/+36
2013-11-07ASoC: pxa: Use WARN_ON() instead of BUG_ON()Takashi Iwai1-1/+2
Use WARN_ON() and handle the error cases accordingly. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@linaro.org>
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-10-18ALSA: ASoC: pxa: add asoc pm callbacks to pxa audio driversDmitry Eremin-Solenikov11-0/+11
After convertion to snd_soc_register_card, platform driver should reference snd_soc_pm_ops callbacks to properly suspend/resume sound hardware. This was missed during conversion of PXA sound devices. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-18ALSA: ASoC: pxa: fix pxa2xx-ac97 DAI initialization orderDmitry Eremin-Solenikov1-31/+25
After recent changes to codec/DAI initialization order changes, codec driver (wm9712 in my case) tries to access codec prior to pxa2xx_ac97_hw_probe() being called (because DAIs are probed after all codecs are probed). Move hw-related probe/remove/suspend/resume functions to pxa2xx-ac97 driver level, instead of DAI level. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-19ASoC: mmp-sspa: Use devm_snd_soc_register_componentSachin Kamat1-3/+2
devm_snd_soc_register_component makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-22ASoC: pxa: Remove duplicate inclusion of dmaengine.hSachin Kamat1-1/+0
dmaengine.h header file was included twice. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-15ASoC: pxa: add DT bindings for pxa2xx-pcmDaniel Mack1-2/+11
The bindings do not carry any resources, as the module only registers the ASoC platform driver. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-15ASoC: pxa: pxa-ssp: set dma filter data from startup hookDaniel Mack1-1/+4
With the new dmaengine implementation, the filter_data parameter has to be set earlier, from pxa_ssp_startup(). Signed-off-by: Daniel Mack <zonque@gmail.com> Acked-by: Mark Brown <broonie@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-15ASoC: pxa: use snd_dmaengine_dai_dma_dataDaniel Mack6-81/+78
Use snd_dmaengine_dai_dma_data for passing the dma parameters from clients to the pxa pcm lib. This does no functional change, it's just an intermedia step to migrate the pxa bits over to dmaengine. The calculation of dcmd is a transition hack which will be removed again in a later patch. It's just there to make the transition more readable. Signed-off-by: Daniel Mack <zonque@gmail.com> Acked-by: Mark Brown <broonie@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-15ASoC: pxa: pxa-ssp: add DT bindingsDaniel Mack1-6/+31
The pxa ssp DAI acts as a user of a pxa ssp port, and needs an appropriate 'port' phandle in DT to reference the upstream. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-15Merge branch 'topic/dma' of ↵Mark Brown1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-pxa
2013-08-15ALSA: move dmaengine implementation from ASoC to ALSA coreDaniel Mack1-1/+1
For the PXA DMA rework, we need the generic dmaengine implementation that currently lives in sound/soc for standalone (non-ASoC) AC'97 support. Move it to sound/core, and rename the Kconfig symbol. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-14ASoC: mioa701_wm9713: Remove definition of ARRAY_AND_SIZE()Julia Lawall1-2/+0
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-11sound/soc/pxa/mioa701_wm9713.c: Avoid using ARRAY_AND_SIZE(e) as a function ↵Julia Lawall1-2/+3
argument Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the arity of the called function. The semantic match that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e,f; @@ f(..., - ARRAY_AND_SIZE(e) + e,ARRAY_SIZE(e) ,...) // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-24ASoC: pxa: don't check resource with devm_ioremap_resourceWolfram Sang1-3/+0
devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-15ASoC: ttc_dkb: add .owner to struct snd_soc_cardWei Yongjun1-0/+1
Add missing .owner of struct snd_soc_card. This prevents the module from being removed from underneath its users. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-15ASoC: brownstone: add .owner to struct snd_soc_cardWei Yongjun1-0/+1
Add missing .owner of struct snd_soc_card. This prevents the module from being removed from underneath its users. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-01Merge tag 'asoc-v3.11-3' of ↵Takashi Iwai2-3/+2
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Final updates for v3.11 A few final updates: - A couple of additional bug fixes for the AC'97 refactoring. - Some fixes for the ADAU1701 driver.
2013-06-29ASoC: pxa2xx: fixup multi-platform AC'97 build failuresKevin Hilman2-3/+2
commit b047e1cc (ASoC: ac97: Support multi-platform AC'97) introduced some build failures for the pxa2xx-ac97 support, fix them. Cc: Mark Brown <broonie@linaro.org> Signed-off-by: Kevin Hilman <khilman@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-28Merge tag 'asoc-v3.11-2' of ↵Takashi Iwai1-2/+6
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: More updates for v3.11 Some more fixes and enhancements, and also a bunch of refectoring for AC'97 support which enables more than one AC'97 controller driver to be built in.
2013-06-27ASoC: ac97: Support multi-platform AC'97Mark Brown1-2/+6
Currently we can only have a single platform built in with AC'97 support due to the use of a global variable to provide the bus operations. Fix this by making that variable a pointer and having the bus drivers set the operations prior to registering. This is not a particularly good or nice approach but it avoids blocking multiplatform and a real fix involves fixing the fairly deep problems with AC'97 support - we should be converting it to a real bus. Acked-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-14ASoC: Fix double assignment of .owner in struct snd_soc_cardEmil Goode1-1/+0
In struct snd_soc_card zylonite .owner is assigned THIS_MODULE twice, remove one of them. Signed-off-by: Emil Goode <emilgoode@gmail.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-05-15ASoC: remove saarb and tavorevb3 machine driversPaul Bolle4-403/+0
Support for PXA95x was removed in v3.8. This means that the Kconfig symbols MACH_SAARB and MACH_TAVOREVB3 are no longer available. This leaves the SoC Audio support for Marvell Saarb and Marvell Tavor EVB3 unbuildable. Remove these drivers too. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-15ASoC: mmp-sspa: Staticize non exported structLars-Peter Clausen1-1/+1
The mmp_sspa_dai struct is only used in mmp-sspa.c, so make it static. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-15ASoC: mmp-pcm: Staticize non exported structs and functionsLars-Peter Clausen1-3/+3
The mmp_pcm_ops and mmp_soc_platform struct as well as the mmp_pcm_new() function are only used in mmp-pcm.c, so make them static. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-18Merge tag 'asoc-v3.10-2' of ↵Takashi Iwai1-2/+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-2/+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>