aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/tegra (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-03-06ASoC: tegra: Remove unused variableStephen Warren1-1/+0
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 Romanovsky1-0/+1
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 Romanovsky1-16/+0
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 Romanovsky1-4/+35
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 Romanovsky1-9/+69
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 Eastwood1-1/+1
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 Eastwood1-3/+2
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 Lin3-0/+3
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 Warren1-25/+103
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 Romanovsky3-0/+224
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 Warren3-36/+13
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 Warren1-5/+22
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 Lin1-11/+1
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 Brown1-9/+9
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 Warren1-5/+1
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 Warren1-21/+1
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 Warren2-49/+24
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 Warren1-19/+7
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 Warren1-19/+7
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 Warren1-0/+8
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 Clausen2-2/+2
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>
2011-11-23ASoC: Tegra I2S: Use devm_ APIs and module_platform_driverStephen Warren1-35/+10
module_platform_drive 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: Move DAS configuration into machine driversStephen Warren3-18/+28
This removes potentially machine-specific routing knowledge from the I2S driverinto the machine drivers, which is better equipped to know what the appropriate routing configuration is. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23ASoC: Tegra DAS: Use devm_ APIs and module_platform_driverStephen Warren1-35/+10
module_platform_drive 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 PCM: Use module_platform_driverStephen Warren1-12/+1
This saves some boiler-plate code. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31sound: Add module.h to the previously silent sound usersPaul Gortmaker1-0/+1
Lots of sound drivers were getting module.h via the implicit presence of it in <linux/device.h> but we are going to clean that up. So fix up those users now. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-17ASoC: Tegra: sparse cleanupOlof Johansson2-3/+3
Fixes the following sparse warnings: sound/soc/tegra/tegra_das.c:215:8: warning: Using plain integer as NULL pointer sound/soc/tegra/tegra_das.c:237:8: warning: Using plain integer as NULL pointer sound/soc/tegra/tegra_pcm.c:370:32: warning: symbol 'tegra_pcm_platform' was not declared. Should it be static? Signed-off-by: Olof Johansson <olof@lixom.net> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-08ASoC: Remove redundant snd_soc_dapm_sync() calls from machine driversMark Brown2-4/+0
The core will sync DAPM as part of the card initialization, there is no need for machine drivers to do so during their setup. OMAP drivers are omitted as I know Peter already has patches for them. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-02ASoC: Remove unused srate variable in tegra_spdif_hw_paramsAxel Lin1-2/+1
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-02ASoC: tegra: Staticise tegra_i2s_dai and tegra_spdif_daiAxel Lin2-2/+2
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-24ASoC: Tegra: wm8903 machine driver: Drop Ventana supportStephen Warren1-2/+2
Board file support for Ventana is not yet mainlined, and probably won't ever be given the move to Device-Tree. Consequently, the Ventana entry is being removed from arch/arm/tools/mach-types in the next merge window, since it was registered over a year ago. This will also remove function machine_is_ventana(), which is used by the ASoC Tegra WM8903 machine driver. This will cause compilation failures. Drop Ventana support to resolve this. Hopefully, in the not-too-distant future, tegra_wm8903.c will be able to configure itself from Device-Tree, and hence we'll be able to re-instate Ventana support just by creating a .dts file for the board. Also note that Aebl support is in a similar boat. However, that board isn't scheduled for deprecation for at least another 5 months, and perhaps we will have completely removed non-Device-Tree support from tegra_wm8903.c by then and/or adjusted mach-types policy. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-09ASoC: Tegra: wm8903 machine driver: Allow re-insertion of moduleStephen Warren1-4/+11
Two issues were preventing module snd-soc-tegra-wm8903.ko from being removed and re-inserted: a) The speaker-enable GPIO is hosted by the WM8903 chip. This GPIO must be freed before snd_soc_unregister_card() is called, because that triggers wm8903.c:wm8903_remove(), which calls gpiochip_remove(), which then fails if any of the GPIOs are in use. To solve this, free all GPIOs first, so the code doesn't care where they come from. b) We need to call snd_soc_jack_free_gpios() to match the call to snd_soc_jack_add_gpios() during initialization. Without this, the call to snd_soc_jack_add_gpios() fails during any subsequent modprobe and initialization, since the GPIO and IRQ are already registered. In turn, this causes the headphone state not to be monitored, so the headphone is assumed not to be plugged in, and the audio path to it is never enabled. Signed-off-by: Stephen Warren <swarren@nvidia.com> Cc: stable@kernel.org Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-09ASoC: Tegra: tegra_pcm_deallocate_dma_buffer: Don't OOPSStephen Warren1-2/+7
Not all PCM devices have all sub-streams. Specifically, the SPDIF driver only supports playback and hence has no capture substream. Check whether a substream exists before dereferencing it, when de-allocating DMA buffers in tegra_pcm_deallocate_dma_buffer. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2011-07-05ASoC: Tegra: Implement SPDIF CPU DAIStephen Warren4-0/+855
This is a minimal driver for the Tegra SPDIF controller. In hardware, the SPDIF output signal is always routed to any active HDMI display controllers, and may also be routed to external pins on Tegra using the pinmux. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-04Merge branch 'for-3.0' into for-3.1Mark Brown1-0/+6
2011-07-04ASoC: Tegra: I2S: s/clk_get_sys/clk_get/Stephen Warren1-3/+1
The clock needed by the I2S driver is associated with the I2S device name in the standard fashion. Hence, use clk_get(dev) instead of clk_get_sys(clk_name). Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-04ASoC: Tegra: I2S: Ensure clock is enabled when writing regsStephen Warren1-0/+6
The I2S controller needs a clock to respond to register writes. Without this, register writes will at worst hang the CPU. In practice, I've only observed writes being dropped. Luckily, the dropped register writes historically had no effect: TEGRA_I2S_TIMING: The value we wrote was the reset default. TEGRA_I2S_FIFO_SCR: The default was for the FIFOs to request more data when one slot was empty. The requested value was for the FIFOs to request when four slots were empty. The DMA controller in the mainline kernel is configured to burst a single entry at a time into the FIFO, hence there was no issue. The only negative effect was on bus efficiency losses due to an increased number of arbitration attempts. However, in various non-upstream changes, the DMA controller now bursts four entries at a time into the FIFO. If there is only space for one entry, the data is simply dropped. In practice, this resulted in 3/4 of samples being dropped, and playback at 4x the expected rate and pitch. By fixing the clocking issue, this is solved. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-07ASoC: core - Optimise and refactor pcm_new() to pass only rtdLiam Girdwood1-2/+4
Currently pcm_new() passes in 3 arguments :- card, pcm and DAI. Refactor this to only pass in 1 argument (i.e. the rtd) since struct rtd contains card, pcm and DAI along with other members too that are useful too. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-30Merge branch 'for-2.6.40' into for-2.6.41Mark Brown1-1/+1
2011-05-27ASoC: Tegra: Enable Kaen HP_MUTE at bootStephen Warren1-1/+1
We want the default state of the HP_MUTE signal to be asserted, so that the headphones are muted before the first audio playback. Without this, the headphones are left unmuted until shortly after the first audio playback completes. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-20ASoC: Tegra: Fix compile when debugfs not enabledStephen Warren1-1/+1
The prototype of the inline dummy version of tegra_i2s_debug_add was not consistent with the real version. Reported-by: Rhyland-Klein <rklein@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-03ASoC: tegra: TrimSlice machine supportMike Rapoport3-0/+238
Signed-off-by: Mike Rapoport <mike@compulab.co.il> Acked-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-26ASoC: Remove default settings from Tegra KconfigMark Brown1-3/+0
There needs to be a strong reason for overriding the Kconfig default. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-21Merge branch 'tegra' into for-2.6.40Mark Brown1-1/+8
Fix up merge with Harmony driver rename. Conflicts: sound/soc/tegra/Kconfig
2011-04-21ARM: Tegra: select MACH_HAS_SND_SOC_TEGRA_WM8903Stephen Warren1-0/+7
CONFIG_SND_SOC_TEGRA_WM8903 is useful for many Tegra boards. To avoid the ASoC tegra/Kconfig enumerating them all, instead have the Tegra machine Kconfig select MACH_HAS_SND_SOC_TEGRA_WM8903 where appropriate, and have SND_SOC_TEGRA_WM8903 depend on this. [Redid ASoC diff so it applies. -- broonie] Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Olof Johansson <olof@lixom.net> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-20ASoC: Tegra: wm8903: s/code/data/ for control/widget/mapsStephen Warren1-22/+19
Replace calls to a variety of registration functions by updating struct snd_soc_card snd_soc_tegra_wm8903 to directly point at the various control/widget/map tables instead. The ASoC core now performs any required registration based on these data fields. (Applying Mark's TrimSlice review comments to the existing driver) Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-20ASoC: Tegra: Retrieve card from DAPM context not codecStephen Warren1-4/+4
Card widgets are created in the card's DAPM context, not any codec's DAPM context. Hence, w->codec==NULL. Instead, find the card from the widget through the DAPM context of the widget, not the codec of the widget. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-20ASoC: Tegra: Don't return mclk_changed from utils_set_rateStephen Warren3-15/+13
Only the clock programming code needs to know whether the clocks changed, and that is encapsulated within tegra_asoc_utils_set_rate(). The machine driver's call to snd_soc_dai_set_sysclk(codec_dai, ...) is safe irrespective of whether the clocks changed. (Applying Mark's TrimSlice review comments to the existing driver) Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-20ASoC: Tegra: wm8903: Remove redundant drvdata clearsStephen Warren1-9/+2
When the driver is not initialized/registered, nothing should be touching these fields anyway, so there's no point clearing them out. (Applying Mark's TrimSlice review comments to the existing driver) Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-20ASoC: Tegra: wm8903 probe: Don't call machine_is_*()Stephen Warren1-7/+0
This machine driver is a platform driver, and hence will only be instantiated on the correct machines. Hence, there is no need to check the current machine during probe. (Applying Mark's TrimSlice review comments to the existing driver) Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>