aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuruprasadX Pawse <guruprasadx.pawse@intel.com>2016-11-23 12:16:26 -0500
committerMark Brown <broonie@kernel.org>2016-11-25 08:08:35 -0500
commitc186fe7401e4234aee6796eda3ad38bd57507899 (patch)
treef3e611641c74ac7d328d644246609197d0ce64f8
parent266c618d67dd4a42f798baaab47634018cb1db4b (diff)
ASoC: Intel: Skylake: Don't use dma I2S config structure in kernel
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> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/intel/skylake/skl-messages.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c
index 4ae021aabc3a..e79cbcf6e462 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,
527int skl_dsp_set_dma_control(struct skl_sst *ctx, struct skl_module_cfg *mconfig) 527int skl_dsp_set_dma_control(struct skl_sst *ctx, struct skl_module_cfg *mconfig)
528{ 528{
529 struct skl_dma_control *dma_ctrl; 529 struct skl_dma_control *dma_ctrl;
530 struct skl_i2s_config_blob config_blob;
531 struct skl_ipc_large_config_msg msg = {0}; 530 struct skl_ipc_large_config_msg msg = {0};
532 int err = 0; 531 int err = 0;
533 532
534 533
535 /* 534 /*
536 * if blob size is same as capablity size, then no dma control 535 * if blob size zero, then return
537 * present so return
538 */ 536 */
539 if (mconfig->formats_config.caps_size == sizeof(config_blob)) 537 if (mconfig->formats_config.caps_size == 0)
540 return 0; 538 return 0;
541 539
542 msg.large_param_id = DMA_CONTROL_ID; 540 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)
550 dma_ctrl->node_id = skl_get_node_id(ctx, mconfig); 548 dma_ctrl->node_id = skl_get_node_id(ctx, mconfig);
551 549
552 /* size in dwords */ 550 /* size in dwords */
553 dma_ctrl->config_length = sizeof(config_blob) / 4; 551 dma_ctrl->config_length = mconfig->formats_config.caps_size / 4;
554 552
555 memcpy(dma_ctrl->config_data, mconfig->formats_config.caps, 553 memcpy(dma_ctrl->config_data, mconfig->formats_config.caps,
556 mconfig->formats_config.caps_size); 554 mconfig->formats_config.caps_size);
@@ -558,7 +556,6 @@ int skl_dsp_set_dma_control(struct skl_sst *ctx, struct skl_module_cfg *mconfig)
558 err = skl_ipc_set_large_config(&ctx->ipc, &msg, (u32 *)dma_ctrl); 556 err = skl_ipc_set_large_config(&ctx->ipc, &msg, (u32 *)dma_ctrl);
559 557
560 kfree(dma_ctrl); 558 kfree(dma_ctrl);
561
562 return err; 559 return err;
563} 560}
564 561