All of lore.kernel.org
 help / color / mirror / Atom feed
From: mengdong.lin@linux.intel.com
To: alsa-devel@alsa-project.org, broonie@kernel.org
Cc: Mengdong Lin <mengdong.lin@linux.intel.com>,
	tiwai@suse.de, mengdong.lin@intel.com,
	guneshwor.o.singh@intel.com, liam.r.girdwood@linux.intel.com,
	vinod.koul@intel.com, hardik.t.shah@intel.com
Subject: [PATCH 03/13] ASoC: topology: ABI - Define DPCM trigger ordering for PCM
Date: Fri, 19 Aug 2016 18:12:55 +0800	[thread overview]
Message-ID: <24428c2714d09062f3ace5803679c743d36afb04.1471599648.git.mengdong.lin@linux.intel.com> (raw)
In-Reply-To: <cover.1471599648.git.mengdong.lin@linux.intel.com>

From: Mengdong Lin <mengdong.lin@linux.intel.com>

Definition of dynamic PCM trigger ordering is exposed to uapi asoc.h,
and topology allows user space to define the trigger ordering for PCM
(FE links).

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>

diff --git a/include/sound/soc-dpcm.h b/include/sound/soc-dpcm.h
index 8060590..428ae95 100644
--- a/include/sound/soc-dpcm.h
+++ b/include/sound/soc-dpcm.h
@@ -52,19 +52,6 @@ enum snd_soc_dpcm_state {
 };
 
 /*
- * Dynamic PCM trigger ordering. Triggering flexibility is required as some
- * DSPs require triggering before/after their CPU platform and DAIs.
- *
- * i.e. some clients may want to manually order this call in their PCM
- * trigger() whilst others will just use the regular core ordering.
- */
-enum snd_soc_dpcm_trigger {
-	SND_SOC_DPCM_TRIGGER_PRE		= 0,
-	SND_SOC_DPCM_TRIGGER_POST,
-	SND_SOC_DPCM_TRIGGER_BESPOKE,
-};
-
-/*
  * Dynamic PCM link
  * This links together a FE and BE DAI at runtime and stores the link
  * state information and the hw_params configuration.
diff --git a/include/uapi/sound/asoc.h b/include/uapi/sound/asoc.h
index 33d00a4..db0edfb 100644
--- a/include/uapi/sound/asoc.h
+++ b/include/uapi/sound/asoc.h
@@ -131,6 +131,19 @@
 #define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_SAMPLEBITS    (1 << 2)
 
 /*
+ * Dynamic PCM trigger ordering. Triggering flexibility is required as some
+ * DSPs require triggering before/after their CPU platform and DAIs.
+ *
+ * i.e. some clients may want to manually order this call in their PCM
+ * trigger() whilst others will just use the regular core ordering.
+ */
+enum snd_soc_dpcm_trigger {
+	SND_SOC_DPCM_TRIGGER_PRE		= 0,
+	SND_SOC_DPCM_TRIGGER_POST,
+	SND_SOC_DPCM_TRIGGER_BESPOKE,
+};
+
+/*
  * Block Header.
  * This header precedes all object and object arrays below.
  */
@@ -440,6 +453,7 @@ struct snd_soc_tplg_pcm {
 	struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for DAI link */
 	__le32 num_streams;	/* number of streams */
 	struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI */
+	__le32 trigger[2];	/* SND_SOC_DPCM_TRIGGER_ trigger flag for playback & capture */
 } __attribute__((packed));
 
 
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index b271248..6802151 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -1645,6 +1645,9 @@ static int soc_tplg_link_create(struct soc_tplg *tplg,
 	link->dpcm_playback = pcm->playback;
 	link->dpcm_capture = pcm->capture;
 
+	link->trigger[0] = pcm->trigger[0];
+	link->trigger[1] = pcm->trigger[1];
+
 	/* pass control to component driver for optional further init */
 	ret = soc_tplg_dai_link_load(tplg, link);
 	if (ret < 0) {
-- 
2.5.0

  parent reply	other threads:[~2016-08-19 10:07 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-19 10:11 [PATCH 00/13] ASoC: topology: Remaining kernel patches mengdong.lin
2016-08-19 10:12 ` [PATCH 01/13] ASoC: topology: Able to create BE DAIs mengdong.lin
2016-08-23 17:33   ` Mark Brown
2016-08-25  6:40     ` Mengdong Lin
2016-08-28 14:12       ` Mark Brown
2016-08-30  4:42         ` Mengdong Lin
2016-09-05 13:04           ` Mark Brown
2016-08-19 10:12 ` [PATCH 02/13] ASoC: topology: ABI - Add sig_bits to stream caps mengdong.lin
2016-08-22 17:59   ` Applied "ASoC: topology: ABI - Add sig_bits to stream caps" to the asoc tree Mark Brown
2016-08-19 10:12 ` mengdong.lin [this message]
2016-08-23 17:41   ` [PATCH 03/13] ASoC: topology: ABI - Define DPCM trigger ordering for PCM Mark Brown
2016-08-25  8:35     ` Mengdong Lin
2016-09-02  6:44     ` Mengdong Lin
2016-09-05 13:01       ` Mark Brown
2016-09-06  6:15       ` Mengdong Lin
2016-09-09 11:40         ` Mengdong Lin
2016-08-19 10:13 ` [PATCH 04/13] ASoC: topology: ABI - Add flags to PCM mengdong.lin
2016-08-19 10:13 ` [PATCH 05/13] ASoC: topology: ABI - Add private data " mengdong.lin
2016-08-19 10:13 ` [PATCH 06/13] ASoC: topology: Add FE DAIs only if not already added mengdong.lin
2016-08-19 10:13 ` [PATCH 07/13] ASoC: topology: ABI - Add name & component info to BE/CC links mengdong.lin
2016-08-19 10:13 ` [PATCH 08/13] ASoC: topology: ABI - Define DAI physical PCM data formats mengdong.lin
2016-08-19 10:13 ` [PATCH 09/13] ASoC: topology: ABI - Add HW configurations to BE/CC links mengdong.lin
2016-08-19 10:14 ` [PATCH 10/13] ASoC: topology: ABI - Add flags and private data " mengdong.lin
2016-08-19 10:14 ` [PATCH 11/13] ASoC: Define API to find a dai link by id mengdong.lin
2016-08-19 10:14 ` [PATCH 12/13] ASoC: Probe link components after finding new links mengdong.lin
2016-08-19 10:14 ` [PATCH 13/13] ASoC: topology: Able to create BE DAI links mengdong.lin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=24428c2714d09062f3ace5803679c743d36afb04.1471599648.git.mengdong.lin@linux.intel.com \
    --to=mengdong.lin@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=guneshwor.o.singh@intel.com \
    --cc=hardik.t.shah@intel.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=mengdong.lin@intel.com \
    --cc=tiwai@suse.de \
    --cc=vinod.koul@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.