summaryrefslogtreecommitdiffstats
path: root/sound/soc/tegra
AgeCommit message (Collapse)Author
2012-06-12ASoC: tegra+wm8903: turn of mic detect when card is removedStephen Warren
If mic detect is left enabled and the WM8903 detects a status change, the WM8903 driver will make a callback against the free()d jack, which will cause a crash. This problem can be triggered by fully initializing an audio card, then removing and re-inserting the machine driver module. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-08ASoC: tegra: add MODULE_DEVICE_TABLE to tegra30_ahubStephen Warren
This allows the module to automatically load when instantiated from device tree. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-19ASoC: tegra: Add machine driver for WM8753 codecStephen Warren
One such machine is Whistler. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-30ASoC: tegra: add device tree support for TrimSliceStephen Warren
This binding doesn't include the nvidia,model or nvidia,audio-routing properties the other Tegra audio DT bindings have, because this binding is targetted at a single machine, rather than for any machine using the tlv320aic23 codec. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-13ASoC: convert Tegra20 DAS driver to regmapStephen Warren
Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-13ASoC: convert Tegra20 SPDIF driver to regmapStephen Warren
Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-13ASoC: convert Tegra20 I2S driver to regmapStephen Warren
Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-13ASoC: tegra: select REGMAP_MMIOStephen Warren
All Tegra ASoC drivers will be reworked to use MMIO regmaps. Select this in Kconfig. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-13ASoC: tegra: add Kconfig and Makefile support for Tegra30Stephen Warren
This adds Kconfig options for the Tegra30 AHUB and I2S controller, and updates the Tegra+WM8903 machine driver Kconfig to select those. Includes a squashed bugfix from Sumit Bhattacharya <sumitb@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-13ASoC: tegra: add tegra30-i2s driverStephen Warren
This provides an ASoC DAI interface for Tegra 30's I2S controller. Includes a squashed bugfix from Sumit Bhattacharya <sumitb@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-13ASoC: tegra: add tegra30-ahub driverStephen Warren
The AHUB (Audio Hub) is a mux/crossbar which links all audio-related devices except the HDA controller on Tegra30. The devices include the DMA FIFOs, DAM (Digital Audio Mixers), I2S controllers, and SPDIF controller. Audio data may be routed between these devices in various combinations as required by board design/application. Includes a squashed bugfix from Nikesh Oswal <noswal@nvidia.com> Includes squashed bugfixes from Sumit Bhattacharya <sumitb@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-10ASoC: tegra: utils: Don't use of_have_populated_dt()Stephen Warren
Recent list discussions concluded that drivers should not be calling of_have_populated_dt(), and hence of_have_populated_dt() should not be exported. Use a different mechanism to detect DT vs. non-DT boot. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-09ASoC: tegra: add runtime PM supportStephen Warren
To the Tegra I2S and SPDIF drivers Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-06ASoC: tegra: utils: add support for Tegra30 devicesStephen Warren
Tegra30 has some additional clocks that need to be manipulated, names some clocks differently, runs PLLs at different base rates, etc. The utility code needs to handle this. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-06ASoC: tegra: set a sensible initial clock rateStephen Warren
Initialize the audio clock tree appropriately for some reasonable rate. This makes sure the PLLs etc. are actually programmed to something reasonable when the audio driver is loaded. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-06ASoC: tegra: use devm_ APIs in SPDIF driverStephen Warren
The devm_ APIs remove the need to manually clean up allocations, thus removing some code. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-06ASoC: tegra: sort includes, remove mach/iomap.hStephen Warren
Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-06ASoC: tegra: complete Tegra->Tegra20 renamingStephen Warren
Rename Tegra20-specific Kconfig variables, module filenames, all internal symbol names, clocks, and platform devices, to reflect the fact the DAS and I2S drivers are for a specific HW version. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-06ASoC: tegra: rename Tegra20-specific driver filesStephen Warren
Rename these files so they include a specific hardware version in their filenames. The contents is only touched minimally so that git's rename tracking operates correctly; renaming all symbols in the files results in a diff so large that the rename detection fails. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-05ASoC: tegra: make Tegra20 drivers depend on Tegra20 supportStephen Warren
Without this, the Tegra20 drivers can be built into a kernel that's built only for Tegra30. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-05ASoC: tegra: drop Kconfig description for SND_SOC_TEGRA_DASStephen Warren
The DAS, I2S, and SPDIF Kconfig options are intended to be selected by the Kconfig options for ASoC machine drivers. As such, they don't need to be user-visible themselves. Drop the description from the DAS variable to achieve this. I2S and SPDIF already don't have a description. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01ASoC: tegra: remove open-coded clk reference countingStephen Warren
clk_enable/disable() already reference count the enable calls, so there's no need for the callers to do the same. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01ASoC: tegra: sort Makefile into common and per-SoC filesStephen Warren
The DAS, I2S, and SPDIF drivers are Tegra20-specific. Group these together so that when Tegra30-specific equivalents are added later, the file ordering makes sense. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01ASoC: tegra: introduce separate Kconfig variable for DAS driverStephen Warren
This is mainly for symmetry with a future Tegra30 driver, where the equivalent of the DAS (the AHUB) is useful separately from the I2S driver. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01ASoC: tegra: fix some checkpatch warningsStephen Warren
ERROR: trailing whitespace ERROR: code indent should use tabs where possible WARNING: please, no spaces at the start of a line ERROR: "foo * bar" should be "foo *bar" Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01ASoC: tegra: fix Kconfig SND_SOC_TEGRA_ALC5632 indentationStephen Warren
Indent with TABs to be consistent with the rest of the file. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01ASoC: tegra: remove unnecessary includesStephen Warren
These include aren't needed, and some of the files are about to be renamed. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01ASoC: tegra: register 'platform' from DAIs, get rid of pdevStephen Warren
Previously, the ASoC 'platform' (PCM/DMA) object was instantiated via a platform_device. This didn't represent the hardware well, since there was no separate hardware associated with this platform_device; it was a virtual device with sole purpose to call snd_soc_register_platform(). This mechanism required all board files to register this device, and all ASoC machine drivers to create and register this device when booting using device tree. This change removes the platform_device completely. Each Tegra DAI now registers the ASoC 'platform' itself. Machine drivers are adjusted for the new 'platform' name. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01ASoC: tegra: fix comment indentation in ALC5632 machineStephen Warren
Fix comment indentation to clear checkpatch errors in a later patch. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-06ASoC: tegra: Remove unused variableStephen Warren
Fixes the following warning: sound/soc/tegra/tegra_alc5632.c: In function 'tegra_alc5632_asoc_init': sound/soc/tegra/tegra_alc5632.c:118:6: warning: unused variable 'ret' [-Wunused-variable] Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-13ASoC: tegra+alc5632: Added digital microphone DAPM widget.Leon Romanovsky
ALC5632 codec supports digital microphone. This patch adds DAPM widget. Signed-off-by: Leon Romanovsky <leon@leon.nu> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-02ASoC: tegra: Remove unused DAPM route structure.Leon Romanovsky
All DAPM routes are configured via device tree, and there is no need in DAPM route structures in board file. Signed-off-by: Leon Romanovsky <leon@leon.nu> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-02ASoC: Tegra+ALC5632: Enable headset autodetection on PAZ00 board.Leon Romanovsky
This patch is adding device tree support of headset autodetection on PAZ00 board. Signed-off-by: Leon Romanovsky <leon@leon.nu> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-31ASoC: Tegra+ALC5632: Implement device tree support in board fileLeon Romanovsky
This patch implements device tree support for Tegra boards with ALC5632 codec. Signed-off-by: Leon Romanovsky <leon@leon.nu> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20ASoC: replace 0xffffffff with DMA_BIT_MASK macroJoachim Eastwood
Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-07ASoC: check for substream not channels_min in pcm enginesJoachim Eastwood
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>
2011-12-22ASoC: tegra: Add .owner to struct snd_soc_cardAxel Lin
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-12-20ASoC: Tegra+WM8903 machine: Add device tree bindingStephen Warren
This driver is parameterized in two ways: a) Platform data, which supplies the set of GPIOs used by the driver. These GPIOs can now be parsed out of device tree. b) Machine-specific DAPM route arrays embedded into the ASoC machine driver itself. Historically, the driver picks the appropriate array to use using machine_is_*(). The driver now requires this array to be parsed from device tree when instantiated through device tree, using the core ASoC support for this parsing. Based on work by John Bonesio, but significantly reworked since then. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20ASoC: Tegra machine ASoC driver for boards using ALC5332 codecLeon Romanovsky
At this stage only Toshiba AC100/Dynabook supported. Signed-off-by: Leon Romanovsky <leon@leon.nu> Signed-off-by: Andrey Danin <danindrey@mail.ru> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-08ASoC: Tegra: Move DAS configuration into DAS driverStephen Warren
Move DAS routing setup into the DAS driver itself. This removes the need to duplicate this in each machine driver, of which we'll soon have three. An added advantage is that the machine drivers no longer call the Tegra20- specific DAS functions by name, so the machine driver no longer needs to be split up into Tegra20 and Tegra30 versions. If individual machine drivers need a different routing setup to this default, they can still call the DAS functions to set that up. Long-term, DAS will be a codec driver, and user-space will be able to control its routing, possibly within constraints that the machine driver sets up. Configuring the DAS routing from the DAS driver is a very slight move in that direction. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-30ASoC: Tegra I2S: Add device tree bindingStephen Warren
Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28ASoC: Convert tegra_spdif to use module_platform_driver()Axel Lin
Use the module_platform_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28ASoC: Convert WM8903 MICBIAS to a supply widgetMark Brown
Also rename it to MICBIAS to reflect the pin name and help any out of tree users notice the change. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Stephen Warren <swarren@nvidia.com>
2011-11-23ASoC: TrimSlice machine: Set the new fully_routed flagStephen Warren
Set card.fully_routed to request the ASoC core calculated unused codec pins, and call snd_soc_dapm_nc_pin() for them. Remove the open-coded calls. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23ASoC: Tegra+WM903 machine: Set the new fully_routed flagStephen Warren
Set card.fully_routed to request the ASoC core calculated unused codec pins, and call snd_soc_dapm_nc_pin() for them. Remove the open-coded calls. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23ASoC: Tegra I2S: Remove dependency on pdev->idStephen Warren
When devices are instantiated from device-tree, pdev->id is set to -1. Rework the driver so it doesn't depend on the ID. Tegra I2S instantiated from board files are configured with pdev name "tegra-i2s" and ID 0 or 1. The driver core then names the device "tegra-i2s.0" or "tegra-i2s.1". This is not changing. When a device is instantiated from device-tree, it will have pdev->name="" and pdev->id=-1. For this reason, the pdev->id value is not something we can rely on. This patch doesn't actually change any names though: When a device is instantiated from device-tree, the overall device name will be "${unit_address}.${node_name}". This causes issues such as clk_get() failures due to lack of a device-name match. To solve that, AUXDATA was invented, to force a specific device name, thus allowing dev_name() to return the same as the non-device-tree case. Tegra currently uses AUXDATA for the I2S controllers. Eventually, AUXDATA will go away, most likely replaced by phandle-based references within the device tree. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23ASoC: Tegra TrimSlice machine: Use devm_ APIs and module_platform_driverStephen Warren
module_platform_driver saves some boiler-plate code. The devm_ APIs remove the need to manually clean up allocations, thus removing some code. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23ASoC: Tegra+WM8903 machine: Use devm_ APIs and module_platform_driverStephen Warren
module_platform_driver saves some boiler-plate code. The devm_ APIs remove the need to manually clean up allocations, thus removing some code. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23ASoC: Tegra DAS: Add device tree bindingStephen Warren
Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23ASoC: Constify snd_soc_dai_ops structsLars-Peter Clausen
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>