summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-jack.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-12-04 16:22:41 +0100
committerTakashi Iwai <tiwai@suse.de>2009-12-04 16:22:41 +0100
commitbaf9226667734579e344f612ed39f727079cad51 (patch)
tree9744efb5f1838ea73b695a0ab862547fdcf92ecf /sound/soc/soc-jack.c
parent57648cd52b1848c6885bdbd948d113d52f3ddd43 (diff)
parent43f0de8d0298e624e6c3bf2185b6003a59b331bd (diff)
downloadblackbird-op-linux-baf9226667734579e344f612ed39f727079cad51.tar.gz
blackbird-op-linux-baf9226667734579e344f612ed39f727079cad51.zip
Merge branch 'topic/asoc' into for-linus
Diffstat (limited to 'sound/soc/soc-jack.c')
-rw-r--r--sound/soc/soc-jack.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
index 1d455ab79490..3c07a94c2e30 100644
--- a/sound/soc/soc-jack.c
+++ b/sound/soc/soc-jack.c
@@ -58,7 +58,7 @@ EXPORT_SYMBOL_GPL(snd_soc_jack_new);
*/
void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask)
{
- struct snd_soc_codec *codec = jack->card->codec;
+ struct snd_soc_codec *codec;
struct snd_soc_jack_pin *pin;
int enable;
int oldstatus;
@@ -67,6 +67,7 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask)
WARN_ON_ONCE(!jack);
return;
}
+ codec = jack->card->codec;
mutex_lock(&codec->mutex);
@@ -162,6 +163,9 @@ static void snd_soc_jack_gpio_detect(struct snd_soc_jack_gpio *gpio)
else
report = 0;
+ if (gpio->jack_status_check)
+ report = gpio->jack_status_check();
+
snd_soc_jack_report(jack, report, gpio->report);
}
OpenPOWER on IntegriCloud