aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/omap (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-04-12Merge remote-tracking branches 'asoc/topic/omap', 'asoc/topic/qcom', 'asoc/topic/rcar' and 'asoc/topic/rt286' into asoc-nextMark Brown3-24/+3
2015-04-12ASoC: n810: Automatically disconnect non-connected pinsLars-Peter Clausen1-19/+1
All CODEC input and output widgets are either in the DAPM routing table or manually marked as non-connected. This means the card is fully routed and we can let the core take care of disconnecting non-connected pins. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-12ASoC: n810: Consistently pass the card DAPM context to n810_ext_control()Lars-Peter Clausen1-2/+1
Some callers of n810_ext_control() pass the card DAPM context and some pass the CODEC DAPM context. Given that some of the widgets that are accessed in the function are in the card's context, always passing it is the obvious choice. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-01ASoC: omap-hdmi-audio: No not use IEC958_AES1_PRO_MODE_NOTIDJyri Sarha1-2/+0
No IEC958_AES?_PRO_* macros should be used in HDMI consumer audio mode and IEC958_AES1_PRO_MODE_NOTID should be applied to byte 1 when applicable. However IEC958_AES1_PRO_MODE_NOTID is defined as 0 so this fix does not affect the functionality in any way. Reported-by: Russell King <linux@arm.linux.org.uk> Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-06ASoC: omap: fix up SND_OMAP_SOC_OMAP_ABE_TWL6040 dependencyArnd Bergmann1-1/+1
The change to enable OMAP5 support on this platform was a little too eager in adding a 'select' for a particular clock driver that might not be enabled in all configurations, which in turn leads to a build error: warning: (SND_OMAP_SOC_OMAP_ABE_TWL6040) selects COMMON_CLK_PALMAS which has unmet direct dependencies (COMMON_CLK && MFD_PALMAS) drivers/built-in.o: In function `palmas_clks_probe': drivers/clk/clk-palmas.c:228: undefined reference to `palmas_ext_control_req_config' I do not see a strong dependency here, so it's probably better to drop this select and to avoid adding more complexity here. Fixes: 5163c1eede8e9 ("ASoC: omap: Kconfig: Support for omap5-uevm analog audio") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-05Merge remote-tracking branches 'asoc/topic/jack', 'asoc/topic/max98357a', 'asoc/topic/omap' and 'asoc/topic/rt286' into asoc-nextMark Brown6-20/+37
2015-03-04Merge remote-tracking branch 'asoc/fix/omap' into asoc-linusMark Brown3-1/+15
2015-03-04ASoC: omap-pcm: Allow only formats with 1, 2, and 4 byte physical sizeJyri Sarha1-1/+20
sDMA support only transfer elements with 1, 2, and 4 byte physical size. Initialize the pcm driver accordingly. Signed-off-by: Jyri Sarha <jsarha@ti.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04ASoC: omap-pcm: Correct dma maskPeter Ujfalusi1-1/+1
DMA_BIT_MASK of 64 is not valid dma address mask for OMAPs, it should be set to 32. The 64 was introduced by commit (in 2009): a152ff24b978 ASoC: OMAP: Make DMA 64 aligned But the dma_mask and coherent_dma_mask can not be used to specify alignment. Fixes: a152ff24b978 (ASoC: OMAP: Make DMA 64 aligned) Reported-by: Grygorii Strashko <Grygorii.Strashko@linaro.org> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2015-03-04ASoC: rx51: Register jacks at the card levelLars-Peter Clausen1-3/+3
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> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04ASoC: omap-twl4030: Register jacks at the card levelLars-Peter Clausen1-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>
2015-03-04ASoC: omap-abe-twl6040: Register jacks at the card levelLars-Peter Clausen1-5/+5
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-03-04ASoC: ams-deltea: Register jacks at the card levelLars-Peter Clausen1-2/+2
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> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-26ASoC: OMAP: mcbsp: Fix CLKX and CLKR pinmux when used as inputsThomas Niederprüm1-0/+11
This patch fixes faulty behaviour in a setup where the input clock for the SRG is fed through the CLKR/CLKX pin but the McBSP is configured to be master (SND_SOC_DAIFMT_CBS_CFS). In that case of course CLKR/CLKX must not be configured as output pin. Otherwise the input clock is messed up horribly. This patch makes it possible to use the CLKR/CLKX pin rather than CLKS to inject a reference clock in setups where McBSP is master and not both rx and tx are used. However for this to work it has to be ensured that set_dai_sysclk() is called after set_dai_fmt(). This was tested on a beagleboard-xm using McBSP1 to drive a i2s DAC through the tx lines (CLKX,FSX,DX). Using this patch the CLKR pin is used to inject an external reference clock. Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-14ASoC: omap-hdmi-audio: Add missing error check for devm_kzallocKiran Padwal1-0/+3
This patch add a missing check on the return value of devm_kzalloc, which would cause a NULL pointer dereference in a OOM situation. Signed-off-by: Kiran Padwal <kiran.padwal@smartplayin.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-10ASoC: omap: Kconfig: Support for omap5-uevm analog audioPeter Ujfalusi1-1/+3
The analog audio is supported via omap-abe-twl6040 machine driver on omap5-uevm. Update the Kconfig file to reflect this and select the Palmas clock driver which is providing the 32K clock for audio on omap5-uevm. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-09Merge remote-tracking branches 'asoc/topic/rt5670', 'asoc/topic/rt5677', 'asoc/topic/rx51', 'asoc/topic/samsung' and 'asoc/topic/sh' into asoc-nextMark Brown1-4/+4
2015-02-09Merge remote-tracking branches 'asoc/topic/cs42l73', 'asoc/topic/dai' and 'asoc/topic/davinci' into asoc-nextMark Brown2-34/+4
2015-02-09Merge tag 'asoc-v3.19-rc2' into asoc-linusMark Brown1-1/+0
ASoC: Updates for v3.20 Nothing too exciting here yet, a small optimization for DAPM from Lars-Peter and a few small bits and pieces for drivers but nothing that really stands out. # gpg: Signature made Tue 30 Dec 2014 00:15:48 HKT using RSA key ID 5D5487D0 # gpg: Oops: keyid_from_fingerprint: no pubkey # gpg: key AF88CD16: no public key for trusted key - skipped # gpg: key AF88CD16 marked as ultimately trusted # gpg: key 5621E907: no public key for trusted key - skipped # gpg: key 5621E907 marked as ultimately trusted # gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>" # gpg: aka "Mark Brown <broonie@debian.org>" # gpg: aka "Mark Brown <broonie@kernel.org>" # gpg: aka "Mark Brown <broonie@tardis.ed.ac.uk>" # gpg: aka "Mark Brown <broonie@linaro.org>" # gpg: aka "Mark Brown <Mark.Brown@linaro.org>"
2015-02-04Merge remote-tracking branches 'asoc/topic/rx51', 'asoc/topic/samsung', 'asoc/topic/sh', 'asoc/topic/simple' and 'asoc/topic/sta32x' into asoc-nextMark Brown1-4/+4
2015-02-04Merge remote-tracking branches 'asoc/topic/omap', 'asoc/topic/pxa' and 'asoc/topic/rcar' into asoc-nextMark Brown1-1/+0
2015-02-04Merge remote-tracking branches 'asoc/topic/cs42l73', 'asoc/topic/dai' and 'asoc/topic/davinci' into asoc-nextMark Brown2-34/+4
2015-01-30ASoC: rx51: Correct DAPM route for capturePeter Ujfalusi1-4/+4
"Mic Bias" is DAPM_SUPPLY so it has to be connected in the route accordingly. Fixes audio capture on the board. Reported-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-16ASoC: omap-mcbsp: Correct CBM_CFS dai format configurationPeter Ujfalusi1-1/+1
We should select FSR also to be driven by McBSP, not only FSX. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2015-01-07ASoC: omap-twl4030: Use snd_soc_runtime_set_dai_fmt()Lars-Peter Clausen1-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>
2015-01-06ASoC: ams-delta: Use static DAI format setupLars-Peter Clausen1-15/+3
Set the dai_fmt field in the dai_link struct instead of manually calling snd_soc_dai_fmt(). This makes the code cleaner and shorter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-22ASoC: omap: drop owner assignment from platform_driversWolfram Sang1-1/+0
This 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> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-14Merge tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-coreLinus Torvalds7-7/+0
Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...
2014-12-11Merge tag 'sound-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/soundLinus Torvalds2-6/+5
Pull sound updates from Takashi Iwai: "This became a fairly large pull request. In addition to the usual driver updates / fixes, there have been a high amount of cleanups in ASoC area, as well as control API helpers and kernel documentations fixes touching through the whole tree. In the driver side, the biggest changes are the support for new Intel SoC found on new x86 machines, and the updates of FireWire dice and oxfw drivers. Some remarkable items are below: ALSA core: - PCM mmap code cleanup, removal of arch-dependent codes - PCM xrun injection support - PCM hwptr tracepoint support - Refactoring of snd_pcm_action(), simplification of PCM locking - Robustified sequecner auto-load functionality - New control API helpers and lots of cleanups along with them - Lots of kerneldoc fixes and cleanups USB-audio: - The mixer resume code was largely rewritten, and the devices with quirks are resumed properly. - New hardware support: Focusrite Scarlett, Digidesign Mbox1, Denon/Marantz DACs, Zoom R16/24 FireWire: - DICE driver updates with better duplex and sync support, including MIDI support - New OXFW driver for Oxford Semiconductor FW970/971 chipset, including the previous LaCie Speakers device. Fullduplex and MIDI support included as well as DICE driver. HD-audio: - Refactoring the driver-caps quirk handling in snd-hda-intel - More consistent control names representing the topology better - Fixups: HP mute LED with ALC268 codec, Ideapad S210 built-in mic fix, ASUS Z99He laptop EAPD ASoC: - Conversion of AC'97 drivers to use regmap, bringing us closer to the removal of the ASoC level I/O code - Clean up a lot of old drivers that were open coding things that have subsequently been implemented in the core - Some DAPM performance improvements - Removal of the now seldom used CODEC mutex - Lots of updates for the newer Intel SoC support, including support for the DSP and some Cherrytrail and Braswell machine drivers - Support for Samsung boards using rt5631 as the CODEC - Removal of the obsolete AFEB9260 machine driver - Driver support for the TI TS3A227E headset driver used in some Chrombeooks Others: - ASIHPI driver update and cleanups - Lots of dev_*() printk conversions - Lots of trivial cleanups for the codes spotted by Coccinelle" * tag 'sound-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (594 commits) ALSA: pcxhr: NULL dereference on probe failure ALSA: lola: NULL dereference on probe failure ALSA: hda - Add "eapd" model string for AD1986A codec ALSA: hda - Add EAPD fixup for ASUS Z99He laptop ALSA: oxfw: Add hwdep interface ALSA: oxfw: Add support for capture/playback MIDI messages ALSA: oxfw: add support for capturing PCM samples ALSA: oxfw: Add support AMDTP in-stream ALSA: oxfw: Add support for Behringer/Mackie devices ALSA: oxfw: Change the way to start stream ALSA: oxfw: Add proc interface for debugging purpose ALSA: oxfw: Change the way to make PCM rules/constraints ALSA: oxfw: Add support for AV/C stream format command to get/set supported stream formation ALSA: oxfw: Change the way to name card ALSA: dice: Add support for MIDI capture/playback ALSA: dice: Add support for capturing PCM samples ALSA: dice: Support for non SYT-Match sampling clock source mode ALSA: dice: Add support for duplex streams with synchronization ALSA: dice: Change the way to start stream ALSA: jack: Add dummy snd_jack_set_key() definition ...
2014-12-01ASoC: omap: Remove obsolete HDMI audio code and Kconfig optionsJyri Sarha5-506/+0
Removes omap-hdmi DAI driver, omap-hdmi-card driver, the related Kconfig options, and Makefile entries. The HDMI DAI drivers has been integrated directly to OMAP4+ HDMI drivers and simple-card driver is used instead of omap-hdmi-card driver. Signed-off-by: Jyri Sarha <jsarha@ti.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: Mark Brown <broonie@kernel.org> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-12-01ASoC: omap-hdmi-audio: Add platform device for OMAP HDMI audio supportJyri Sarha3-0/+424
The platform device should only be registered from OMAPDSS HDMI driver. The platform driver registers and unregisters all ASoC components needed for OMAP HDMI audio. The hdmi audio driver implements cpu-dai component using the callbacks provided by OMAPDSS and registers the component under DSS HDMI device. Omap-pcm is registered for platform component also under DSS HDMI device. Dummy codec is used as as codec component. The hdmi audio driver implements also the card and registers it under its own platform device. Signed-off-by: Jyri Sarha <jsarha@ti.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: Mark Brown <broonie@kernel.org> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-11-17ASoC: omap-mcbsp: Deletion of an unnecessary check before the function call "kfree"Markus Elfring1-2/+1
The kfree() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-10ASoC: omap: enable sound support on n900 on devicetree-based bootPavel Machek1-4/+4
With device tree, it is possible (and encouraged) to build N900 kernels without CONFIG_MACH_NOKIA_RX51. Update config file to enable the driver build in this case. This makes sound work on my n900 under 3.18-rc1. Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20ASoC: omap: drop owner assignment from platform_driversWolfram Sang9-9/+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>
2014-10-06Merge remote-tracking branch 'asoc/topic/component' into asoc-nextMark Brown1-1/+1
2014-09-29ASoC: rx51: Use snd_soc_dapm_to_codec() instead of dapm->codecLars-Peter Clausen1-1/+1
The CODEC struct in the snd_soc_dapm_context struct is deprecated and scheduled for removal. Use the snd_soc_dapm_to_codec() function instead. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-08-29ASoC: omap-twl4030: Fix typo in 2nd dai link's platform_namePeter Ujfalusi1-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
2014-08-04Merge remote-tracking branches 'asoc/topic/omap', 'asoc/topic/oom' and 'asoc/topic/pxa' into asoc-nextMark Brown3-30/+13
2014-07-22ASoC: Move card field form platform/codec to componentLars-Peter Clausen1-1/+1
Both the snd_soc_codec and snd_soc_platform struct do have a pointer to the parent card and both handle this pointer in mostly the same way. This patch moves the card field to the component level which will allow further code consolidation between platforms and CODECS. Since there are only a handful of users of the snd_soc_codec struct's card field (and none of the snd_soc_platform's) these are update in this patch as well, which allows it to be removed from the snd_soc_codec struct. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-14ASoC: omap-dmic: Use devm_clk_getHimangi Saraogi1-23/+6
This patch introduces the use of managed interfaces like devm_clk_get and does away with the clk_puts in the probe and remove functions. A label is also done away with. Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-09ASoC: omap-dmic: Use devm_snd_soc_register_componentManish Badarkhe1-3/+3
Replaced snd_soc_register_component with its devres equivalent, devm_snd_soc_register_component. Signed-off-by: Manish Badarkhe <badarkhe.manish@gmail.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-09ASoC: omap-mcbsp: Use devm_snd_soc_register_componentManish Badarkhe1-4/+3
Replaced snd_soc_register_component with its devres equivalent, devm_snd_soc_register_component. Signed-off-by: Manish Badarkhe <badarkhe.manish@gmail.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-21ASoC: omap-pcm: Include omap-pcm.hLars-Peter Clausen1-0/+1
omap_pcm_platform_register() is declared in omap-pcm.h and defined in omap-pcm.c. To make sure that the function signature matches for both omap-pcm.c should include omap-pcm.h Fixes the following warning from sparse: sound/soc/omap/omap-pcm.c:235:5: warning: symbol 'omap_pcm_platform_register' was not declared. Should it be static? Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-03ASoC: Fix wrong argument for card remove callbacksTakashi Iwai3-4/+3
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 Warren3-27/+33
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-06-03Merge remote-tracking branches 'asoc/topic/omap' and 'asoc/topic/rcar' into asoc-nextMark Brown5-34/+4
2014-05-26ASoC: omap-pcm: Move omap-pcm under include/soundJyri Sarha5-34/+4
Make including the omap-pcm.h outside sound/soc/omap more convenient. Signed-off-by: Jyri Sarha <jsarha@ti.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-22Merge remote-tracking branches 'asoc/topic/nuc900', 'asoc/topic/omap', 'asoc/topic/pxa', 'asoc/topic/rcar', 'asoc/topic/rt5640' and 'asoc/topic/rt5645' into asoc-nextMark Brown16-122/+235
2014-05-22Merge remote-tracking branches 'asoc/topic/cs42l56', 'asoc/topic/cs42xx8' and 'asoc/topic/davinci' into asoc-nextMark Brown5-105/+73
2014-05-20ASoC: omap: Replace instances of rtd->codec->card with rtd->cardLars-Peter Clausen3-7/+5
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>