summaryrefslogtreecommitdiff
path: root/sound/soc/tegra
AgeCommit message (Collapse)Author
2011-04-06ASoC: Tegra: Suspend/resume supportStephen Warren
ASoC machine drivers that are their own platform_driver (as opposed to those using the soc-audio platform_driver) need to explicitly set up power-management operation callbacks. To avoid cut/paste, snd_soc_pm_ops also needs to be exported. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-28ASoC: Tegra: Fix error handling in DMA channel allocStephen Warren
tegra_dma_allocate_channel() returns NULL on errors, not an error pointer. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-25ASoC: Tegra: Move utilities to separate moduleStephen Warren
The utilities will be required by every machine driver. Including the utility object directly into every machine driver causes a build failure if the modules are actually built into the kernel, since each will define the symbols exported by the utility file. Solve this by moving the utility object into a separate module. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-13ASoC: Tegra: Add MODULE_ALIASStephen Warren
With the appropriate MODULE_ALIAS in place, the audio modules will be automatically loaded; there is no longer a need for manual modprobes. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-13ASoC: Tegra: Harmony: Explicitly set mic enablesStephen Warren
Harmony has both an external mic (a regular mic jack) and an internal mic (a 0.1" two-pin header on the board). The external mic is connected to the WM8903's IN1L pin, and is supported by the current driver. The internal mic is connected to the WM8903's IN1R pin, and is not supported by the current driver. It appears that no Harmony systems were shipped with any internal mic connected; users were expected to provide their own. This makes the internal mic connection less interesting. The WM8903's Mic Bias signal is used for both of these mics. For each mic, a GPIO drives a transistor which gates whether the mic bias signal is actively connected to that mic, or isolated from it. The dual use of the mic bias for both mics makes a general-purpose complete implementation of mic detection using the mic bias complex. So, for simplicity, the internal mic is currently ignored by the driver. This patch configures the relevant GPIOs to enable the mic bias connection to the external mic, and disable the mic bias connection to the internal mic. Note that in practice, this is the default state if these GPIOs aren't configured. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-13ASoC: Harmony: Call snd_soc_dapm_nc_pinStephen Warren
Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-13ASoC: Tegra: Harmony: Implement mic detectionStephen Warren
* Add jack definition for mic jack * Request wm8903 to enable mic detection * Force mic bias on, since it's required for mic detection Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-09ASoC: Remove redundant -codec from WM8903 driver nameMark Brown
It causes noisy -codecs to appear in things like .codec_name. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-09ASoC: Tegra: Harmony: Add switch control for speakerStephen Warren
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-09ASoC: Tegra: Harmony: Add headphone jack detectionStephen Warren
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-01ASoC: Tegra: Harmony: Remove redundant !!Stephen Warren
gpio_set_value* should accept logic values not just 0 or 1. The WM8903 GPIO driver has been fixed to work this way, so remove the redundant !! previously required when it didn't accept values >1. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-31ASoC: Tegra: I2S: Use dev_err not pr_errStephen Warren
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-31ASoC: Tegra: utils: Don't use global variablesStephen Warren
Instead, have the machine driver provide storage for the utility data somehow. For Harmony in particular, store this within struct tegra_harmony, itself referenced by snd_soc_card's drvdata. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-31ASoC: Tegra: Harmony: Use dev_err not pr_errStephen Warren
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-31ASoC: Tegra: Harmony: Fix indentation issue.Stephen Warren
Indent with TABs not spaces. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-31ASoC: Tegra: Harmony: Support the internal speakerStephen Warren
Add DAPM widget definitions for the internal speaker paths. Currently, this path is always enabled while playback is active. Add code to control the speaker amplifier GPIO. The GPIO is requested during _init, since that's the first time it is guaranteed that the WM8903 module is loaded, probed, and hence has exported its GPIO chip. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-31ASoC: Tegra: Harmony: Don't use soc-audio platform deviceStephen Warren
Previously, snd-soc-tegra-harmony internally instantiated a platform device object whenever the module was loaded. Instead, switch to a more typical model where arch/arm/mach-tegra defines a platform device, and snd-soc-tegra-harmony acts as a driver for such a platform device. Define a new struct tegra_harmony to store driver data in the future. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-14ASoC: tegra: Add DAPM widgets/routes for HarmonyStephen Warren
With this change, I can capture from a microphone plugged into the mic jack on Harmony (after unmuting Left Input PGA, and maybe turning up the gain there too). Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-14ASoC: tegra: Remove TEGRA_I2S_AUDIO from KconfigStephen Warren
That config variable doesn't exist in the mainline kernel, and hence the dependency shouldn't either. In linux-tegra-2.6.36, the dependency did exist to avoid a conflict with the old non-ALSA Tegra I2S driver. However, this isn't and won't be upstreamed. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-13ASoC: tegra: s/IS_ERR_OR_NULL/IS_ERR/ for clk_get_sysStephen Warren
A recent discussion on linux-arm-kernel noted that the value returned by clk_get_sys is an opaque token, and not strictly a pointer; it is meaningful only to the clock API, clients should not dereference the value, and the clock API must accept any non-IS_ERR value it returned. Hence, only IS_ERR is appropriate to interpret the result, not IS_ERR_OR_NULL. I checked that clk_get_sys in both ASoC's for-next and Tegra's for-next do behave as described; NULL is not returned in the case of error. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-10ASoC: Update name of debugfs root symbol to snd_soc_Mark Brown
Everything else is using snd_soc_ so we should use it here too. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-01-10ASoC: tegra: Kconfig and MakefileStephen Warren
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-10ASoC: tegra: Harmony machine supportStephen Warren
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-10ASoC: tegra: Machine utility codeStephen Warren
Many portions of Tegra ASoC machine drivers will be similar or identical. To avoid cut/paste, this file will act as a repository for all that common code. For now, it solely includes code to reprogram the audio PLL for 44.1KHz- vs. 48KHz-based sample rates. Signed-Off-By: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-10ASoC: tegra: Add tegra-i2s driverStephen Warren
This provides an ASoC DAI interface for Tegra's I2S controller. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-10ASoC: tegra: Add tegra-pcm driverStephen Warren
This provides an ASoC platform driver that manages Tegra's APB DMA controller. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-10ASoC: tegra: Add tegra-das driverStephen Warren
The DAS (Digital Audio Switch) is a mux/crossbar which sits between the DACs (Digital Audio Controllers) and the DAPs (Digital Audio Ports). Audio data may be routed between DACs and DAPs in various combinations as required by board design/application. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>