diff options
author | Oliver Brown <oliver.brown@freescale.com> | 2012-01-24 16:20:40 -0600 |
---|---|---|
committer | Oliver Brown <oliver.brown@freescale.com> | 2012-01-24 16:32:41 -0600 |
commit | 221fa518594805de5a3feb314c97e799bbd3fbeb (patch) | |
tree | 165107442897cff5032545f079fb773993103392 | |
parent | 76bde7c7c6a1a8cf3a6a752f92bb0b7d58766096 (diff) |
ENGR00172675: Speaker not controlled by headphone jack detect.
Added an "Ext Spk" (speaker) jack to the hs_jack_pins structure to
disable/enable the speaker when the jack is inserted/removed.
Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
-rw-r--r-- | sound/soc/imx/imx-sgtl5000.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sound/soc/imx/imx-sgtl5000.c b/sound/soc/imx/imx-sgtl5000.c index 6666d74dee88..49c2934a44b9 100644 --- a/sound/soc/imx/imx-sgtl5000.c +++ b/sound/soc/imx/imx-sgtl5000.c @@ -43,7 +43,12 @@ static struct snd_soc_jack_pin hs_jack_pins[] = { .pin = "Headphone Jack", .mask = SND_JACK_HEADPHONE, }, -}; + { + .pin = "Ext Spk", + .mask = SND_JACK_HEADPHONE, + .invert = 1, + }, + }; /* Headphones jack detection gpios */ static struct snd_soc_jack_gpio hs_jack_gpios[] = { @@ -264,7 +269,8 @@ static int imx_3stack_sgtl5000_init(struct snd_soc_pcm_runtime *rtd) snd_soc_dapm_add_routes(&codec->dapm, audio_map, ARRAY_SIZE(audio_map)); snd_soc_dapm_disable_pin(&codec->dapm, "Line In Jack"); - snd_soc_dapm_enable_pin(&codec->dapm, "Headphone Jack"); + snd_soc_dapm_disable_pin(&codec->dapm, "Headphone Jack"); + snd_soc_dapm_enable_pin(&codec->dapm, "Ext Spk"); snd_soc_dapm_sync(&codec->dapm); if (hs_jack_gpios[0].gpio != -1) { |