linux-stable/sound/soc/tegra
Stephen Warren 29591ed4ac ASoC: Tegra: wm8903 machine driver: Allow re-insertion of module
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-09 09:42:11 +09:00
..
Kconfig ASoC: Tegra: Implement SPDIF CPU DAI 2011-07-05 12:20:56 -07:00
Makefile ASoC: Tegra: Implement SPDIF CPU DAI 2011-07-05 12:20:56 -07:00
tegra_asoc_utils.c ASoC: Tegra: Don't return mclk_changed from utils_set_rate 2011-04-20 13:49:55 +01:00
tegra_asoc_utils.h ASoC: Tegra: Don't return mclk_changed from utils_set_rate 2011-04-20 13:49:55 +01:00
tegra_das.c ASoC: Tegra: Add MODULE_ALIAS 2011-02-13 19:50:10 +00:00
tegra_das.h
tegra_i2s.c Merge branch 'for-3.0' into for-3.1 2011-07-04 08:54:40 -07:00
tegra_i2s.h ASoC: tegra: Add tegra-i2s driver 2011-01-10 22:20:39 +00:00
tegra_pcm.c ASoC: Tegra: tegra_pcm_deallocate_dma_buffer: Don't OOPS 2011-08-09 09:40:57 +09:00
tegra_pcm.h ASoC: tegra: Add tegra-pcm driver 2011-01-10 22:20:29 +00:00
tegra_spdif.c ASoC: Tegra: Implement SPDIF CPU DAI 2011-07-05 12:20:56 -07:00
tegra_spdif.h ASoC: Tegra: Implement SPDIF CPU DAI 2011-07-05 12:20:56 -07:00
tegra_wm8903.c ASoC: Tegra: wm8903 machine driver: Allow re-insertion of module 2011-08-09 09:42:11 +09:00
trimslice.c ASoC: tegra: TrimSlice machine support 2011-05-03 18:42:44 +01:00