summaryrefslogtreecommitdiff
path: root/sound/soc/tegra/tegra_wm8753.c
diff options
context:
space:
mode:
authorNikesh Oswal <noswal@nvidia.com>2011-10-10 20:01:12 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:49:17 -0800
commit642165625a6d6d9d704b5d4f689ae3415d000fa4 (patch)
tree759bcfd3b21cc334166601bd4c17ea1bb85f2d7a /sound/soc/tegra/tegra_wm8753.c
parenta9355477df9ef91849362fb176c990c69967bb93 (diff)
asoc: tegra: wm8753: add jack notifier code
Bug: 862023 Change-Id: I1429549d5fd0d365075ca798430ab7a9274b0aa9 Signed-off-by: Nikesh Oswal <noswal@nvidia.com> Reviewed-on: http://git-master/r/57052 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: R22a1d25c0bb04f0fbd26b6305b2a90a66508740a
Diffstat (limited to 'sound/soc/tegra/tegra_wm8753.c')
-rw-r--r--sound/soc/tegra/tegra_wm8753.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/sound/soc/tegra/tegra_wm8753.c b/sound/soc/tegra/tegra_wm8753.c
index c80160e8438f..2bfb458fb1d2 100644
--- a/sound/soc/tegra/tegra_wm8753.c
+++ b/sound/soc/tegra/tegra_wm8753.c
@@ -146,13 +146,6 @@ static struct snd_soc_jack_pin tegra_wm8753_hp_jack_pins[] = {
},
};
-static struct snd_soc_jack_gpio tegra_wm8753_hp_jack_gpio = {
- .name = "headphone detect",
- .report = SND_JACK_HEADPHONE,
- .debounce_time = 150,
- .invert = 0,
-};
-
static int tegra_wm8753_event_int_spk(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *k, int event)
{
@@ -309,17 +302,13 @@ static int tegra_wm8753_init(struct snd_soc_pcm_runtime *rtd)
snd_soc_dapm_add_routes(dapm, whistler_audio_map,
ARRAY_SIZE(whistler_audio_map));
- if (gpio_is_valid(pdata->gpio_hp_det)) {
- tegra_wm8753_hp_jack_gpio.gpio = pdata->gpio_hp_det;
- snd_soc_jack_new(codec, "Headphone Jack", SND_JACK_HEADPHONE,
- &tegra_wm8753_hp_jack);
- snd_soc_jack_add_pins(&tegra_wm8753_hp_jack,
- ARRAY_SIZE(tegra_wm8753_hp_jack_pins),
- tegra_wm8753_hp_jack_pins);
- snd_soc_jack_add_gpios(&tegra_wm8753_hp_jack,
- 1,
- &tegra_wm8753_hp_jack_gpio);
- }
+ snd_soc_jack_new(codec, "Headphone Jack", SND_JACK_HEADPHONE,
+ &tegra_wm8753_hp_jack);
+ wm8753_headphone_detect(codec, &tegra_wm8753_hp_jack,
+ SND_JACK_HEADPHONE, pdata->debounce_time_hp);
+ snd_soc_jack_add_pins(&tegra_wm8753_hp_jack,
+ ARRAY_SIZE(tegra_wm8753_hp_jack_pins),
+ tegra_wm8753_hp_jack_pins);
snd_soc_dapm_nc_pin(dapm, "ACIN");
snd_soc_dapm_nc_pin(dapm, "ACOP");