summaryrefslogtreecommitdiffstats
path: root/sound/soc/omap/omap-twl4030.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: omap-twl4030: Use card DAPM context to access widgetsLars-Peter Clausen2015-05-061-2/+1
| | | | | | | | Use the card DAPM context instead of the CODEC DAPM context since only card level widgets are accessed here. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: omap-twl4030: Register jacks at the card levelLars-Peter Clausen2015-03-041-8/+4
| | | | | | | | | The jacks are card level elements so use snd_soc_card_jack_new() instead of snd_soc_jack_new() to register them. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: omap-twl4030: Use snd_soc_runtime_set_dai_fmt()Lars-Peter Clausen2015-01-071-19/+1
| | | | | | | | | Use snd_soc_runtime_set_dai_fmt() to configure the format for the DAI link rather than configuring each DAI individually. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: omap: drop owner assignment from platform_driversWolfram Sang2014-10-201-1/+0
| | | | | | | A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* ASoC: omap-twl4030: Fix typo in 2nd dai link's platform_namePeter Ujfalusi2014-08-291-1/+1
| | | | | | | | | | The platform_name should be omap-mcasp3 for the 2nd link which is used for voice connection. Reported-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie+linaro@kernel.org> Cc: stable@vger.kernel.org
* ASoC: Fix wrong argument for card remove callbacksTakashi Iwai2014-06-031-2/+1
| | | | | | | | | | | The commit [e1d4d3c8: ASoC: free jack GPIOs before the sound card is freed] introduced snd_soc_card remove callbacks to a few drivers, but they are implemented with a wrong argument type. The callback should receive snd_soc_card pointer instead of snd_soc_pcm_runtime. Fixes: e1d4d3c854f2 ('ASoC: free jack GPIOs before the sound card is freed') Acked-by: Mark Brown <broonie@linaro.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ASoC: free jack GPIOs before the sound card is freedStephen Warren2014-06-031-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the same change as commit fb6b8e71448a "ASoC: tegra: free jack GPIOs before the sound card is freed", but applied to all other ASoC machine drivers where code inspection indicates the same problem exists. That commit's description is: ========== snd_soc_jack_add_gpios() schedules a work queue item to poll the GPIO to generate an initial jack status report. If sound card initialization fails, that work item needs to be cancelled, so it doesn't run after the card has been freed. Specifically, freeing the card calls snd_jack_dev_free() which calls snd_jack_dev_disconnect() which sets jack->input_dev = NULL, and input_dev is used by snd_jack_report(), which is called from the work queue item. snd_soc_jack_free_gpios() cancels the work item. The Tegra ASoC machine drivers do call this function in the platform driver remove() callback. However, this happens after the sound card is freed, at least when the card is freed due to errors late during snd_soc_instantiate_card(). This leaves a window where the work item can execute after the card is freed. In next-20140522, sound card initialization does fail for unrelated reasons, and hits the problem described above. To solve this, fix the Tegra ASoC machine drivers to clean up the Jack GPIOs during the snd_soc_card's .remove() callback, which is executed before the overall card object is freed. also, guard the cleanup call based on whether we actually setup up the GPIOs in the first place. Ideally, we'd do the cleanup in a struct snd_soc_dai_link .fini/remove function to match where the GPIOs get set up. However, there is no such callback. ========== Note that I have not even compile-tested this in most cases, since most of the drivers rely on specific mach-* support I don't have enabled, and don't support COMPILE_TEST. Testing by the relevant board maintainers would be useful. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: omap: Replace instances of rtd->codec->card with rtd->cardLars-Peter Clausen2014-05-201-3/+2
| | | | | | | | | No need to go via the CODEC to get a pointer to the card. This will help to eventually remove the card field from the snd_soc_codec struct. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: omap-twl4030: Use the same name/node for platform as the cpu_daiPeter Ujfalusi2014-04-181-2/+8
| | | | | | | | Now that the platform driver is registered with the cpu_dai's device we can use the same name/node for it. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: omap-twl4030: Use devm_snd_soc_register_cardSachin Kamat2013-09-191-3/+2
| | | | | | | devm_snd_soc_register_card makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: omap: Use common DAI DMA dataLars-Peter Clausen2013-04-031-1/+0
| | | | | | | | | | | | | Use the common DAI DMA data struct for omap, this allows us to use the common helper function to configure the DMA slave config based on the DAI DMA data. For omap-dmic and omap-mcpdm also move the DMA data from a global variable to the driver state struct. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: omap-twl4030: Add support for routing, voice port and jack detectPeter Ujfalusi2013-01-021-2/+202
| | | | | | | | | | | | Update the common machine driver to support more boards including Zoom2 and SDP3430. - Support for voice port of twl4030 - HS jack plug detection support - The audio routing can be fine tuned via pdata or via provided routing table from DT. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: OMAP: remove __dev* attributesBill Pemberton2012-12-101-3/+3
| | | | | | | | | | | 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>
* ASoC: omap-twl4030: Simple machine driver for TI SoC with twl4030 codecPeter Ujfalusi2012-08-151-0/+188
Machine driver to handle simple devices using twl4030 as audio codec. The driver supports the following boards: - Beagleboard or Devkit8000 - Gumstix Overo or CompuLab CM-T35/CM-T3730 - IGEP v2 - OMAP3EVM All of these boards can be switched to use this driver since their setup is identical. Devicetree support for the omap-twl4030 machine driver also implemented. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>