ASoC: topology: ABI - Add voice wake up flag for DAI links
authorMengdong Lin <mengdong.lin@linux.intel.com>
Wed, 2 Nov 2016 17:05:32 +0000 (01:05 +0800)
committerMark Brown <broonie@kernel.org>
Fri, 4 Nov 2016 17:36:39 +0000 (11:36 -0600)
Add a new flag bit SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP to link flags.
If a link is used for voice wake up, users can set this flag bit and
topology will set the link's 'ignore_suspend' to true.

This ABI update is backward compatible.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
include/uapi/sound/asoc.h
sound/soc/soc-topology.c

index 3c3fcc86b9f4d1ad0dccec82a64e8860b760f347..6a4280c6e860383d30da0967a85a2b9391ecc12d 100644 (file)
 #define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_RATES         (1 << 0)
 #define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_CHANNELS      (1 << 1)
 #define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_SAMPLEBITS    (1 << 2)
+#define SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP            (1 << 3)
 
 /*
  * Block Header.
index f44f12eb1798a26aa0ee6e8723e78c8c33a71c37..8772fd994e82b6f17c9903a6a71d15080c20a10e 100644 (file)
@@ -1701,6 +1701,11 @@ static void set_link_flags(struct snd_soc_dai_link *link,
                link->symmetric_samplebits =
                        flags & SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_SAMPLEBITS ?
                        1 : 0;
+
+       if (flag_mask & SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP)
+               link->ignore_suspend =
+               flags & SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP ?
+               1 : 0;
 }
 
 /* create the FE DAI link */