[alsa-devel] [PATCH v7 11/11] ASoC: topology: ABI - Add voice wake up flag for DAI links
mengdong.lin at linux.intel.com
mengdong.lin at linux.intel.com
Wed Nov 2 18:05:32 CET 2016
From: Mengdong Lin <mengdong.lin at linux.intel.com>
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 at linux.intel.com>
diff --git a/include/uapi/sound/asoc.h b/include/uapi/sound/asoc.h
index 3c3fcc8..6a4280c 100644
--- a/include/uapi/sound/asoc.h
+++ b/include/uapi/sound/asoc.h
@@ -155,6 +155,7 @@
#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.
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index f44f12e..8772fd9 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -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 */
--
2.7.4
More information about the Alsa-devel
mailing list