diff options
| author | codeworkx <codeworkx@cyanogenmod.com> | 2012-09-22 09:48:20 +0200 |
|---|---|---|
| committer | codeworkx <codeworkx@cyanogenmod.com> | 2012-09-22 14:02:16 +0200 |
| commit | 2489007e7d740ccbc3e0a202914e243ad5178787 (patch) | |
| tree | b8e6380ea7b1da63474ad68a5dba997e01146043 /sound/soc/soc-jack.c | |
| parent | 5f67568eb31e3a813c7c52461dcf66ade15fc2e7 (diff) | |
| download | kernel_samsung_smdk4412-2489007e7d740ccbc3e0a202914e243ad5178787.tar.gz kernel_samsung_smdk4412-2489007e7d740ccbc3e0a202914e243ad5178787.tar.bz2 kernel_samsung_smdk4412-2489007e7d740ccbc3e0a202914e243ad5178787.zip | |
merge opensource jb u5
Change-Id: I1aaec157aa196f3448eff8636134fce89a814cf2
Diffstat (limited to 'sound/soc/soc-jack.c')
| -rw-r--r-- | sound/soc/soc-jack.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c index 59984f28627..004558ffefc 100644 --- a/sound/soc/soc-jack.c +++ b/sound/soc/soc-jack.c @@ -23,13 +23,17 @@ #include <linux/jack.h> #endif +#ifdef CONFIG_SWITCH #include <linux/switch.h> +#endif #include <linux/sec_jack.h> +#ifdef CONFIG_SWITCH /* Android jack detection */ static struct switch_dev android_switch = { .name = "h2w", }; +#endif /** @@ -53,7 +57,9 @@ int snd_soc_jack_new(struct snd_soc_codec *codec, const char *id, int type, INIT_LIST_HEAD(&jack->jack_zones); BLOCKING_INIT_NOTIFIER_HEAD(&jack->notifier); +#ifdef CONFIG_SWITCH switch_dev_register(&android_switch); +#endif return snd_jack_new(codec->card->snd_card, id, type, &jack->jack); } @@ -81,6 +87,7 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask) int enable; int oldstatus; +#ifdef CONFIG_SWITCH if (mask & SND_JACK_HEADSET) { if (status & SND_JACK_MICROPHONE) switch_set_state(&android_switch, SEC_HEADSET_4POLE); @@ -89,6 +96,7 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask) else switch_set_state(&android_switch, SEC_JACK_NO_DEVICE); } +#endif #ifdef CONFIG_JACK_MON if (mask & SND_JACK_HEADSET) { |
