From: jeeja.kp@intel.com
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, patches.audio@intel.com,
	GuruprasadX Pawse <guruprasadx.pawse@intel.com>,
	broonie@kernel.org, liam.r.girdwood@intel.com,
	Jeeja KP <jeeja.kp@intel.com>
Subject: [PATCH 1/2] ASoC: Intel: Skylake: Don't use dma I2S config structure in kernel
Date: Wed, 23 Nov 2016 22:46:26 +0530	[thread overview]
Message-ID: <1479921387-31248-1-git-send-email-jeeja.kp@intel.com> (raw)
From: GuruprasadX Pawse <guruprasadx.pawse@intel.com>
I2S blob config structure can change between DSP copier module versions.
We are not modifying these structures anyway and NHLT blobs specify them
properly, so use the blob directly to send the dma_control ipc instead
of using the predefined I2S blob config structure.
Signed-off-by: GuruprasadX Pawse <guruprasadx.pawse@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
---
 sound/soc/intel/skylake/skl-messages.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c
index 4ae021a..e79cbcf 100644
--- a/sound/soc/intel/skylake/skl-messages.c
+++ b/sound/soc/intel/skylake/skl-messages.c
@@ -527,16 +527,14 @@ static void skl_setup_cpr_gateway_cfg(struct skl_sst *ctx,
 int skl_dsp_set_dma_control(struct skl_sst *ctx, struct skl_module_cfg *mconfig)
 {
 	struct skl_dma_control *dma_ctrl;
-	struct skl_i2s_config_blob config_blob;
 	struct skl_ipc_large_config_msg msg = {0};
 	int err = 0;
 
 
 	/*
-	 * if blob size is same as capablity size, then no dma control
-	 * present so return
+	 * if blob size zero, then return
 	 */
-	if (mconfig->formats_config.caps_size == sizeof(config_blob))
+	if (mconfig->formats_config.caps_size == 0)
 		return 0;
 
 	msg.large_param_id = DMA_CONTROL_ID;
@@ -550,7 +548,7 @@ int skl_dsp_set_dma_control(struct skl_sst *ctx, struct skl_module_cfg *mconfig)
 	dma_ctrl->node_id = skl_get_node_id(ctx, mconfig);
 
 	/* size in dwords */
-	dma_ctrl->config_length = sizeof(config_blob) / 4;
+	dma_ctrl->config_length = mconfig->formats_config.caps_size / 4;
 
 	memcpy(dma_ctrl->config_data, mconfig->formats_config.caps,
 				mconfig->formats_config.caps_size);
@@ -558,7 +556,6 @@ int skl_dsp_set_dma_control(struct skl_sst *ctx, struct skl_module_cfg *mconfig)
 	err = skl_ipc_set_large_config(&ctx->ipc, &msg, (u32 *)dma_ctrl);
 
 	kfree(dma_ctrl);
-
 	return err;
 }
 
-- 
2.5.0
next             reply	other threads:[~2016-11-23 17:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-23 17:16 jeeja.kp [this message]
2016-11-23 17:16 ` [PATCH 2/2] ASoC: Intel: Skylake: Removed the unused I2S blob structure jeeja.kp
2016-11-25 13:09   ` Applied "ASoC: Intel: Skylake: Removed the unused I2S blob structure" to the asoc tree Mark Brown
2016-11-24  8:22 ` [PATCH 1/2] ASoC: Intel: Skylake: Don't use dma I2S config structure in kernel Vinod Koul
2016-11-25 13:09 ` Applied "ASoC: Intel: Skylake: Don't use dma I2S config structure in kernel" 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=1479921387-31248-1-git-send-email-jeeja.kp@intel.com \
    --to=jeeja.kp@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=guruprasadx.pawse@intel.com \
    --cc=liam.r.girdwood@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).