Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262947
b: refs/heads/master
c: 29591ed
h: refs/heads/master
i:
  262945: 7415174
  262943: 0f5cb86
v: v3
  • Loading branch information
Stephen Warren authored and Mark Brown committed Aug 9, 2011
1 parent a0b5d7c commit f659761
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a96edd59b2bc88b3d1ea47e0ba48076d65db9302
refs/heads/master: 29591ed4ac6fe00e3ff23b5be0cdc7016ef9c47e
15 changes: 11 additions & 4 deletions trunk/sound/soc/tegra/tegra_wm8903.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
#define GPIO_HP_MUTE BIT(1)
#define GPIO_INT_MIC_EN BIT(2)
#define GPIO_EXT_MIC_EN BIT(3)
#define GPIO_HP_DET BIT(4)

struct tegra_wm8903 {
struct tegra_asoc_utils_data util_data;
Expand Down Expand Up @@ -304,6 +305,7 @@ static int tegra_wm8903_init(struct snd_soc_pcm_runtime *rtd)
snd_soc_jack_add_gpios(&tegra_wm8903_hp_jack,
1,
&tegra_wm8903_hp_jack_gpio);
machine->gpio_requested |= GPIO_HP_DET;
}

snd_soc_jack_new(codec, "Mic Jack", SND_JACK_MICROPHONE,
Expand Down Expand Up @@ -429,10 +431,10 @@ static int __devexit tegra_wm8903_driver_remove(struct platform_device *pdev)
struct tegra_wm8903 *machine = snd_soc_card_get_drvdata(card);
struct tegra_wm8903_platform_data *pdata = machine->pdata;

snd_soc_unregister_card(card);

tegra_asoc_utils_fini(&machine->util_data);

if (machine->gpio_requested & GPIO_HP_DET)
snd_soc_jack_free_gpios(&tegra_wm8903_hp_jack,
1,
&tegra_wm8903_hp_jack_gpio);
if (machine->gpio_requested & GPIO_EXT_MIC_EN)
gpio_free(pdata->gpio_ext_mic_en);
if (machine->gpio_requested & GPIO_INT_MIC_EN)
Expand All @@ -441,6 +443,11 @@ static int __devexit tegra_wm8903_driver_remove(struct platform_device *pdev)
gpio_free(pdata->gpio_hp_mute);
if (machine->gpio_requested & GPIO_SPKR_EN)
gpio_free(pdata->gpio_spkr_en);
machine->gpio_requested = 0;

snd_soc_unregister_card(card);

tegra_asoc_utils_fini(&machine->util_data);

kfree(machine);

Expand Down

0 comments on commit f659761

Please sign in to comment.