ASoC: mid-x86: Use the soc-jack apis for jack type detection

This patch modifies the mfld_machine to use the new jack apis for adding the
voltage zones for jack type detection. It also modifed TI sn95031 codec driver
to use these new apis

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Harsha Priya <priya.harsha@intel.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
diff --git a/sound/soc/codecs/sn95031.c b/sound/soc/codecs/sn95031.c
index 4cc0017..d0b7802 100644
--- a/sound/soc/codecs/sn95031.c
+++ b/sound/soc/codecs/sn95031.c
@@ -782,9 +782,7 @@
 {
 	int micbias = sn95031_get_mic_bias(mfld_jack->codec);
 
-	/* Defaulting to HEADSET for now.
-	 * will change after adding soc-jack detection apis */
-	int jack_type = SND_JACK_HEADSET;
+	int jack_type = snd_soc_jack_get_type(mfld_jack, micbias);
 
 	pr_debug("jack type detected = %d\n", jack_type);
 	if (jack_type == SND_JACK_HEADSET)