summaryrefslogtreecommitdiff
path: root/sound/soc/omap/omap-twl4030.c
AgeCommit message (Collapse)Author
2018-12-18ASoC: ti: Merge davinci and omap directoriesPeter Ujfalusi
Create new directory to contain all Texas Instruments specific DAI, platform and machine drivers instead of scattering them under davinci and omap directories. There is already inter dependency between the two directories becasue of McASP (on dra7x it is serviced by sDMA, not EDMA). With the upcoming AM654 we will need to introduce new platform driver for UDMA and it does not fit under davinci, nor under omap. With the move I have restructured the Kconfig to be more usable in the era of simple-sound-card: CPU DAIs can be selected individually and they will select the platform driver they can be served with. To avoid breakage, I have moved over deprecated Kconfig options so defconfig builds will work without regression. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> For sound/soc/{omap => ti}: Tested-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-22ASoC: omap: Remove superfluous snd_soc_jack_free_gpios() callTakashi Iwai
Since jack gpios are managed via devres, we don't have to call snd_jack_free_gpios() at release any longer. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-20ASoC: omap: constify snd_soc_ops structuresBhumika Goyal
Declare snd_soc_ops structures as const as they are only stored in the ops field of a snd_soc_dai_link structure. This field is of type const, so snd_soc_ops structures having this property can be made const too. Cross compiled the .o files for arm architecture. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-06ASoC: omap-twl4030: Use card DAPM context to access widgetsLars-Peter Clausen
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>
2015-03-04ASoC: omap-twl4030: Register jacks at the card levelLars-Peter Clausen
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>
2015-01-07ASoC: omap-twl4030: Use snd_soc_runtime_set_dai_fmt()Lars-Peter Clausen
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>
2014-10-20ASoC: omap: drop owner assignment from platform_driversWolfram Sang
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>
2014-08-29ASoC: omap-twl4030: Fix typo in 2nd dai link's platform_namePeter Ujfalusi
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
2014-06-03ASoC: Fix wrong argument for card remove callbacksTakashi Iwai
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>
2014-06-03ASoC: free jack GPIOs before the sound card is freedStephen Warren
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>
2014-05-20ASoC: omap: Replace instances of rtd->codec->card with rtd->cardLars-Peter Clausen
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>
2014-04-18ASoC: omap-twl4030: Use the same name/node for platform as the cpu_daiPeter Ujfalusi
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>
2013-09-19ASoC: omap-twl4030: Use devm_snd_soc_register_cardSachin Kamat
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>
2013-04-03ASoC: omap: Use common DAI DMA dataLars-Peter Clausen
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>
2013-01-02ASoC: omap-twl4030: Add support for routing, voice port and jack detectPeter Ujfalusi
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>
2012-12-10ASoC: OMAP: 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-08-15ASoC: omap-twl4030: Simple machine driver for TI SoC with twl4030 codecPeter Ujfalusi
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>