|
@@ -206,6 +206,12 @@ static int tegra_wm8903_remove(struct snd_soc_card *card)
|
|
|
struct snd_soc_pcm_runtime *rtd = &(card->rtd[0]);
|
|
|
struct snd_soc_dai *codec_dai = rtd->codec_dai;
|
|
|
struct snd_soc_codec *codec = codec_dai->codec;
|
|
|
+ struct tegra_wm8903 *machine = snd_soc_card_get_drvdata(card);
|
|
|
+
|
|
|
+ if (gpio_is_valid(machine->gpio_hp_det)) {
|
|
|
+ snd_soc_jack_free_gpios(&tegra_wm8903_hp_jack, 1,
|
|
|
+ &tegra_wm8903_hp_jack_gpio);
|
|
|
+ }
|
|
|
|
|
|
wm8903_mic_detect(codec, NULL, 0, 0);
|
|
|
|
|
@@ -228,9 +234,7 @@ static struct snd_soc_card snd_soc_tegra_wm8903 = {
|
|
|
.owner = THIS_MODULE,
|
|
|
.dai_link = &tegra_wm8903_dai,
|
|
|
.num_links = 1,
|
|
|
-
|
|
|
.remove = tegra_wm8903_remove,
|
|
|
-
|
|
|
.controls = tegra_wm8903_controls,
|
|
|
.num_controls = ARRAY_SIZE(tegra_wm8903_controls),
|
|
|
.dapm_widgets = tegra_wm8903_dapm_widgets,
|
|
@@ -368,9 +372,6 @@ static int tegra_wm8903_driver_remove(struct platform_device *pdev)
|
|
|
struct snd_soc_card *card = platform_get_drvdata(pdev);
|
|
|
struct tegra_wm8903 *machine = snd_soc_card_get_drvdata(card);
|
|
|
|
|
|
- snd_soc_jack_free_gpios(&tegra_wm8903_hp_jack, 1,
|
|
|
- &tegra_wm8903_hp_jack_gpio);
|
|
|
-
|
|
|
snd_soc_unregister_card(card);
|
|
|
|
|
|
tegra_asoc_utils_fini(&machine->util_data);
|