ASoC: SOF: Drop 'header' parameter from tx_message() API
The header parameter is not used anymore and now it can be dropped from the parameter list of tx_message(). Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20220330201926.1330402-10-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
5db8eb5b9e
commit
2a51c0f81a
|
@ -147,8 +147,7 @@ static int sof_compr_free(struct snd_soc_component *component,
|
||||||
stream.comp_id = spcm->stream[cstream->direction].comp_id;
|
stream.comp_id = spcm->stream[cstream->direction].comp_id;
|
||||||
|
|
||||||
if (spcm->prepared[cstream->direction]) {
|
if (spcm->prepared[cstream->direction]) {
|
||||||
ret = sof_ipc_tx_message(sdev->ipc, stream.hdr.cmd,
|
ret = sof_ipc_tx_message(sdev->ipc, &stream, sizeof(stream),
|
||||||
&stream, sizeof(stream),
|
|
||||||
&reply, sizeof(reply));
|
&reply, sizeof(reply));
|
||||||
if (!ret)
|
if (!ret)
|
||||||
spcm->prepared[cstream->direction] = false;
|
spcm->prepared[cstream->direction] = false;
|
||||||
|
@ -209,7 +208,7 @@ static int sof_compr_set_params(struct snd_soc_component *component,
|
||||||
snd_pcm_format_physical_width(SNDRV_PCM_FORMAT_S32) >> 3;
|
snd_pcm_format_physical_width(SNDRV_PCM_FORMAT_S32) >> 3;
|
||||||
pcm.params.host_period_bytes = params->buffer.fragment_size;
|
pcm.params.host_period_bytes = params->buffer.fragment_size;
|
||||||
|
|
||||||
ret = sof_ipc_tx_message(sdev->ipc, pcm.hdr.cmd, &pcm, sizeof(pcm),
|
ret = sof_ipc_tx_message(sdev->ipc, &pcm, sizeof(pcm),
|
||||||
&ipc_params_reply, sizeof(ipc_params_reply));
|
&ipc_params_reply, sizeof(ipc_params_reply));
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_err(component->dev, "error ipc failed\n");
|
dev_err(component->dev, "error ipc failed\n");
|
||||||
|
@ -268,8 +267,7 @@ static int sof_compr_trigger(struct snd_soc_component *component,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return sof_ipc_tx_message(sdev->ipc, stream.hdr.cmd,
|
return sof_ipc_tx_message(sdev->ipc, &stream, sizeof(stream),
|
||||||
&stream, sizeof(stream),
|
|
||||||
&reply, sizeof(reply));
|
&reply, sizeof(reply));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -236,7 +236,7 @@ static int memory_info_update(struct snd_sof_dev *sdev, char *buf, size_t buff_s
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = sof_ipc_tx_message(sdev->ipc, msg.cmd, &msg, msg.size, reply, SOF_IPC_MSG_MAX_SIZE);
|
ret = sof_ipc_tx_message(sdev->ipc, &msg, msg.size, reply, SOF_IPC_MSG_MAX_SIZE);
|
||||||
pm_runtime_mark_last_busy(sdev->dev);
|
pm_runtime_mark_last_busy(sdev->dev);
|
||||||
pm_runtime_put_autosuspend(sdev->dev);
|
pm_runtime_put_autosuspend(sdev->dev);
|
||||||
if (ret < 0 || reply->rhdr.error < 0) {
|
if (ret < 0 || reply->rhdr.error < 0) {
|
||||||
|
|
|
@ -363,9 +363,8 @@ static int hda_dsp_send_pm_gate_ipc(struct snd_sof_dev *sdev, u32 flags)
|
||||||
pm_gate.flags = flags;
|
pm_gate.flags = flags;
|
||||||
|
|
||||||
/* send pm_gate ipc to dsp */
|
/* send pm_gate ipc to dsp */
|
||||||
return sof_ipc_tx_message_no_pm(sdev->ipc, pm_gate.hdr.cmd,
|
return sof_ipc_tx_message_no_pm(sdev->ipc, &pm_gate, sizeof(pm_gate),
|
||||||
&pm_gate, sizeof(pm_gate), &reply,
|
&reply, sizeof(reply));
|
||||||
sizeof(reply));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int hda_dsp_update_d0i3c_register(struct snd_sof_dev *sdev, u8 value)
|
static int hda_dsp_update_d0i3c_register(struct snd_sof_dev *sdev, u8 value)
|
||||||
|
@ -985,8 +984,7 @@ int hda_dsp_core_get(struct snd_sof_dev *sdev, int core)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Now notify DSP for secondary cores */
|
/* Now notify DSP for secondary cores */
|
||||||
ret = sof_ipc_tx_message(sdev->ipc, pm_core_config.hdr.cmd,
|
ret = sof_ipc_tx_message(sdev->ipc, &pm_core_config, sizeof(pm_core_config),
|
||||||
&pm_core_config, sizeof(pm_core_config),
|
|
||||||
&pm_core_config, sizeof(pm_core_config));
|
&pm_core_config, sizeof(pm_core_config));
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_err(sdev->dev, "failed to enable secondary core '%d' failed with %d\n",
|
dev_err(sdev->dev, "failed to enable secondary core '%d' failed with %d\n",
|
||||||
|
|
|
@ -35,8 +35,7 @@ static int tgl_dsp_core_get(struct snd_sof_dev *sdev, int core)
|
||||||
return hda_dsp_enable_core(sdev, BIT(core));
|
return hda_dsp_enable_core(sdev, BIT(core));
|
||||||
|
|
||||||
/* notify DSP for secondary cores */
|
/* notify DSP for secondary cores */
|
||||||
return sof_ipc_tx_message(sdev->ipc, pm_core_config.hdr.cmd,
|
return sof_ipc_tx_message(sdev->ipc, &pm_core_config, sizeof(pm_core_config),
|
||||||
&pm_core_config, sizeof(pm_core_config),
|
|
||||||
&pm_core_config, sizeof(pm_core_config));
|
&pm_core_config, sizeof(pm_core_config));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,8 +54,7 @@ static int tgl_dsp_core_put(struct snd_sof_dev *sdev, int core)
|
||||||
return hda_dsp_core_reset_power_down(sdev, BIT(core));
|
return hda_dsp_core_reset_power_down(sdev, BIT(core));
|
||||||
|
|
||||||
/* notify DSP for secondary cores */
|
/* notify DSP for secondary cores */
|
||||||
return sof_ipc_tx_message(sdev->ipc, pm_core_config.hdr.cmd,
|
return sof_ipc_tx_message(sdev->ipc, &pm_core_config, sizeof(pm_core_config),
|
||||||
&pm_core_config, sizeof(pm_core_config),
|
|
||||||
&pm_core_config, sizeof(pm_core_config));
|
&pm_core_config, sizeof(pm_core_config));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -341,9 +341,8 @@ static int sof_ipc_tx_message_unlocked(struct snd_sof_ipc *ipc,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* send IPC message from host to DSP */
|
/* send IPC message from host to DSP */
|
||||||
int sof_ipc_tx_message(struct snd_sof_ipc *ipc, u32 header,
|
int sof_ipc_tx_message(struct snd_sof_ipc *ipc, void *msg_data, size_t msg_bytes,
|
||||||
void *msg_data, size_t msg_bytes, void *reply_data,
|
void *reply_data, size_t reply_bytes)
|
||||||
size_t reply_bytes)
|
|
||||||
{
|
{
|
||||||
const struct sof_dsp_power_state target_state = {
|
const struct sof_dsp_power_state target_state = {
|
||||||
.state = SOF_DSP_PM_D0,
|
.state = SOF_DSP_PM_D0,
|
||||||
|
@ -357,7 +356,7 @@ int sof_ipc_tx_message(struct snd_sof_ipc *ipc, u32 header,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
return sof_ipc_tx_message_no_pm(ipc, header, msg_data, msg_bytes,
|
return sof_ipc_tx_message_no_pm(ipc, msg_data, msg_bytes,
|
||||||
reply_data, reply_bytes);
|
reply_data, reply_bytes);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(sof_ipc_tx_message);
|
EXPORT_SYMBOL(sof_ipc_tx_message);
|
||||||
|
@ -367,8 +366,7 @@ EXPORT_SYMBOL(sof_ipc_tx_message);
|
||||||
* This will be used for IPC's that can be handled by the DSP
|
* This will be used for IPC's that can be handled by the DSP
|
||||||
* even in a low-power D0 substate.
|
* even in a low-power D0 substate.
|
||||||
*/
|
*/
|
||||||
int sof_ipc_tx_message_no_pm(struct snd_sof_ipc *ipc, u32 header,
|
int sof_ipc_tx_message_no_pm(struct snd_sof_ipc *ipc, void *msg_data, size_t msg_bytes,
|
||||||
void *msg_data, size_t msg_bytes,
|
|
||||||
void *reply_data, size_t reply_bytes)
|
void *reply_data, size_t reply_bytes)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -701,8 +699,7 @@ int snd_sof_ipc_stream_posn(struct snd_soc_component *scomp,
|
||||||
stream.comp_id = spcm->stream[direction].comp_id;
|
stream.comp_id = spcm->stream[direction].comp_id;
|
||||||
|
|
||||||
/* send IPC to the DSP */
|
/* send IPC to the DSP */
|
||||||
err = sof_ipc_tx_message(sdev->ipc,
|
err = sof_ipc_tx_message(sdev->ipc, &stream, sizeof(stream), posn,
|
||||||
stream.hdr.cmd, &stream, sizeof(stream), posn,
|
|
||||||
sizeof(*posn));
|
sizeof(*posn));
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
dev_err(sdev->dev, "error: failed to get stream %d position\n",
|
dev_err(sdev->dev, "error: failed to get stream %d position\n",
|
||||||
|
@ -893,9 +890,8 @@ int snd_sof_ipc_set_get_comp_data(struct snd_sof_control *scontrol, bool set)
|
||||||
|
|
||||||
/* send normal size ipc in one part */
|
/* send normal size ipc in one part */
|
||||||
if (cdata->rhdr.hdr.size <= SOF_IPC_MSG_MAX_SIZE) {
|
if (cdata->rhdr.hdr.size <= SOF_IPC_MSG_MAX_SIZE) {
|
||||||
err = sof_ipc_tx_message(sdev->ipc, cdata->rhdr.hdr.cmd, cdata,
|
err = sof_ipc_tx_message(sdev->ipc, cdata, cdata->rhdr.hdr.size,
|
||||||
cdata->rhdr.hdr.size, cdata,
|
cdata, cdata->rhdr.hdr.size);
|
||||||
cdata->rhdr.hdr.size);
|
|
||||||
|
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
dev_err(sdev->dev, "error: set/get ctrl ipc comp %d\n",
|
dev_err(sdev->dev, "error: set/get ctrl ipc comp %d\n",
|
||||||
|
|
|
@ -34,8 +34,7 @@ static int sof_ipc3_pcm_hw_free(struct snd_soc_component *component,
|
||||||
stream.comp_id = spcm->stream[substream->stream].comp_id;
|
stream.comp_id = spcm->stream[substream->stream].comp_id;
|
||||||
|
|
||||||
/* send IPC to the DSP */
|
/* send IPC to the DSP */
|
||||||
return sof_ipc_tx_message(sdev->ipc, stream.hdr.cmd, &stream,
|
return sof_ipc_tx_message(sdev->ipc, &stream, sizeof(stream), &reply, sizeof(reply));
|
||||||
sizeof(stream), &reply, sizeof(reply));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sof_ipc3_pcm_hw_params(struct snd_soc_component *component,
|
static int sof_ipc3_pcm_hw_params(struct snd_soc_component *component,
|
||||||
|
@ -119,7 +118,7 @@ static int sof_ipc3_pcm_hw_params(struct snd_soc_component *component,
|
||||||
dev_dbg(component->dev, "stream_tag %d", pcm.params.stream_tag);
|
dev_dbg(component->dev, "stream_tag %d", pcm.params.stream_tag);
|
||||||
|
|
||||||
/* send hw_params IPC to the DSP */
|
/* send hw_params IPC to the DSP */
|
||||||
ret = sof_ipc_tx_message(sdev->ipc, pcm.hdr.cmd, &pcm, sizeof(pcm),
|
ret = sof_ipc_tx_message(sdev->ipc, &pcm, sizeof(pcm),
|
||||||
&ipc_params_reply, sizeof(ipc_params_reply));
|
&ipc_params_reply, sizeof(ipc_params_reply));
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_err(component->dev, "HW params ipc failed for stream %d\n",
|
dev_err(component->dev, "HW params ipc failed for stream %d\n",
|
||||||
|
@ -175,8 +174,7 @@ static int sof_ipc3_pcm_trigger(struct snd_soc_component *component,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* send IPC to the DSP */
|
/* send IPC to the DSP */
|
||||||
return sof_ipc_tx_message(sdev->ipc, stream.hdr.cmd, &stream,
|
return sof_ipc_tx_message(sdev->ipc, &stream, sizeof(stream), &reply, sizeof(reply));
|
||||||
sizeof(stream), &reply, sizeof(reply));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ssp_dai_config_pcm_params_match(struct snd_sof_dev *sdev, const char *link_name,
|
static void ssp_dai_config_pcm_params_match(struct snd_sof_dev *sdev, const char *link_name,
|
||||||
|
|
|
@ -1551,8 +1551,7 @@ static int sof_ipc3_route_setup(struct snd_sof_dev *sdev, struct snd_sof_route *
|
||||||
sroute->sink_widget->widget->name);
|
sroute->sink_widget->widget->name);
|
||||||
|
|
||||||
/* send ipc */
|
/* send ipc */
|
||||||
ret = sof_ipc_tx_message(sdev->ipc, connect.hdr.cmd, &connect, sizeof(connect),
|
ret = sof_ipc_tx_message(sdev->ipc, &connect, sizeof(connect), &reply, sizeof(reply));
|
||||||
&reply, sizeof(reply));
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
dev_err(sdev->dev, "%s: route %s -> %s failed\n", __func__,
|
dev_err(sdev->dev, "%s: route %s -> %s failed\n", __func__,
|
||||||
sroute->src_widget->widget->name, sroute->sink_widget->widget->name);
|
sroute->src_widget->widget->name, sroute->sink_widget->widget->name);
|
||||||
|
@ -1697,7 +1696,7 @@ static int sof_ipc3_control_free(struct snd_sof_dev *sdev, struct snd_sof_contro
|
||||||
fcomp.id = scontrol->comp_id;
|
fcomp.id = scontrol->comp_id;
|
||||||
|
|
||||||
/* send IPC to the DSP */
|
/* send IPC to the DSP */
|
||||||
return sof_ipc_tx_message(sdev->ipc, fcomp.hdr.cmd, &fcomp, sizeof(fcomp), NULL, 0);
|
return sof_ipc_tx_message(sdev->ipc, &fcomp, sizeof(fcomp), NULL, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* send pcm params ipc */
|
/* send pcm params ipc */
|
||||||
|
@ -1749,7 +1748,7 @@ static int sof_ipc3_keyword_detect_pcm_params(struct snd_sof_widget *swidget, in
|
||||||
}
|
}
|
||||||
|
|
||||||
/* send IPC to the DSP */
|
/* send IPC to the DSP */
|
||||||
ret = sof_ipc_tx_message(sdev->ipc, pcm.hdr.cmd, &pcm, sizeof(pcm),
|
ret = sof_ipc_tx_message(sdev->ipc, &pcm, sizeof(pcm),
|
||||||
&ipc_params_reply, sizeof(ipc_params_reply));
|
&ipc_params_reply, sizeof(ipc_params_reply));
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
dev_err(scomp->dev, "%s: PCM params failed for %s\n", __func__,
|
dev_err(scomp->dev, "%s: PCM params failed for %s\n", __func__,
|
||||||
|
@ -1773,8 +1772,7 @@ static int sof_ipc3_keyword_detect_trigger(struct snd_sof_widget *swidget, int c
|
||||||
stream.comp_id = swidget->comp_id;
|
stream.comp_id = swidget->comp_id;
|
||||||
|
|
||||||
/* send IPC to the DSP */
|
/* send IPC to the DSP */
|
||||||
ret = sof_ipc_tx_message(sdev->ipc, stream.hdr.cmd, &stream,
|
ret = sof_ipc_tx_message(sdev->ipc, &stream, sizeof(stream), &reply, sizeof(reply));
|
||||||
sizeof(stream), &reply, sizeof(reply));
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
dev_err(scomp->dev, "%s: Failed to trigger %s\n", __func__, swidget->widget->name);
|
dev_err(scomp->dev, "%s: Failed to trigger %s\n", __func__, swidget->widget->name);
|
||||||
|
|
||||||
|
@ -1902,8 +1900,7 @@ static int sof_ipc3_complete_pipeline(struct snd_sof_dev *sdev, struct snd_sof_w
|
||||||
ready.hdr.cmd = SOF_IPC_GLB_TPLG_MSG | SOF_IPC_TPLG_PIPE_COMPLETE;
|
ready.hdr.cmd = SOF_IPC_GLB_TPLG_MSG | SOF_IPC_TPLG_PIPE_COMPLETE;
|
||||||
ready.comp_id = swidget->comp_id;
|
ready.comp_id = swidget->comp_id;
|
||||||
|
|
||||||
ret = sof_ipc_tx_message(sdev->ipc, ready.hdr.cmd, &ready, sizeof(ready), &reply,
|
ret = sof_ipc_tx_message(sdev->ipc, &ready, sizeof(ready), &reply, sizeof(reply));
|
||||||
sizeof(reply));
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@ -1939,7 +1936,7 @@ static int sof_ipc3_widget_free(struct snd_sof_dev *sdev, struct snd_sof_widget
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = sof_ipc_tx_message(sdev->ipc, ipc_free.hdr.cmd, &ipc_free, sizeof(ipc_free),
|
ret = sof_ipc_tx_message(sdev->ipc, &ipc_free, sizeof(ipc_free),
|
||||||
&reply, sizeof(reply));
|
&reply, sizeof(reply));
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
dev_err(sdev->dev, "failed to free widget %s\n", swidget->widget->name);
|
dev_err(sdev->dev, "failed to free widget %s\n", swidget->widget->name);
|
||||||
|
@ -2003,7 +2000,7 @@ static int sof_ipc3_dai_config(struct snd_sof_dev *sdev, struct snd_sof_widget *
|
||||||
|
|
||||||
/* only send the IPC if the widget is set up in the DSP */
|
/* only send the IPC if the widget is set up in the DSP */
|
||||||
if (swidget->use_count > 0) {
|
if (swidget->use_count > 0) {
|
||||||
ret = sof_ipc_tx_message(sdev->ipc, config->hdr.cmd, config, config->hdr.size,
|
ret = sof_ipc_tx_message(sdev->ipc, config, config->hdr.size,
|
||||||
&reply, sizeof(reply));
|
&reply, sizeof(reply));
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
dev_err(sdev->dev, "Failed to set dai config for %s\n", dai->name);
|
dev_err(sdev->dev, "Failed to set dai config for %s\n", dai->name);
|
||||||
|
@ -2028,7 +2025,7 @@ static int sof_ipc3_widget_setup(struct snd_sof_dev *sdev, struct snd_sof_widget
|
||||||
struct sof_dai_private_data *dai_data = dai->private;
|
struct sof_dai_private_data *dai_data = dai->private;
|
||||||
struct sof_ipc_comp *comp = &dai_data->comp_dai->comp;
|
struct sof_ipc_comp *comp = &dai_data->comp_dai->comp;
|
||||||
|
|
||||||
ret = sof_ipc_tx_message(sdev->ipc, comp->hdr.cmd, dai_data->comp_dai,
|
ret = sof_ipc_tx_message(sdev->ipc, dai_data->comp_dai,
|
||||||
comp->hdr.size, &reply, sizeof(reply));
|
comp->hdr.size, &reply, sizeof(reply));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2037,8 +2034,8 @@ static int sof_ipc3_widget_setup(struct snd_sof_dev *sdev, struct snd_sof_widget
|
||||||
struct sof_ipc_pipe_new *pipeline;
|
struct sof_ipc_pipe_new *pipeline;
|
||||||
|
|
||||||
pipeline = swidget->private;
|
pipeline = swidget->private;
|
||||||
ret = sof_ipc_tx_message(sdev->ipc, pipeline->hdr.cmd, pipeline,
|
ret = sof_ipc_tx_message(sdev->ipc, pipeline, sizeof(*pipeline),
|
||||||
sizeof(*pipeline), &reply, sizeof(reply));
|
&reply, sizeof(reply));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
@ -2046,7 +2043,7 @@ static int sof_ipc3_widget_setup(struct snd_sof_dev *sdev, struct snd_sof_widget
|
||||||
struct sof_ipc_cmd_hdr *hdr;
|
struct sof_ipc_cmd_hdr *hdr;
|
||||||
|
|
||||||
hdr = swidget->private;
|
hdr = swidget->private;
|
||||||
ret = sof_ipc_tx_message(sdev->ipc, hdr->cmd, swidget->private, hdr->size,
|
ret = sof_ipc_tx_message(sdev->ipc, swidget->private, hdr->size,
|
||||||
&reply, sizeof(reply));
|
&reply, sizeof(reply));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,8 +19,8 @@ static int sof_ipc3_ctx_ipc(struct snd_sof_dev *sdev, int cmd)
|
||||||
struct sof_ipc_reply reply;
|
struct sof_ipc_reply reply;
|
||||||
|
|
||||||
/* send ctx save ipc to dsp */
|
/* send ctx save ipc to dsp */
|
||||||
return sof_ipc_tx_message(sdev->ipc, pm_ctx.hdr.cmd, &pm_ctx,
|
return sof_ipc_tx_message(sdev->ipc, &pm_ctx, sizeof(pm_ctx),
|
||||||
sizeof(pm_ctx), &reply, sizeof(reply));
|
&reply, sizeof(reply));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sof_ipc3_ctx_save(struct snd_sof_dev *sdev)
|
static int sof_ipc3_ctx_save(struct snd_sof_dev *sdev)
|
||||||
|
|
|
@ -247,7 +247,7 @@ int sof_client_ipc_tx_message(struct sof_client_dev *cdev, void *ipc_msg,
|
||||||
{
|
{
|
||||||
struct sof_ipc_cmd_hdr *hdr = ipc_msg;
|
struct sof_ipc_cmd_hdr *hdr = ipc_msg;
|
||||||
|
|
||||||
return sof_ipc_tx_message(cdev->sdev->ipc, hdr->cmd, ipc_msg, hdr->size,
|
return sof_ipc_tx_message(cdev->sdev->ipc, ipc_msg, hdr->size,
|
||||||
reply_data, reply_bytes);
|
reply_data, reply_bytes);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_NS_GPL(sof_client_ipc_tx_message, SND_SOC_SOF_CLIENT);
|
EXPORT_SYMBOL_NS_GPL(sof_client_ipc_tx_message, SND_SOC_SOF_CLIENT);
|
||||||
|
|
|
@ -584,11 +584,9 @@ void snd_sof_ipc_get_reply(struct snd_sof_dev *sdev);
|
||||||
void snd_sof_ipc_reply(struct snd_sof_dev *sdev, u32 msg_id);
|
void snd_sof_ipc_reply(struct snd_sof_dev *sdev, u32 msg_id);
|
||||||
void snd_sof_ipc_msgs_rx(struct snd_sof_dev *sdev);
|
void snd_sof_ipc_msgs_rx(struct snd_sof_dev *sdev);
|
||||||
int snd_sof_ipc_valid(struct snd_sof_dev *sdev);
|
int snd_sof_ipc_valid(struct snd_sof_dev *sdev);
|
||||||
int sof_ipc_tx_message(struct snd_sof_ipc *ipc, u32 header,
|
int sof_ipc_tx_message(struct snd_sof_ipc *ipc, void *msg_data, size_t msg_bytes,
|
||||||
void *msg_data, size_t msg_bytes, void *reply_data,
|
void *reply_data, size_t reply_bytes);
|
||||||
size_t reply_bytes);
|
int sof_ipc_tx_message_no_pm(struct snd_sof_ipc *ipc, void *msg_data, size_t msg_bytes,
|
||||||
int sof_ipc_tx_message_no_pm(struct snd_sof_ipc *ipc, u32 header,
|
|
||||||
void *msg_data, size_t msg_bytes,
|
|
||||||
void *reply_data, size_t reply_bytes);
|
void *reply_data, size_t reply_bytes);
|
||||||
int sof_ipc_init_msg_memory(struct snd_sof_dev *sdev);
|
int sof_ipc_init_msg_memory(struct snd_sof_dev *sdev);
|
||||||
static inline void snd_sof_ipc_process_reply(struct snd_sof_dev *sdev, u32 msg_id)
|
static inline void snd_sof_ipc_process_reply(struct snd_sof_dev *sdev, u32 msg_id)
|
||||||
|
|
|
@ -152,8 +152,7 @@ static int sof_ipc_trace_update_filter(struct snd_sof_dev *sdev, int num_elems,
|
||||||
dev_err(sdev->dev, "error: enabling device failed: %d\n", ret);
|
dev_err(sdev->dev, "error: enabling device failed: %d\n", ret);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
ret = sof_ipc_tx_message(sdev->ipc, msg->hdr.cmd, msg, msg->hdr.size,
|
ret = sof_ipc_tx_message(sdev->ipc, msg, msg->hdr.size, &reply, sizeof(reply));
|
||||||
&reply, sizeof(reply));
|
|
||||||
pm_runtime_mark_last_busy(sdev->dev);
|
pm_runtime_mark_last_busy(sdev->dev);
|
||||||
pm_runtime_put_autosuspend(sdev->dev);
|
pm_runtime_put_autosuspend(sdev->dev);
|
||||||
|
|
||||||
|
@ -430,9 +429,7 @@ static int snd_sof_enable_trace(struct snd_sof_dev *sdev)
|
||||||
dev_dbg(sdev->dev, "%s: stream_tag: %d\n", __func__, params.stream_tag);
|
dev_dbg(sdev->dev, "%s: stream_tag: %d\n", __func__, params.stream_tag);
|
||||||
|
|
||||||
/* send IPC to the DSP */
|
/* send IPC to the DSP */
|
||||||
ret = sof_ipc_tx_message(sdev->ipc,
|
ret = sof_ipc_tx_message(sdev->ipc, ¶ms, sizeof(params), &ipc_reply, sizeof(ipc_reply));
|
||||||
params.hdr.cmd, ¶ms, sizeof(params),
|
|
||||||
&ipc_reply, sizeof(ipc_reply));
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_err(sdev->dev,
|
dev_err(sdev->dev,
|
||||||
"error: can't set params for DMA for trace %d\n", ret);
|
"error: can't set params for DMA for trace %d\n", ret);
|
||||||
|
@ -575,7 +572,7 @@ static void snd_sof_release_trace(struct snd_sof_dev *sdev, bool only_stop)
|
||||||
hdr.size = sizeof(hdr);
|
hdr.size = sizeof(hdr);
|
||||||
hdr.cmd = SOF_IPC_GLB_TRACE_MSG | SOF_IPC_TRACE_DMA_FREE;
|
hdr.cmd = SOF_IPC_GLB_TRACE_MSG | SOF_IPC_TRACE_DMA_FREE;
|
||||||
|
|
||||||
ret = sof_ipc_tx_message(sdev->ipc, hdr.cmd, &hdr, hdr.size,
|
ret = sof_ipc_tx_message(sdev->ipc, &hdr, hdr.size,
|
||||||
&ipc_reply, sizeof(ipc_reply));
|
&ipc_reply, sizeof(ipc_reply));
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
dev_err(sdev->dev, "DMA_TRACE_FREE failed with error: %d\n", ret);
|
dev_err(sdev->dev, "DMA_TRACE_FREE failed with error: %d\n", ret);
|
||||||
|
|
Loading…
Reference in New Issue