aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/tegra (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-12-11ASoC: tegra: convert to standard DMA DT bindingsStephen Warren8-60/+42
By passing no flags when calling snd_dmaengine_pcm_register() from tegra_pcm.c, we end up using dma_request_slave_channel() rather than dmaengine_pcm_compat_request_channel(), and hence rely on the standard DMA DT bindings and stashing the DMA slave ID away during channel allocation. This means there's no need to use a custom DT property to store the slave ID. So, remove all the code that parsed it. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Mark Brown <broonie@linaro.org>
2013-12-11ASoC: tegra: allocate AHUB FIFO during probe() not startup()Stephen Warren1-44/+47
The Tegra30 I2S driver currently allocates DMA FIFOs from the AHUB only when an audio stream starts playback. This is theoretically nice for resource sharing, but makes no practical difference for any configuration the drivers currently support. However, this deferral prevents conversion to the standard DMA DT bindings, since conversion requires knowledge of the specific DMA channel to be allocated, which in turn depends on which specific FIFO was allocated. For this reason, move the FIFO allocation into probe() to allow later conversion to the standard DMA DT bindings. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Mark Brown <broonie@linaro.org>
2013-12-11ASoC: tegra: call pm_runtime APIs around register accessesStephen Warren1-0/+32
Call pm_runtime_get_sync() before all register accesses; the HW requires clocks to be running when accessing registers. This hasn't been needed to date, since all register IO was performed while playback was active, and hence the ASoC core had already called pm_runtime_get(). However, an imminent future commit will allocate and set up the FIFOs and routing during probe(), when that "protection" won't be in place. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Mark Brown <broonie@linaro.org>
2013-12-11ASoC: tegra: use reset frameworkStephen Warren3-34/+41
Tegra's clock driver now provides an implementation of the common reset API (include/linux/reset.h). Use this instead of the old Tegra- specific API; that will soon be removed. This change also renames "clock"/"clk" to "modules"/"mod" in symbols related to entries in configlink_clocks[], since: - We don't care about clock handles any more, but rather reset handles, so the old name isn't applicable. - It really is a list of modules on the bus, about which we currently only care about reset handles. If we start caring about any other aspect of the modules in the future, we won't have to rename all these symbols again. Note: The addition of "depends COMMON_CLOCK" is something that was missing before, not a new requirement. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Mark Brown <broonie@linaro.org> Reviewed-by: Thierry Reding <treding@nvidia.com>
2013-12-09ASoC: tegra: fix uninitialized variables in set_fmtStephen Warren3-11/+11
In tegra*_i2s_set_fmt(), in the (fmt == SND_SOC_DAIFMT_CBM_CFM) case, "val" is never assigned to, but left uninitialized. The other case does initialized it. Fix this by initializing val at the start of the function, and only ever ORing into it. Update the handling of "mask" so it works the same way for consistency. Update tegra20_spdif.c to use the same code-style for consistency, even though it doesn't happen to suffer from the same problem at present. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org> Fixes: 0f163546a772 ("ASoC: tegra: use regmap more directly") Cc: <stable@vger.kernel.org>
2013-12-05ASoC: tegra: add tegra+MAX98090 machine driverStephen Warren3-0/+287
Initially, this binding and driver only describe/support playback to headphones and speakers, and capture from the external microphone, with GPIO-based jack detection for the headphone jack only. This driver is useful for the Venice2 board. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-25Merge tag 'asoc-v3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-nextTakashi Iwai7-29/+186
ASoC: Updates for v3.13 - Further work on the dmaengine helpers, including support for configuring the parameters for DMA by reading the capabilities of the DMA controller which removes some guesswork and magic numbers fromm drivers. - A refresh of the documentation. - Conversions of many drivers to direct regmap API usage in order to allow the ASoC level register I/O code to be removed, this will hopefully be completed by v3.14. - Support for using async register I/O in DAPM, reducing the time taken to implement power transitions on systems that support it.
2013-10-24Merge remote-tracking branch 'asoc/topic/tegra' into asoc-nextMark Brown6-28/+186
2013-10-23ASoC: tegra: Remove redundant initialisation of compat_filter_fnMark Brown1-1/+0
Setting a field in a static struct to NULL has no effect so don't bother (and don't generate false positives for grep). Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Stephen Warren <swarren@nvidia.com>
2013-10-14ASoC: tegra: support new register layouts in Tegra124Stephen Warren6-28/+186
Tegra124 introduces some small changes to the layout of some registers. Modify the affected drivers to program those registers appropriately based on which SoC they're running on. Tegra124 also introduced some new modules on the AHUB configlink register bus. These will require new entries in configlink_clocks[] in the AHUB driver. However, supporting that change likely relies on switching Tegra to the common reset framework, so I'll defer that change for now. Based-on-work-by: Arun Shamanna Lakshmi <aruns@nvidia.com> Based-on-work-by: Songhee Baek <sbaek@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-14sound: Remove unnecessary semicolonsJoe Perches4-10/+10
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>
2013-08-22Merge remote-tracking branch 'asoc/topic/tegra' into asoc-nextMark Brown6-21/+8
2013-08-15ASoC: tegra20-ac97: simplify use of devm_ioremap_resourceJulia Lawall1-6/+0
Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression pdev,res,n,e,e1; expression ret != 0; identifier l; @@ - res = platform_get_resource(pdev, IORESOURCE_MEM, n); ... when != res - if (res == NULL) { ... \(goto l;\|return ret;\) } ... when != res + res = platform_get_resource(pdev, IORESOURCE_MEM, n); e = devm_ioremap_resource(e1, res); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-15ASoC: tegra: support a Mic Jack in the Tegra+RT5640 machine driverStephen Warren1-0/+1
Add a Mic Jack widget to the Tegra+RT5640 machine driver, and document this in the DT binding. This enables the DT to include the Mic Jack in the audio routing table, and hence enables capture of audio, in addition to the previously-working playback. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-15ASoC: tegra: fix Tegra30 I2S capture parameter setupStephen Warren1-1/+1
The Tegra30 I2S driver was writing the AHUB interface parameters to the playback path register rather than the capture path register. This caused the capture parameters not to be configured at all, so if capturing using non-HW-default parameters (e.g. 16-bit stereo rather than 8-bit mono) the audio would be corrupted. With this fixed, audio capture from an analog microphone works correctly on the Cardhu board. Cc: stable@vger.kernel.org Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-22ASoC: tegra: correct playback_dma_data setupRichard Zhao2-5/+5
The errors were caused by copy/paste mistake in below commit since v3.10: 3489d50 ASoC: tegra: Use common DAI DMA data struct It also corrects slave_id initialization in tegra20_ac97 driver. Signed-off-by: Richard Zhao <rizhao@nvidia.com> Acked-by: Stephen Warren <swarren@nvidia.com> Acked-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: <stable@vger.kernel.org> # 3.10
2013-07-17ASoC: tegra: fix compile warning in AC'97 driverStephen Warren1-2/+0
This fixes the following by deleting dead code: sound/soc/tegra/tegra20_ac97.c: In function ‘tegra20_ac97_platform_probe’: sound/soc/tegra/tegra20_ac97.c:435:1: warning: label ‘err_unregister_pcm’ defined but not used [-Wunused-label] Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-17ASoC: tegra: Enable COMPILE_TEST buildsMark Brown1-1/+1
Since there is no architecture dependency in the code allow it to be built on any platform when COMPILE_TEST is enabled. Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Stephen Warren <swarren@nvidia.com>
2013-07-17ASoC: tegra: Always use the generic dmaengine helper libraryMark Brown1-1/+1
The usage of the dmaengine helpers is unconditional, especially when doing compile testing. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-17ASoC: tegra: Add GPIOLIB dependenciesMark Brown1-5/+5
For build coverage. Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Stephen Warren <swarren@nvidia.com>
2013-07-17ASoC: tegra: Remove unneeded mach-type.h inclduesMark Brown3-6/+0
Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Stephen Warren <swarren@nvidia.com> Tested-by: Stephen Warren <swarren@nvidia.com>
2013-07-01Merge tag 'asoc-v3.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linusTakashi Iwai1-2/+1
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: tegra20-ac97: Remove unused variableThierry Reding1-1/+1
With the conversion to devm_ioremap_resource() the memregion variable is no longer used so it can be dropped. Signed-off-by: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-29ASoC: tegra20-ac97: Remove duplicate error messageThierry Reding1-1/+0
devm_ioremap_resource() already outputs an error message when any of the operations it performs fails, so the duplicate in the caller can be removed. Signed-off-by: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-28Merge tag 'asoc-v3.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-nextTakashi Iwai1-34/+32
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/+10
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-27ASoC: tegra-ac97: Do common and clock init prior to component registrationMark Brown1-17/+17
Otherwise we may instantiate and hence have something try to access the device while it is still completing initialisation. Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-27ASoC: tegra20-ac97: Convert to devm_ioremap_resource()Mark Brown1-12/+4
Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-27ASoC: tegra20-ac97: Convert to devm_clk_get()Mark Brown1-3/+1
Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-17Merge remote-tracking branch 'asoc/topic/tegra' into asoc-nextMark Brown3-18/+56
2013-06-12ASoC: tegra: add tegra+RT5640 machine driverStephen Warren3-0/+269
Initially, this binding and driver only describe/support playback to headphones and speakers. This driver will support Beaver and Dalmore. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-04ASoC: tegra: add runtime PM to resume functionsStephen Warren2-1/+12
Tegra HW needs clocks etc. active when touching registers. Make sure they are active during resume, by calling pm_runtime_get_sync() before touching HW. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-03ASoC: tegra: implement suspend/resume for Tegra30 I2SStephen Warren1-0/+19
Add tegra30_i2s_{suspend,resume}. These use regcache functions to restore all HW registers after power loss during a suspend/resume cycle. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-03ASoC: tegra: implement suspend/resume for Tegra30 AHUBStephen Warren1-0/+21
Add tegra30_ahub_{suspend,resume}. These use regcache functions to restore all HW registers after power loss during a suspend/resume cycle. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-05-14ASoC: tegra: always use clk_get() in utility codeStephen Warren1-18/+5
Now that all of the Tegra device trees have been updated to represent the required audio clocks, remove the compatibility code from the Tegra ASoC utility code, and always use clk_get() rather than clk_get_sys(). Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-18Merge tag 'asoc-v3.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-nextTakashi Iwai2-163/+10
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: tegra: Use generic dmaengine PCMLars-Peter Clausen2-163/+10
Use the generic dmaengine PCM driver instead of a custom implementation. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-17Merge tag 'v3.9-rc7' into asoc-dmaMark Brown1-23/+1
Linux 3.9-rc7
2013-04-17ASoC: dmaengine-pcm: Make requesting the DMA channel at PCM open optionalLars-Peter Clausen1-2/+2
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/tegra' into asoc-nextMark Brown9-192/+193
2013-04-12Merge remote-tracking branch 'asoc/topic/dma' into asoc-nextMark Brown12-64/+45
2013-04-12Merge remote-tracking branch 'asoc/topic/component' into asoc-nextMark Brown5-21/+41
2013-04-03ASoC: tegra: Use common DAI DMA data structLars-Peter Clausen12-57/+44
Use the common DAI DMA data struct for tegra, this allows us to use the common helper function to configure the DMA slave config based on the DAI DMA data. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Stephen Warren <swarren@nvidia.com> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-03ASoC: tegra: Don't claim to support PCM pause and resumeLars-Peter Clausen1-23/+1
The tegra dmaengine driver does not support pausing and resuming a DMA stream. The tegra PCM driver still claims to support pause and resume though and implements them by stopping and restarting the stream. This is not what an application using pause/resume would expect. Usually applications have support for working around PCMs which do not support suspend and resume, so don't set the SNDRV_PCM_INFO_PAUSE and SNDRV_PCM_INFO_RESUME flags for the tegra PCM and use the default snd_dmaengine_pcm_trigger callback. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Stephen Warren <swarren@nvidia.com> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-26ASoC: switch over to use snd_soc_register_component() on tegra20 i2sKuninori Morimoto1-5/+10
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 tegra20 ac97Kuninori Morimoto2-6/+11
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 tegra20 spdifKuninori Morimoto1-5/+10
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 tegra30 i2sKuninori Morimoto1-5/+10
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-26ASoC: tegra_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: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-25ASoC: tegra: add Tegra114 support to tegra_asoc_utils.cStephen Warren2-6/+25
Tegra114 requires different PLL rates. Modify the code to know about this. On Tegra114 only for now, use regular clk_get() rather than clk_get_sys() to retrieve clocks. This assumes that the clocks will be represented in device tree. We can assure that from the start of any Tegra114 audio support. For older chips, I'll add the required clocks properties to the device trees this kernel cycle, and switch this code to only support the "new_clocks" path next cycle. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>