ASoC: tegra: Notify SAR about speaker state
[linux-3.10.git] / sound / soc / tegra-alt / tegra_t210ref_mobile_es755_alt.c
index e3a8bd2..b87118b 100644 (file)
@@ -35,7 +35,9 @@
 #include <linux/pm_runtime.h>
 #include <mach/tegra_asoc_pdata.h>
 #include <mach/tegra_rt5640_pdata.h>
-
+#ifdef CONFIG_NVS_IQS2X3
+#include <linux/nvs_iqs2x3.h>
+#endif
 #include <sound/core.h>
 #include <sound/jack.h>
 #include <sound/pcm.h>
@@ -540,6 +542,10 @@ static int tegra_t210ref_event_int_spk(struct snd_soc_dapm_widget *w,
                                sysedp_set_state(machine->sysedpc, 0);
                }
        }
+#ifdef CONFIG_NVS_IQS2X3
+       /* Notify SAR about speaker enable/disable */
+       sar_external_status(!!SND_SOC_DAPM_EVENT_ON(event));
+#endif
 
        if (!(machine->gpio_requested & GPIO_SPKR_EN))
                return 0;