fb: adv7393: off by one in probe function
[deliverable/linux.git] / sound / soc / codecs / wm5110.c
index d54f1b46c9ec08107427ff0f6bf81bf4670103bb..156547026a40e86506b01b7d56c1d84c73239227 100644 (file)
@@ -1104,6 +1104,11 @@ SND_SOC_DAPM_INPUT("IN4R"),
 SND_SOC_DAPM_OUTPUT("DRC1 Signal Activity"),
 SND_SOC_DAPM_OUTPUT("DRC2 Signal Activity"),
 
+SND_SOC_DAPM_OUTPUT("DSP Voice Trigger"),
+
+SND_SOC_DAPM_SWITCH("DSP3 Voice Trigger", SND_SOC_NOPM, 2, 0,
+                   &arizona_voice_trigger_switch[2]),
+
 SND_SOC_DAPM_PGA_E("IN1L PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN1L_ENA_SHIFT,
                   0, NULL, 0, wm5110_in_ev,
                   SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD |
@@ -1998,10 +2003,16 @@ static const struct snd_soc_dapm_route wm5110_dapm_routes[] = {
 
        { "MICSUPP", NULL, "SYSCLK" },
 
+       { "DRC1 Signal Activity", NULL, "SYSCLK" },
+       { "DRC2 Signal Activity", NULL, "SYSCLK" },
        { "DRC1 Signal Activity", NULL, "DRC1L" },
        { "DRC1 Signal Activity", NULL, "DRC1R" },
        { "DRC2 Signal Activity", NULL, "DRC2L" },
        { "DRC2 Signal Activity", NULL, "DRC2R" },
+
+       { "DSP Voice Trigger", NULL, "SYSCLK" },
+       { "DSP Voice Trigger", NULL, "DSP3 Voice Trigger" },
+       { "DSP3 Voice Trigger", "Switch", "DSP3" },
 };
 
 static int wm5110_set_fll(struct snd_soc_codec *codec, int fll_id, int source,
@@ -2223,6 +2234,7 @@ static irqreturn_t wm5110_adsp2_irq(int irq, void *data)
 {
        struct wm5110_priv *priv = data;
        struct arizona *arizona = priv->core.arizona;
+       struct arizona_voice_trigger_info info;
        int serviced = 0;
        int i, ret;
 
@@ -2230,6 +2242,12 @@ static irqreturn_t wm5110_adsp2_irq(int irq, void *data)
                ret = wm_adsp_compr_handle_irq(&priv->core.adsp[i]);
                if (ret != -ENODEV)
                        serviced++;
+               if (ret == WM_ADSP_COMPR_VOICE_TRIGGER) {
+                       info.core = i;
+                       arizona_call_notifiers(arizona,
+                                              ARIZONA_NOTIFY_VOICE_TRIGGER,
+                                              &info);
+               }
        }
 
        if (!serviced) {
@@ -2252,6 +2270,7 @@ static int wm5110_codec_probe(struct snd_soc_codec *codec)
        arizona_init_spk(codec);
        arizona_init_gpio(codec);
        arizona_init_mono(codec);
+       arizona_init_notifiers(codec);
 
        ret = arizona_request_irq(arizona, ARIZONA_IRQ_DSP_IRQ1,
                                  "ADSP2 Compressed IRQ", wm5110_adsp2_irq,
This page took 0.03727 seconds and 5 git commands to generate.