[Rebase from R2]audio: mfld_machine: Added correct ignore suspend call for headphones
authorOmair Mohammed Abdullah <omair.m.abdullah@intel.com>
Wed, 14 Dec 2011 14:15:39 +0000 (19:45 +0530)
committerbuildbot <buildbot@intel.com>
Fri, 13 Jan 2012 09:39:51 +0000 (01:39 -0800)
BZ: 19775

** Correcting the bugzilla id for R3 Merge
old-bugid :16450
A button press on the HS in S3 state lead to the headphone downlink path
being shutdown. This was due to the ignore_suspend flag not being set for the
proper widget.

Added an ignore suspend flag for the proper widget (Headphones, not HPOUTL/R).

Also, DMIC3 is not used, so disabled that pin. An unused variable
(mfld_jack_pins) is removed.

Change-Id: I3d5fa711f236e2479ec9af2908454498bee2d9fc
Signed-off-by: Omair Mohammed Abdullah <omair.m.abdullah@intel.com>
Reviewed-on: http://android.intel.com:8080/27328
Reviewed-by: M, Arulselvan <arulselvan.m@intel.com>
Tested-by: M, Arulselvan <arulselvan.m@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
sound/soc/mid-x86/mfld_machine.c

index e6d3294..52c00b0 100644 (file)
@@ -69,18 +69,6 @@ struct mfld_mc_private {
 
 static struct snd_soc_jack mfld_jack;
 
-/*Headset jack detection DAPM pins */
-static struct snd_soc_jack_pin mfld_jack_pins[] = {
-       {
-               .pin = "Headphones",
-               .mask = SND_JACK_HEADPHONE,
-       },
-       {
-               .pin = "AMIC1",
-               .mask = SND_JACK_MICROPHONE,
-       },
-};
-
 /* jack detection voltage zones */
 static struct snd_soc_jack_zone mfld_zones[] = {
        {MFLD_MV_START, MFLD_MV_AM_HS, SND_JACK_HEADPHONE},
@@ -255,7 +243,7 @@ static const struct snd_soc_dapm_widget mfld_widgets[] = {
 static const struct snd_soc_dapm_route mfld_map[] = {
        {"Headphones", NULL, "HPOUTR"},
        {"Headphones", NULL, "HPOUTL"},
-       {"Mic", NULL, "AMIC1"},
+       {"AMIC1", NULL, "Mic"},
 };
 
 static void mfld_jack_check(unsigned int intr_status)
@@ -311,6 +299,7 @@ static int mfld_init(struct snd_soc_pcm_runtime *runtime)
        snd_soc_dapm_disable_pin(dapm, "LINEINL");
        snd_soc_dapm_disable_pin(dapm, "LINEINR");
        snd_soc_dapm_disable_pin(dapm, "DMIC2");
+       snd_soc_dapm_disable_pin(dapm, "DMIC3");
        snd_soc_dapm_disable_pin(dapm, "DMIC4");
        snd_soc_dapm_disable_pin(dapm, "DMIC6");
        snd_soc_dapm_disable_pin(dapm, "AMIC2");
@@ -320,14 +309,12 @@ static int mfld_init(struct snd_soc_pcm_runtime *runtime)
        snd_soc_dapm_ignore_suspend(dapm, "PCM1_IN");
        snd_soc_dapm_ignore_suspend(dapm, "PCM1_Out");
        snd_soc_dapm_ignore_suspend(dapm, "EPOUT");
-       snd_soc_dapm_ignore_suspend(dapm, "HPOUTL");
-       snd_soc_dapm_ignore_suspend(dapm, "HPOUTR");
        snd_soc_dapm_ignore_suspend(dapm, "IHFOUTL");
        snd_soc_dapm_ignore_suspend(dapm, "IHFOUTR");
        snd_soc_dapm_ignore_suspend(dapm, "DMIC1");
-       snd_soc_dapm_ignore_suspend(dapm, "DMIC3");
        snd_soc_dapm_ignore_suspend(dapm, "DMIC5");
-       snd_soc_dapm_ignore_suspend(dapm, "AMIC1");
+       snd_soc_dapm_ignore_suspend(dapm, "Headphones");
+       snd_soc_dapm_ignore_suspend(dapm, "Mic");
        snd_soc_dapm_sync(dapm);
        /* Headset and button jack detection */
        ret_val = snd_soc_jack_new(codec, "Intel(R) MID Audio Jack",