All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: alsa-devel@alsa-project.org
Cc: liam.r.girdwood@linux.intel.com, patches.audio@intel.com,
	broonie@kernel.org, Vinod Koul <vinod.koul@intel.com>,
	Jayachandran B <jayachandran.b@intel.com>
Subject: [PATCH 07/10] ASoC: Intel: Skylake: Add support for specifying D0i3 configuration
Date: Mon, 26 Sep 2016 11:05:34 +0530	[thread overview]
Message-ID: <1474868137-29712-8-git-send-email-vinod.koul@intel.com> (raw)
In-Reply-To: <1474868137-29712-1-git-send-email-vinod.koul@intel.com>

Not all use cases can support Doi3. Only certain use cases like hot word
detection, deep buffering can support D0i3 based on resource requirement.

So, pass the D0i3 capability for the FE/BE copier using topology. This will
be used to take a decision for D0i3 mode entry/exit.

Signed-off-by: Jayachandran B <jayachandran.b@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 include/uapi/sound/snd_sst_tokens.h    | 5 ++++-
 sound/soc/intel/skylake/skl-topology.c | 4 ++++
 sound/soc/intel/skylake/skl-topology.h | 7 +++++++
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/include/uapi/sound/snd_sst_tokens.h b/include/uapi/sound/snd_sst_tokens.h
index f4b8b34de519..93392bedcc58 100644
--- a/include/uapi/sound/snd_sst_tokens.h
+++ b/include/uapi/sound/snd_sst_tokens.h
@@ -159,6 +159,8 @@
  *
  * %SKL_TKN_U32_PMODE:		Specifies the power mode for pipe
  *
+ * %SKL_TKL_U32_D0I3_CAPS:	Specifies the D0i3 capability for module
+ *
  * module_id and loadable flags dont have tokens as these values will be
  * read from the DSP FW manifest
  */
@@ -211,7 +213,8 @@ enum SKL_TKNS {
 	SKL_TKN_U32_LIB_COUNT,
 	SKL_TKN_STR_LIB_NAME,
 	SKL_TKN_U32_PMODE,
-	SKL_TKN_MAX = SKL_TKN_U32_PMODE,
+	SKL_TKL_U32_D0I3_CAPS,
+	SKL_TKN_MAX = SKL_TKL_U32_D0I3_CAPS,
 };
 
 #endif
diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c
index 9a7a008f6689..86597d491982 100644
--- a/sound/soc/intel/skylake/skl-topology.c
+++ b/sound/soc/intel/skylake/skl-topology.c
@@ -1830,6 +1830,10 @@ static int skl_tplg_get_token(struct device *dev,
 		mconfig->converter = tkn_elem->value;
 		break;
 
+	case SKL_TKL_U32_D0I3_CAPS:
+		mconfig->d0i3_caps = tkn_elem->value;
+		break;
+
 	case SKL_TKN_U32_PIPE_ID:
 		ret = skl_tplg_add_pipe(dev,
 				mconfig, skl, tkn_elem);
diff --git a/sound/soc/intel/skylake/skl-topology.h b/sound/soc/intel/skylake/skl-topology.h
index 11fd0a4b6603..38809f6d20d6 100644
--- a/sound/soc/intel/skylake/skl-topology.h
+++ b/sound/soc/intel/skylake/skl-topology.h
@@ -294,6 +294,12 @@ enum skl_module_state {
 	SKL_MODULE_UNLOADED = 4,
 };
 
+enum d0i3_capability {
+	SKL_D0I3_NONE = 0,
+	SKL_D0I3_STREAMING = 1,
+	SKL_D0I3_NON_STREAMING = 2,
+};
+
 struct skl_module_cfg {
 	u8 guid[16];
 	struct skl_module_inst_id id;
@@ -320,6 +326,7 @@ struct skl_module_cfg {
 	u32 converter;
 	u32 vbus_id;
 	u32 mem_pages;
+	enum d0i3_capability d0i3_caps;
 	struct skl_module_pin *m_in_pin;
 	struct skl_module_pin *m_out_pin;
 	enum skl_module_type m_type;
-- 
1.9.1

  parent reply	other threads:[~2016-09-26  5:27 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-26  5:35 [PATCH 00/10] ASoC: Intel: Skylake: Add support for D0i3 Vinod Koul
2016-09-26  5:35 ` [PATCH 01/10] ASoC: Intel: Add check_dsp_lp_on callback on IPC Vinod Koul
2016-09-26  5:35 ` [PATCH 02/10] ASoC: Intel: Add sst_ipc_tx_message_nopm Vinod Koul
2016-10-28 18:05   ` Mark Brown
2016-10-30 21:37     ` Vinod Koul
2016-11-03 17:27   ` Applied "ASoC: Intel: Add sst_ipc_tx_message_nopm" to the asoc tree Mark Brown
2016-09-26  5:35 ` [PATCH 03/10] ASoC: Intel: Skylake: Add D0iX IPCs Vinod Koul
2016-10-28 18:06   ` Mark Brown
2016-10-30 21:40     ` Vinod Koul
2016-11-03 17:27   ` Applied "ASoC: Intel: Skylake: Add D0iX IPCs" to the asoc tree Mark Brown
2016-09-26  5:35 ` [PATCH 04/10] ASoC: Intel: Skylake: Add support for programming D0i3C Vinod Koul
2016-11-03 17:27   ` Applied "ASoC: Intel: Skylake: Add support for programming D0i3C" to the asoc tree Mark Brown
2016-09-26  5:35 ` [PATCH 05/10] ASoC: Intel: Skylake: Add D0iX callbacks Vinod Koul
2016-11-03 17:26   ` Applied "ASoC: Intel: Skylake: Add D0iX callbacks" to the asoc tree Mark Brown
2016-09-26  5:35 ` [PATCH 06/10] ASoC: Intel: Skylake: Add support for LPMode Vinod Koul
2016-11-03 17:26   ` Applied "ASoC: Intel: Skylake: Add support for LPMode" to the asoc tree Mark Brown
2016-09-26  5:35 ` Vinod Koul [this message]
2016-11-03 17:26   ` Applied "ASoC: Intel: Skylake: Add support for specifying D0i3 configuration" " Mark Brown
2016-09-26  5:35 ` [PATCH 08/10] ASoC: Intel: Skylake: Add D0i3 mode ref counting Vinod Koul
2016-11-03 17:26   ` Applied "ASoC: Intel: Skylake: Add D0i3 mode ref counting" to the asoc tree Mark Brown
2016-09-26  5:35 ` [PATCH 09/10] ASoC: Intel: Skylake: Flush pending D0i3 request on suspend Vinod Koul
2016-11-09 15:25   ` Applied "ASoC: Intel: Skylake: Flush pending D0i3 request on suspend" to the asoc tree Mark Brown
2016-09-26  5:35 ` [PATCH 10/10] ASoC: Intel: Skylake: remove pci device enabling calls on suspend Vinod Koul
2016-11-09 15:25   ` Applied "ASoC: Intel: Skylake: remove pci device enabling calls on suspend" to the asoc tree Mark Brown

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=1474868137-29712-8-git-send-email-vinod.koul@intel.com \
    --to=vinod.koul@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=jayachandran.b@intel.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=patches.audio@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.