Merge remote-tracking branches 'asoc/topic/rt5670', 'asoc/topic/rt5677', 'asoc/topic...
[firefly-linux-kernel-4.4.55.git] / sound / soc / codecs / rt5677.c
index 26fc538f03b19a9690a0c208b44fa13bb273f397..5d0bb8748dd1df5cd6a262d7e3a925fe4b4b5efd 100644 (file)
@@ -702,6 +702,9 @@ static int rt5677_set_dsp_vad(struct snd_soc_codec *codec, bool on)
        static bool activity;
        int ret;
 
+       if (!IS_ENABLED(CONFIG_SND_SOC_RT5677_SPI))
+               return -ENXIO;
+
        if (on && !activity) {
                activity = true;