提交 c186fe74 编写于 作者: G GuruprasadX Pawse 提交者: Mark Brown

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: NGuruprasadX Pawse <guruprasadx.pawse@intel.com>
Signed-off-by: NJeeja KP <jeeja.kp@intel.com>
Acked-by: NVinod Koul <vinod.koul@intel.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 266c618d
...@@ -527,16 +527,14 @@ static void skl_setup_cpr_gateway_cfg(struct skl_sst *ctx, ...@@ -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) int skl_dsp_set_dma_control(struct skl_sst *ctx, struct skl_module_cfg *mconfig)
{ {
struct skl_dma_control *dma_ctrl; struct skl_dma_control *dma_ctrl;
struct skl_i2s_config_blob config_blob;
struct skl_ipc_large_config_msg msg = {0}; struct skl_ipc_large_config_msg msg = {0};
int err = 0; int err = 0;
/* /*
* if blob size is same as capablity size, then no dma control * if blob size zero, then return
* present so return
*/ */
if (mconfig->formats_config.caps_size == sizeof(config_blob)) if (mconfig->formats_config.caps_size == 0)
return 0; return 0;
msg.large_param_id = DMA_CONTROL_ID; 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,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); dma_ctrl->node_id = skl_get_node_id(ctx, mconfig);
/* size in dwords */ /* 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, memcpy(dma_ctrl->config_data, mconfig->formats_config.caps,
mconfig->formats_config.caps_size); 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,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); err = skl_ipc_set_large_config(&ctx->ipc, &msg, (u32 *)dma_ctrl);
kfree(dma_ctrl); kfree(dma_ctrl);
return err; return err;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册