All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Subhransu S. Prusty" <subhransu.s.prusty@intel.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, patches.audio@intel.com, broonie@kernel.org,
	"Subhransu S. Prusty" <subhransu.s.prusty@intel.com>,
	lgirdwood@gmail.com
Subject: [PATCH 5/6] ASoC: Intel: Skylake: Modify load_lib_ipc arguments for a nowait version
Date: Fri, 21 Apr 2017 20:28:12 +0530	[thread overview]
Message-ID: <1492786693-24167-6-git-send-email-subhransu.s.prusty@intel.com> (raw)
In-Reply-To: <1492786693-24167-1-git-send-email-subhransu.s.prusty@intel.com>

Kabylake uses code loader dma and wait on notification instead of ipc
reply for load library ipc status. So modify the argument of
skl_sst_ipc_load_library to check on flag to wait for ipc reply.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
---
 sound/soc/intel/skylake/bxt-sst.c     | 2 +-
 sound/soc/intel/skylake/skl-sst-ipc.c | 8 ++++++--
 sound/soc/intel/skylake/skl-sst-ipc.h | 2 +-
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/sound/soc/intel/skylake/bxt-sst.c b/sound/soc/intel/skylake/bxt-sst.c
index 2df7d104bfca..a7d1a3ffedcb 100644
--- a/sound/soc/intel/skylake/bxt-sst.c
+++ b/sound/soc/intel/skylake/bxt-sst.c
@@ -81,7 +81,7 @@ static unsigned int bxt_get_errorcode(struct sst_dsp *ctx)
 		memcpy(dmab.area, stripped_fw.data, stripped_fw.size);
 
 		ctx->dsp_ops.trigger(ctx->dev, true, stream_tag);
-		ret = skl_sst_ipc_load_library(&skl->ipc, dma_id, i);
+		ret = skl_sst_ipc_load_library(&skl->ipc, dma_id, i, true);
 		if (ret < 0)
 			dev_err(ctx->dev, "IPC Load Lib for %s fail: %d\n",
 					linfo[i].name, ret);
diff --git a/sound/soc/intel/skylake/skl-sst-ipc.c b/sound/soc/intel/skylake/skl-sst-ipc.c
index d51b483b4d79..c0226dd59445 100644
--- a/sound/soc/intel/skylake/skl-sst-ipc.c
+++ b/sound/soc/intel/skylake/skl-sst-ipc.c
@@ -971,7 +971,7 @@ int skl_ipc_get_large_config(struct sst_generic_ipc *ipc,
 EXPORT_SYMBOL_GPL(skl_ipc_get_large_config);
 
 int skl_sst_ipc_load_library(struct sst_generic_ipc *ipc,
-				u8 dma_id, u8 table_id)
+				u8 dma_id, u8 table_id, bool wait)
 {
 	struct skl_ipc_header header = {0};
 	u64 *ipc_header = (u64 *)(&header);
@@ -983,7 +983,11 @@ int skl_sst_ipc_load_library(struct sst_generic_ipc *ipc,
 	header.primary |= IPC_MOD_INSTANCE_ID(table_id);
 	header.primary |= IPC_MOD_ID(dma_id);
 
-	ret = sst_ipc_tx_message_wait(ipc, *ipc_header, NULL, 0, NULL, 0);
+	if (wait)
+		ret = sst_ipc_tx_message_wait(ipc, *ipc_header,
+					NULL, 0, NULL, 0);
+	else
+		ret = sst_ipc_tx_message_nowait(ipc, *ipc_header, NULL, 0);
 
 	if (ret < 0)
 		dev_err(ipc->dev, "ipc: load lib failed\n");
diff --git a/sound/soc/intel/skylake/skl-sst-ipc.h b/sound/soc/intel/skylake/skl-sst-ipc.h
index 4abf98c0e00e..e057da2713c6 100644
--- a/sound/soc/intel/skylake/skl-sst-ipc.h
+++ b/sound/soc/intel/skylake/skl-sst-ipc.h
@@ -197,7 +197,7 @@ int skl_ipc_get_large_config(struct sst_generic_ipc *ipc,
 		struct skl_ipc_large_config_msg *msg, u32 *param);
 
 int skl_sst_ipc_load_library(struct sst_generic_ipc *ipc,
-			u8 dma_id, u8 table_id);
+			u8 dma_id, u8 table_id, bool wait);
 
 int skl_ipc_set_d0ix(struct sst_generic_ipc *ipc,
 		struct skl_ipc_d0ix_msg *msg);
-- 
1.9.1

  parent reply	other threads:[~2017-04-21 15:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-21 14:58 [PATCH 0/6] ASoC: Intel: Skylake: Add loadable module support for Subhransu S. Prusty
2017-04-21 14:58 ` [PATCH 1/6] ASoC: Intel: Skylake: Move sst common initialization to a helper function Subhransu S. Prusty
2017-04-26 14:49   ` Applied "ASoC: Intel: Skylake: Move sst common initialization to a helper function" to the asoc tree Mark Brown
2017-04-21 14:58 ` [PATCH 2/6] ASoC: Intel: Skylake: Commonize library load Subhransu S. Prusty
2017-04-26 14:49   ` Applied "ASoC: Intel: Skylake: Commonize library load" to the asoc tree Mark Brown
2017-04-21 14:58 ` [PATCH 3/6] ASoC: Intel: Skylake: Modify arguments to reuse module transfer function Subhransu S. Prusty
2017-04-21 14:58 ` [PATCH 4/6] ASoC: Intel: Skylake: Register dsp_fw_ops for kabylake Subhransu S. Prusty
2017-04-26 14:49   ` Applied "ASoC: Intel: Skylake: Register dsp_fw_ops for kabylake" to the asoc tree Mark Brown
2017-04-21 14:58 ` Subhransu S. Prusty [this message]
2017-04-26 14:48   ` Applied "ASoC: Intel: Skylake: Modify load_lib_ipc arguments for a nowait version" " Mark Brown
2017-04-21 14:58 ` [PATCH 6/6] ASoC: Intel: Skylake: Add loadable module support on KBL platform Subhransu S. Prusty

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=1492786693-24167-6-git-send-email-subhransu.s.prusty@intel.com \
    --to=subhransu.s.prusty@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=patches.audio@intel.com \
    --cc=tiwai@suse.de \
    /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.