summaryrefslogtreecommitdiff
path: root/sound/soc/tegra/tegra_alc5632.c
AgeCommit message (Collapse)Author
2013-03-04ASoC: tegra_alc5632: assume CONFIG_OF, and other cleanupStephen Warren
Tegra only supports, and always enables, device tree. Remove all runtime checks for DT support from the driver. Also, various minor cleanups so that the probe() body more closely resembles other drivers, for easier comparison. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-09ASoC: tegra: remove __dev* attributesBill Pemberton
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-20ASoC: remove use of __devinitconstBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devinitconst is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28sound: tegra_alc5632: remove HP detect GPIO inversionStephen Warren
Both the schematics and practical testing show that the HP detect GPIO is high when the headphones are plugged in. Hence, the snd_soc_jack_gpio should not specify to invert the signal. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Andrey Danin <danindrey@mail.ru> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: <stable@vger.kernel.org> # v3.4 v3.5
2012-07-26sound: tegra_alc5632: Adjust to of_get_named_gpio() changeRoland Stigge
of_get_named_gpio() was changed to return -EPROBE_DEFER in case of gpios not probed yet. This patch adjusts tegra_alc5632 to this. Signed-off-by: Roland Stigge <stigge@antcom.de> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-07ASoC: tegra: remove usage of rtd->codecStephen Warren
rtd->codec_dai->codec can be used instead. This is a slight step along the way to not needing the rtd->codec field any more. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-03ASoC: make snd_soc_dai_link more symmetricalStephen Warren
Prior to this patch, the CPU side of a DAI link was specified using a single name. Often, this was the result of calling dev_name() on the device providing the DAI, but in the case of a CPU DAI driver that provided multiple DAIs, it needed to mix together both the device name and some device-relative name, in order to form a single globally unique name. However, the CODEC side of the DAI link was specified using separate fields for device (name or OF node) and device-relative DAI name. This patch allows the CPU side of a DAI link to be specified in the same way as the CODEC side, separating concepts of device and device-relative DAI name. I believe this will be important in multi-codec and/or dynamic PCM scenarios, where a single CPU driver provides multiple DAIs, while also booting using device tree, with accompanying desire not to hard-code the CPU side device's name into the original .cpu_dai_name field. Ideally, both the CPU DAI and CODEC DAI loops in soc_bind_dai_link() would now be identical. However, two things prevent that at present: 1) The need to save rtd->codec for the CODEC side, which means we have to search for the CODEC explicitly, and not just the CODEC side DAI. 2) Since we know the CODEC side DAI is part of a codec, and not just a standalone DAI, it's slightly more efficient to convert .codec_name/ .codec_of_node into a codec first, and then compare each DAI's .codec field, since this avoids strcmp() on each DAI's CODEC's name within the loop. However, the two loops are essentially semantically equivalent. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-03ASoC: tegra+alc5632: unconditionally free jack GPIOs in removeStephen Warren
The headphone jack GPIOs are added/initialized in the DAI link's init() method, and hence in theory may not always have been added before remove() is called in some unusual cases. In order to prevent calling snd_soc_jack_free_gpios() if snd_soc_jack_add_gpios() had not been, the code kept track of the initialization state to avoid the free call when necessary. However, it appears that snd_soc_jack_free_gpios() is robust in the face of being called without snd_soc_jack_add_gpios() first succeeding, so there is little point manually tracking this information. Hence, remove the tracking code. All other machine drivers already operate this way. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-03ASoC: tegra+alc5632: move all GPIO setup into probeStephen Warren
Now that deferred probe exists, we can parse device tree and request GPIOs from probe(), rather than deferring this to the DAI link's init(). 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>
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 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>