summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMengdong Lin <mengdong.lin@linux.intel.com>2016-11-02 13:05:32 -0400
committerMark Brown <broonie@kernel.org>2016-11-04 13:36:39 -0400
commit6ff67ccafdf4c782489de1ccc47e1ec8d8480b63 (patch)
tree7c5b2dd68e20254ba3c2416b4b153b7542a17889
parent9aa3f03473ce1187062bb0c68aeacf7b3ac52831 (diff)
ASoC: topology: ABI - Add voice wake up flag for DAI links
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>
-rw-r--r--include/uapi/sound/asoc.h1
-rw-r--r--sound/soc/soc-topology.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/include/uapi/sound/asoc.h b/include/uapi/sound/asoc.h
index 3c3fcc86b9f4..6a4280c6e860 100644
--- a/include/uapi/sound/asoc.h
+++ b/include/uapi/sound/asoc.h
@@ -155,6 +155,7 @@
155#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_RATES (1 << 0) 155#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_RATES (1 << 0)
156#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_CHANNELS (1 << 1) 156#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_CHANNELS (1 << 1)
157#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_SAMPLEBITS (1 << 2) 157#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_SAMPLEBITS (1 << 2)
158#define SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP (1 << 3)
158 159
159/* 160/*
160 * Block Header. 161 * Block Header.
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index f44f12eb1798..8772fd994e82 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,
1701 link->symmetric_samplebits = 1701 link->symmetric_samplebits =
1702 flags & SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_SAMPLEBITS ? 1702 flags & SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_SAMPLEBITS ?
1703 1 : 0; 1703 1 : 0;
1704
1705 if (flag_mask & SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP)
1706 link->ignore_suspend =
1707 flags & SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP ?
1708 1 : 0;
1704} 1709}
1705 1710
1706/* create the FE DAI link */ 1711/* create the FE DAI link */