diff mbox

[v7,11/11] ASoC: topology: ABI - Add voice wake up flag for DAI links

Message ID 4ec58db3621474cd8acf664483b18c30628f6cad.1478071138.git.mengdong.lin@linux.intel.com (mailing list archive)
State Accepted
Commit 6ff67ccafdf4c782489de1ccc47e1ec8d8480b63
Headers show

Commit Message

mengdong.lin@linux.intel.com Nov. 2, 2016, 5:05 p.m. UTC
From: Mengdong Lin <mengdong.lin@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@linux.intel.com>

Comments

Mark Brown Nov. 4, 2016, 5:36 p.m. UTC | #1
On Thu, Nov 03, 2016 at 01:05:32AM +0800, mengdong.lin@linux.intel.com wrote:
> From: Mengdong Lin <mengdong.lin@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.

So, as we discussed in person yesterday I'm not 100% convinced about the
name here - there are other applications that might want to use this
facility like other triggers or some sort of passthrough monitoring.
I'm drawing a bit of blank on better names right now...  I'm going to
apply this but we should continue to think about renaming.
Lin, Mengdong Nov. 5, 2016, 1:35 p.m. UTC | #2
> -----Original Message-----
> From: Mark Brown [mailto:broonie@kernel.org]
> Sent: Saturday, November 5, 2016 1:36 AM
> To: mengdong.lin@linux.intel.com
> Cc: alsa-devel@alsa-project.org; tiwai@suse.de;
> liam.r.girdwood@linux.intel.com; Shah, Hardik T <hardik.t.shah@intel.com>;
> Singh, Guneshwor O <guneshwor.o.singh@intel.com>; Koul, Vinod
> <vinod.koul@intel.com>; Ughreja, Rakesh A <rakesh.a.ughreja@intel.com>;
> Lin, Mengdong <mengdong.lin@intel.com>
> Subject: Re: [PATCH v7 11/11] ASoC: topology: ABI - Add voice wake up flag
> for DAI links
> 
> On Thu, Nov 03, 2016 at 01:05:32AM +0800, mengdong.lin@linux.intel.com
> wrote:
> > From: Mengdong Lin <mengdong.lin@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.
> 
> So, as we discussed in person yesterday I'm not 100% convinced about the
> name here - there are other applications that might want to use this facility
> like other triggers or some sort of passthrough monitoring.
> I'm drawing a bit of blank on better names right now...  I'm going to apply
> this but we should continue to think about renaming.

Okay. We'll rename this once we find a better name.

Thanks
Mengdong
diff mbox

Patch

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 */