summaryrefslogtreecommitdiffstats
path: root/sound/soc/omap
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-08-23Merge tag 'asoc-v3.12' of ↵Takashi Iwai7-149/+92
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v3.12 - DAPM is now mandatory for CODEC drivers in order to avoid the repeated regressions in the special cases for non-DAPM CODECs and make it easier to integrate with other components on boards. All existing drivers have had some level of DAPM support added. - A lot of cleanups in DAPM plus support for maintaining controls in a specific state while a DAPM widget all contributed by Lars-Peter Clausen. - Core helpers for bitbanged AC'97 reset from Markus Pargmann. - New drivers and support for Analog Devices ADAU1702 and ADAU1401(a), Asahi Kasei Microdevices AK4554, Atmel AT91ASM9x5 and WM8904 based machines, Freescale S/PDIF and SSI AC'97, Renesas R-Car SoCs, Samsung Exynos5420 SoCs, Texas Instruments PCM1681 and PCM1792A and Wolfson Microelectronics WM8997. - Support for building drivers that can support it cross-platform for compile test.
2013-08-20ASoC: omap: simplify platform_get_resource_byname/devm_ioremap_resourceJulia Lawall2-9/+3
Remove unneeded error handling on the result of a call to platform_get_resource_byname when the value is passed to devm_ioremap_resource. In the case of omap-dmic.c, the error-handling code of devm_ioremap_resource is also corrected to include releasing the clock. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression pdev,res,e,e1; expression ret != 0; identifier l; @@ res = platform_get_resource_byname(...); - if (res == NULL) { ... \(goto l;\|return ret;\) } e = devm_ioremap_resource(e1, res); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-15Merge branch 'topic/dma' of ↵Mark Brown5-45/+40
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-omap Conflicts: sound/soc/omap/Kconfig
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-07-31ASoC: omap-abe-twl6040: Remove support for pdata (legacy boot)Peter Ujfalusi1-92/+41
Just recently OMAP4 legacy boot support has been removed. No reason to keep the code used by the legacy boot (pdata based) since neither OMAP4 or OMAP5 can boot in this mode. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-22ASoC: omap-mcbsp: Support SND_SOC_DAIFMT_CBM_CFS for omap3/4Michael Trimarchi1-0/+5
Add SND_SOC_DAIFMT_CBM_CFS support for omap3/omap4. The patch was tested on a pandaboard-es board connected to the pcm1792a codec. mcbspx_fsx must configured as output and mcbspx_clkx must be configured as input. Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-21ALSA: replace strict_strto*() with kstrto*()Jingoo Han1-1/+1
The usage of strict_strto*() is not preferred, because strict_strto*() is obsolete. Thus, kstrto*() should be used. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-17ASoC: omap: Enable COMPILE_TEST build for DT platformsMark Brown1-3/+3
The DT platforms don't have any source dependency on any OMAP stuff so allow them to be built when COMPILE_TEST is enabled. Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
2013-07-15Merge remote-tracking branch 'asoc/fix/omap' into asoc-linusMark Brown4-44/+39
2013-07-11ASoC: omap-mcbsp: Use different method for DMA request when booted with DTPeter Ujfalusi1-17/+22
The DMA resource no longer available via this API when booting with DT. When the board is booted with DT do not use platform_get_resource_byname(), instead set the dma_data.filter_data to the name of the DMA channel and omap-pcm can use this name to request the DMA channel. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-11ASoC: omap-dmic: Do not use platform_get_resource_byname() for DMAPeter Ujfalusi1-10/+1
The DMA resource no longer available via this API when booting with DT. DMIC is only available on OMAP4/5 and both can boot with DT only. Set the dma_data.filter_data to the DMA name which will be used by omap-pcm to request the DMA channel. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-11ASoC: omap-mcpdm: Do not use platform_get_resource_byname() for DMAPeter Ujfalusi1-14/+2
The DMA resource no longer available via this API when booting with DT. McPDM is only available on OMAP4/5 and both can boot with DT only. Set the dma_data.filter_data to the DMA name which will be used by omap-pcm to request the DMA channel. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-11ASoC: omap-pcm: Request the DMA channel differently when DT is involvedPeter Ujfalusi1-3/+14
When booting with DT the platform_get_resource_byname() is not available to get the DMA resource. In this case the DAI drivers will set the filter_data to the name of the DMA and omap-pcm can use this to request the DMA channel. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-04ARM: OMAP2+: N900: enable N900-specific drivers even if device tree is enabledPavel Machek1-1/+1
We still need video & sound drivers with device tree enabled. Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Tony Lindgren <tony@atomide.com>
2013-06-21ASoC: omap: Fix the leftover CONFIG_SND_SOC_HDMI_CODECTakashi Iwai1-1/+1
Replace the leftover CONFIG_SND_SOC_OMAP_HDMI_CODEC in sound/soc/omap/Kconfig with CONFIG_SND_SOC_HDMI_CODEC, which was forgotten in the commit bf7c6e6c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-06-17Merge remote-tracking branch 'asoc/topic/omap' into asoc-nextMark Brown2-3/+0
2013-06-05ASoC: omap-hdmi-codec: make the driver common for other SoCsBarry Song1-1/+1
to support HDMI on CSR SiRFprimaII and atlasVI, we need one more HDMI pseudo codec, rather than add a new driver, we can make omap HDMI codec common for other SoCs as well. then the omap-hdmi codec becomes a generic HDMI pseudo- codec as HDMI audio features depend on HDMI specification not on SoCs. Signed-off-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-05-30ASoC: OMAP: Remove obsolete Makefile linePaul Bolle1-1/+0
Support for omap2evm was removed in v3.0. But only one of its two lines in this Makefile was removed. Remove the second line too. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-12ASoC: omap-mcbsp: Remove redundant platform_set_drvdata()Sachin Kamat1-2/+0
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-18Merge tag 'asoc-v3.10-2' of ↵Takashi Iwai1-3/+4
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/+4
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 Brown16-227/+122
2013-04-03ASoC: omap: Use common DAI DMA dataLars-Peter Clausen16-139/+54
Use the common DAI DMA data struct for omap, this allows us to use the common helper function to configure the DMA slave config based on the DAI DMA data. For omap-dmic and omap-mcpdm also move the DMA data from a global variable to the driver state struct. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-03Merge branch 'topic/omap' of ↵Mark Brown3-42/+62
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into HEAD
2013-03-26ASoC: switch over to use snd_soc_register_component() on omap hdmiKuninori Morimoto1-2/+7
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-26ASoC: switch over to use snd_soc_register_component() on omap dmicKuninori Morimoto1-2/+7
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-26ASoC: switch over to use snd_soc_register_component() on omap mcpdmKuninori Morimoto1-2/+7
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-26ASoC: switch over to use snd_soc_register_component() on omap mcbspKuninori Morimoto1-2/+7
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-26ASoC: omap-pcm: No need to wrap snd_dmaengine_pcm_close()Lars-Peter Clausen1-7/+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> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-26ASoC: omap: Call omap_mcbsp_set_threshold() from mcbsp hw_paramsLars-Peter Clausen3-40/+6
The omap PCM driver provides a set_threshold callback which gets called by the PCM driver when either playback or capture is started. The only DAI driver which sets this callback is the mcbsp driver. This patch removes the callback from the PCM driver and moves the invocation of the omap_mcbsp_set_threshold() function to the mcbsp hw_params callback since this is the only place where the threshold size can change. Doing so allows us to use the default dmaengine PCM trigger callback in the omap PCM driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-20ASoC: omap-mcpdm: Remove leftower define for IO addressPeter Ujfalusi1-2/+0
The IO address is no longer hardwired into the driver. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-20ASoC: omap-mcpdm: Fix for full duplex audio use casePeter Ujfalusi1-1/+26
Due to HW limitation within OMAP McPDM IP uplink and downlink need to be started at the same time. This causes issues when we have two streams running, for example: arecord | aplay In this case the playback stream would have no channels enabled since at the capture start we are not aware that a playback is going to start. The workaround is to configure the other direction to stereo when the first stream is started. When the second stream is coming we check the new stream's number of channels against the pre-configured channels. If it does not match we stop and restart McPDM to update the configuration. This might result a small pop. If the coming stream is a match we do nothing in the McPDM driver. This workaround can handle most use cases without the need to restart McPDM. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-20ASoC: omap-mcpdm: Collect link direction configuration under a structPeter Ujfalusi1-17/+24
mcpdm_link_config will collect the link direction related configurations like channel masks, FIFO threshold. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-13ASoC: omap: convert to devm_ioremap_resource()Silviu-Mihai Popescu2-11/+6
Convert all uses of devm_request_and_ioremap() to the newly introduced devm_ioremap_resource() which provides more consistent error handling. devm_ioremap_resource() provides its own error messages so all explicit error messages can be removed from the failure code paths. Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-06ASoC: omap3pandora: Fix compilation errorPeter Ujfalusi1-1/+1
Fixes: sound/soc/omap/omap3pandora.c: In function ‘omap3pandora_dac_event’: sound/soc/omap/omap3pandora.c:92:19: error: request for member ‘dev’ in something not a structure or union make[3]: *** [sound/soc/omap/omap3pandora.o] Error 1 Which is introduced by: dd194b4 ASoC: omap: Check regulator enable for DAC on Pandora Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-04ASoC: omap: Check regulator enable for DAC on PandoraMark Brown1-1/+7
This will probably never fail but it's better style. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
2013-03-04ASoC: omap-dmic: Clean up with devm_request_and_ioremapSebastien Guiriec1-9/+2
Clean up dmic code with devm_request_and_ioremap function. Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-04ASoC: omap-mcpdm: Clean up with devm_* functionSebastien Guiriec1-9/+5
Clean up McPDM driver with devm_ function. Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-12Merge remote-tracking branch 'asoc/topic/omap' into asoc-nextMark Brown1-4/+0
2013-02-11ASoC: omap-mcpdm: Remove useless ressource get.Sebastien Guiriec1-4/+0
Remove unused memory ressource get from McPDM driver. Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-11Merge remote-tracking branch 'asoc/topic/twl' into asoc-nextMark Brown6-512/+208
2013-02-11Merge remote-tracking branch 'asoc/topic/tlv320aic3x' into asoc-nextMark Brown2-6/+6
2013-02-05ASoC: omap-pcm: No need to set constraint at open timePeter Ujfalusi1-11/+3
The same constraint is going to be set in the snd_dmaengine_pcm_open() function, so there is no need to set it here as well. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-04ASoC: tlv320aic3x: Convert mic bias to a supply widgetHebbar Gururaja2-6/+6
Convert MicBias widgets to supply widget. On tlv320aic3x, Mic bias power on/off shares the same register bits with output mic bias voltage. So, when power on mic bias, we need reclaim it to voltage value. Provide a new platform data so that the micbias voltage can be sent according to board requirement. Now since tlv320aic3x codec driver is DT aware, update dt files and functions to handle this new "micbias-vg" platform data. Because of sharing of bits, when enabling the micbias, voltage also needs to be updated. So use SND_SOC_DAPM_POST_PMU & SND_SOC_DAPM_PRE_PMD macro to create an event to handle this. Since micbias is converted to supply widget, updated machine drivers as well. This change is runtime tested on da850-evm with audio loopback (arecord|aplay) for confirmation. Signed-off-by: Hebbar Gururaja <gururaja.hebbar@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-11ASoC: OMAP: HDMI: Initialize IEC-60958 channel status wordRicardo Neri1-0/+2
As the IEC-60958 channel status word is set by ANDing and ORing with the appropriate definitions, the word bytes need to be initialized to zero to avoid misconfiguration due to previous hw_params calls. Signed-off-by: Ricardo Neri <rneri@dextratech.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-02ASoC: OMAP: Remove obsolete machine drivers for Zoom2 and SDP3430Peter Ujfalusi4-459/+0
These boards are using the common omap-twl4030 machine driver, no need for separate machine drivers anymore. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-02ASoC: omap-twl4030: Add support for routing, voice port and jack detectPeter Ujfalusi2-2/+204
Update the common machine driver to support more boards including Zoom2 and SDP3430. - Support for voice port of twl4030 - HS jack plug detection support - The audio routing can be fine tuned via pdata or via provided routing table from DT. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-02ASoC: sdp3430: No need to configure pin mux for extmutePeter Ujfalusi1-18/+0
The codec driver takes care of this. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-02ASoC: twl4030: Convert MICBIAS to SUPPLY widgetPeter Ujfalusi3-18/+18
In order to avoid breakage update the machine drivers at the same time using twl4030: omap3pandora, sdp3430 and zoom2 Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>