diff options
author | Johnny Qiu <joqiu@nvidia.com> | 2013-07-06 00:02:20 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 13:30:39 -0700 |
commit | e74705f9abcb83acb1800e359a2c047dcc4a00a0 (patch) | |
tree | ad3a325d4f38a7885b4817c2ecb8efd5ee0a8e0a /sound | |
parent | ee6f974b2b37e560899cff3aa7dfd74acaa4ead0 (diff) |
asoc: tegra: rt5639/rt5645: add hp_det polarity
Change-Id: Ieac78ab76320c7d0161f351375e577afe063a95c
Signed-off-by: Johnny Qiu <joqiu@nvidia.com>
Reviewed-on: http://git-master/r/245782
Reviewed-by: Nikesh Oswal <noswal@nvidia.com>
Tested-by: Nikesh Oswal <noswal@nvidia.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/tegra/tegra_rt5639.c | 3 | ||||
-rw-r--r-- | sound/soc/tegra/tegra_rt5645.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sound/soc/tegra/tegra_rt5639.c b/sound/soc/tegra/tegra_rt5639.c index 22be59bcc6b9..305dae7993d1 100644 --- a/sound/soc/tegra/tegra_rt5639.c +++ b/sound/soc/tegra/tegra_rt5639.c @@ -403,7 +403,6 @@ static struct snd_soc_jack_gpio tegra_rt5639_hp_jack_gpio = { .name = "headphone detect", .report = SND_JACK_HEADPHONE, .debounce_time = 150, - .invert = 1, }; #ifdef CONFIG_SWITCH @@ -621,6 +620,8 @@ static int tegra_rt5639_init(struct snd_soc_pcm_runtime *rtd) if (gpio_is_valid(pdata->gpio_hp_det)) { tegra_rt5639_hp_jack_gpio.gpio = pdata->gpio_hp_det; + tegra_rt5639_hp_jack_gpio.invert = + !pdata->gpio_hp_det_active_high; snd_soc_jack_new(codec, "Headphone Jack", SND_JACK_HEADPHONE, &tegra_rt5639_hp_jack); #ifndef CONFIG_SWITCH diff --git a/sound/soc/tegra/tegra_rt5645.c b/sound/soc/tegra/tegra_rt5645.c index cfe696d33d57..a1d8afe94ba0 100644 --- a/sound/soc/tegra/tegra_rt5645.c +++ b/sound/soc/tegra/tegra_rt5645.c @@ -404,7 +404,6 @@ static struct snd_soc_jack_gpio tegra_rt5645_hp_jack_gpio = { .name = "headphone detect", .report = SND_JACK_HEADPHONE, .debounce_time = 150, - .invert = 1, }; #ifdef CONFIG_SWITCH @@ -626,6 +625,8 @@ static int tegra_rt5645_init(struct snd_soc_pcm_runtime *rtd) if (gpio_is_valid(pdata->gpio_hp_det)) { tegra_rt5645_hp_jack_gpio.gpio = pdata->gpio_hp_det; + tegra_rt5645_hp_jack_gpio.invert = + !pdata->gpio_hp_det_active_high; snd_soc_jack_new(codec, "Headphone Jack", SND_JACK_HEADPHONE, &tegra_rt5645_hp_jack); #ifndef CONFIG_SWITCH |