Skip to content

Commit 1cbdfac

Browse files
committed
ASoC: SOF: Use no_reply calls for TX
Convert all existing calls that pass "NULL, 0" for reply data to the new no_reply calls. Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
1 parent 62704d9 commit 1cbdfac

File tree

10 files changed

+30
-30
lines changed

10 files changed

+30
-30
lines changed

sound/soc/sof/compress.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ static int sof_compr_free(struct snd_soc_component *component,
146146
stream.comp_id = spcm->stream[cstream->direction].comp_id;
147147

148148
if (spcm->prepared[cstream->direction]) {
149-
ret = sof_ipc_tx_message(sdev->ipc, &stream, sizeof(stream), NULL, 0);
149+
ret = sof_ipc_tx_message_no_reply(sdev->ipc, &stream, sizeof(stream));
150150
if (!ret)
151151
spcm->prepared[cstream->direction] = false;
152152
}
@@ -227,7 +227,7 @@ static int sof_compr_set_params(struct snd_soc_component *component,
227227

228228
memcpy((u8 *)pcm->params.ext_data, &params->codec, ext_data_size);
229229

230-
ret = sof_ipc_tx_message(sdev->ipc, pcm, sizeof(*pcm) + ext_data_size, NULL, 0);
230+
ret = sof_ipc_tx_message_no_reply(sdev->ipc, pcm, sizeof(*pcm) + ext_data_size);
231231
if (ret < 0) {
232232
dev_err(component->dev, "error ipc failed\n");
233233
goto out;
@@ -288,7 +288,7 @@ static int sof_compr_trigger(struct snd_soc_component *component,
288288
break;
289289
}
290290

291-
return sof_ipc_tx_message(sdev->ipc, &stream, sizeof(stream), NULL, 0);
291+
return sof_ipc_tx_message_no_reply(sdev->ipc, &stream, sizeof(stream));
292292
}
293293

294294
static int sof_compr_copy_playback(struct snd_compr_runtime *rtd,

sound/soc/sof/intel/hda-dsp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ static int hda_dsp_send_pm_gate_ipc(struct snd_sof_dev *sdev, u32 flags)
374374
pm_gate.flags = flags;
375375

376376
/* send pm_gate ipc to dsp */
377-
return sof_ipc_tx_message_no_pm(sdev->ipc, &pm_gate, sizeof(pm_gate), NULL, 0);
377+
return sof_ipc_tx_message_no_pm_no_reply(sdev->ipc, &pm_gate, sizeof(pm_gate));
378378
}
379379

380380
static int hda_dsp_update_d0i3c_register(struct snd_sof_dev *sdev, u8 value)

sound/soc/sof/intel/hda-loader.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ int hda_dsp_ipc4_load_library(struct snd_sof_dev *sdev,
557557
goto cleanup;
558558
}
559559

560-
ret = sof_ipc_tx_message(sdev->ipc, &msg, 0, NULL, 0);
560+
ret = sof_ipc_tx_message_no_reply(sdev->ipc, &msg, 0);
561561

562562
ret1 = cl_trigger(sdev, hext_stream, SNDRV_PCM_TRIGGER_STOP);
563563
if (ret1 < 0) {

sound/soc/sof/ipc3-dtrace.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ static int ipc3_trace_update_filter(struct snd_sof_dev *sdev, int num_elems,
171171
dev_err(sdev->dev, "enabling device failed: %d\n", ret);
172172
goto error;
173173
}
174-
ret = sof_ipc_tx_message(sdev->ipc, msg, msg->hdr.size, NULL, 0);
174+
ret = sof_ipc_tx_message_no_reply(sdev->ipc, msg, msg->hdr.size);
175175
pm_runtime_mark_last_busy(sdev->dev);
176176
pm_runtime_put_autosuspend(sdev->dev);
177177

@@ -472,7 +472,7 @@ static int ipc3_dtrace_enable(struct snd_sof_dev *sdev)
472472

473473
/* send IPC to the DSP */
474474
priv->dtrace_state = SOF_DTRACE_INITIALIZING;
475-
ret = sof_ipc_tx_message(sdev->ipc, &params, sizeof(params), NULL, 0);
475+
ret = sof_ipc_tx_message_no_reply(sdev->ipc, &params, sizeof(params));
476476
if (ret < 0) {
477477
dev_err(sdev->dev, "can't set params for DMA for trace %d\n", ret);
478478
goto trace_release;
@@ -620,7 +620,7 @@ static void ipc3_dtrace_release(struct snd_sof_dev *sdev, bool only_stop)
620620
hdr.size = sizeof(hdr);
621621
hdr.cmd = SOF_IPC_GLB_TRACE_MSG | SOF_IPC_TRACE_DMA_FREE;
622622

623-
ret = sof_ipc_tx_message(sdev->ipc, &hdr, hdr.size, NULL, 0);
623+
ret = sof_ipc_tx_message_no_reply(sdev->ipc, &hdr, hdr.size);
624624
if (ret < 0)
625625
dev_err(sdev->dev, "DMA_TRACE_FREE failed with error: %d\n", ret);
626626
}

sound/soc/sof/ipc3-pcm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ static int sof_ipc3_pcm_hw_free(struct snd_soc_component *component,
3333
stream.comp_id = spcm->stream[substream->stream].comp_id;
3434

3535
/* send IPC to the DSP */
36-
return sof_ipc_tx_message(sdev->ipc, &stream, sizeof(stream), NULL, 0);
36+
return sof_ipc_tx_message_no_reply(sdev->ipc, &stream, sizeof(stream));
3737
}
3838

3939
static int sof_ipc3_pcm_hw_params(struct snd_soc_component *component,
@@ -175,7 +175,7 @@ static int sof_ipc3_pcm_trigger(struct snd_soc_component *component,
175175
}
176176

177177
/* send IPC to the DSP */
178-
return sof_ipc_tx_message(sdev->ipc, &stream, sizeof(stream), NULL, 0);
178+
return sof_ipc_tx_message_no_reply(sdev->ipc, &stream, sizeof(stream));
179179
}
180180

181181
static void ssp_dai_config_pcm_params_match(struct snd_sof_dev *sdev, const char *link_name,

sound/soc/sof/ipc3-topology.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1619,7 +1619,7 @@ static int sof_ipc3_route_setup(struct snd_sof_dev *sdev, struct snd_sof_route *
16191619
sroute->sink_widget->widget->name);
16201620

16211621
/* send ipc */
1622-
ret = sof_ipc_tx_message(sdev->ipc, &connect, sizeof(connect), NULL, 0);
1622+
ret = sof_ipc_tx_message_no_reply(sdev->ipc, &connect, sizeof(connect));
16231623
if (ret < 0)
16241624
dev_err(sdev->dev, "%s: route %s -> %s failed\n", __func__,
16251625
sroute->src_widget->widget->name, sroute->sink_widget->widget->name);
@@ -1765,7 +1765,7 @@ static int sof_ipc3_control_free(struct snd_sof_dev *sdev, struct snd_sof_contro
17651765
fcomp.id = scontrol->comp_id;
17661766

17671767
/* send IPC to the DSP */
1768-
return sof_ipc_tx_message(sdev->ipc, &fcomp, sizeof(fcomp), NULL, 0);
1768+
return sof_ipc_tx_message_no_reply(sdev->ipc, &fcomp, sizeof(fcomp));
17691769
}
17701770

17711771
/* send pcm params ipc */
@@ -1816,7 +1816,7 @@ static int sof_ipc3_keyword_detect_pcm_params(struct snd_sof_widget *swidget, in
18161816
}
18171817

18181818
/* send IPC to the DSP */
1819-
ret = sof_ipc_tx_message(sdev->ipc, &pcm, sizeof(pcm), NULL, 0);
1819+
ret = sof_ipc_tx_message_no_reply(sdev->ipc, &pcm, sizeof(pcm));
18201820
if (ret < 0)
18211821
dev_err(scomp->dev, "%s: PCM params failed for %s\n", __func__,
18221822
swidget->widget->name);
@@ -1838,7 +1838,7 @@ static int sof_ipc3_keyword_detect_trigger(struct snd_sof_widget *swidget, int c
18381838
stream.comp_id = swidget->comp_id;
18391839

18401840
/* send IPC to the DSP */
1841-
ret = sof_ipc_tx_message(sdev->ipc, &stream, sizeof(stream), NULL, 0);
1841+
ret = sof_ipc_tx_message_no_reply(sdev->ipc, &stream, sizeof(stream));
18421842
if (ret < 0)
18431843
dev_err(scomp->dev, "%s: Failed to trigger %s\n", __func__, swidget->widget->name);
18441844

@@ -1965,7 +1965,7 @@ static int sof_ipc3_complete_pipeline(struct snd_sof_dev *sdev, struct snd_sof_w
19651965
ready.hdr.cmd = SOF_IPC_GLB_TPLG_MSG | SOF_IPC_TPLG_PIPE_COMPLETE;
19661966
ready.comp_id = swidget->comp_id;
19671967

1968-
ret = sof_ipc_tx_message(sdev->ipc, &ready, sizeof(ready), NULL, 0);
1968+
ret = sof_ipc_tx_message_no_reply(sdev->ipc, &ready, sizeof(ready));
19691969
if (ret < 0)
19701970
return ret;
19711971

@@ -2000,7 +2000,7 @@ static int sof_ipc3_widget_free(struct snd_sof_dev *sdev, struct snd_sof_widget
20002000
break;
20012001
}
20022002

2003-
ret = sof_ipc_tx_message(sdev->ipc, &ipc_free, sizeof(ipc_free), NULL, 0);
2003+
ret = sof_ipc_tx_message_no_reply(sdev->ipc, &ipc_free, sizeof(ipc_free));
20042004
if (ret < 0)
20052005
dev_err(sdev->dev, "failed to free widget %s\n", swidget->widget->name);
20062006

@@ -2062,7 +2062,7 @@ static int sof_ipc3_dai_config(struct snd_sof_dev *sdev, struct snd_sof_widget *
20622062

20632063
/* only send the IPC if the widget is set up in the DSP */
20642064
if (swidget->use_count > 0) {
2065-
ret = sof_ipc_tx_message(sdev->ipc, config, config->hdr.size, NULL, 0);
2065+
ret = sof_ipc_tx_message_no_reply(sdev->ipc, config, config->hdr.size);
20662066
if (ret < 0)
20672067
dev_err(sdev->dev, "Failed to set dai config for %s\n", dai->name);
20682068
}
@@ -2085,23 +2085,23 @@ static int sof_ipc3_widget_setup(struct snd_sof_dev *sdev, struct snd_sof_widget
20852085
struct sof_dai_private_data *dai_data = dai->private;
20862086
struct sof_ipc_comp *comp = &dai_data->comp_dai->comp;
20872087

2088-
ret = sof_ipc_tx_message(sdev->ipc, dai_data->comp_dai, comp->hdr.size, NULL, 0);
2088+
ret = sof_ipc_tx_message_no_reply(sdev->ipc, dai_data->comp_dai, comp->hdr.size);
20892089
break;
20902090
}
20912091
case snd_soc_dapm_scheduler:
20922092
{
20932093
struct sof_ipc_pipe_new *pipeline;
20942094

20952095
pipeline = swidget->private;
2096-
ret = sof_ipc_tx_message(sdev->ipc, pipeline, sizeof(*pipeline), NULL, 0);
2096+
ret = sof_ipc_tx_message_no_reply(sdev->ipc, pipeline, sizeof(*pipeline));
20972097
break;
20982098
}
20992099
default:
21002100
{
21012101
struct sof_ipc_cmd_hdr *hdr;
21022102

21032103
hdr = swidget->private;
2104-
ret = sof_ipc_tx_message(sdev->ipc, swidget->private, hdr->size, NULL, 0);
2104+
ret = sof_ipc_tx_message_no_reply(sdev->ipc, swidget->private, hdr->size);
21052105
break;
21062106
}
21072107
}

sound/soc/sof/ipc4-pcm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ int sof_ipc4_set_pipeline_state(struct snd_sof_dev *sdev, u32 id, u32 state)
2828

2929
msg.primary = primary;
3030

31-
return sof_ipc_tx_message(sdev->ipc, &msg, 0, NULL, 0);
31+
return sof_ipc_tx_message_no_reply(sdev->ipc, &msg, 0);
3232
}
3333
EXPORT_SYMBOL(sof_ipc4_set_pipeline_state);
3434

sound/soc/sof/ipc4-topology.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1545,7 +1545,7 @@ static int sof_ipc4_widget_setup(struct snd_sof_dev *sdev, struct snd_sof_widget
15451545
msg->data_size = ipc_size;
15461546
msg->data_ptr = ipc_data;
15471547

1548-
ret = sof_ipc_tx_message(sdev->ipc, msg, ipc_size, NULL, 0);
1548+
ret = sof_ipc_tx_message_no_reply(sdev->ipc, msg, ipc_size);
15491549
if (ret < 0) {
15501550
dev_err(sdev->dev, "failed to create module %s\n", swidget->widget->name);
15511551

@@ -1579,7 +1579,7 @@ static int sof_ipc4_widget_free(struct snd_sof_dev *sdev, struct snd_sof_widget
15791579

15801580
msg.primary = header;
15811581

1582-
ret = sof_ipc_tx_message(sdev->ipc, &msg, 0, NULL, 0);
1582+
ret = sof_ipc_tx_message_no_reply(sdev->ipc, &msg, 0);
15831583
if (ret < 0)
15841584
dev_err(sdev->dev, "failed to free pipeline widget %s\n",
15851585
swidget->widget->name);
@@ -1722,7 +1722,7 @@ static int sof_ipc4_route_setup(struct snd_sof_dev *sdev, struct snd_sof_route *
17221722
msg.primary = header;
17231723
msg.extension = extension;
17241724

1725-
ret = sof_ipc_tx_message(sdev->ipc, &msg, 0, NULL, 0);
1725+
ret = sof_ipc_tx_message_no_reply(sdev->ipc, &msg, 0);
17261726
if (ret < 0) {
17271727
dev_err(sdev->dev, "%s: failed to bind modules %s -> %s\n",
17281728
__func__, src_widget->widget->name, sink_widget->widget->name);
@@ -1764,7 +1764,7 @@ static int sof_ipc4_route_free(struct snd_sof_dev *sdev, struct snd_sof_route *s
17641764
msg.primary = header;
17651765
msg.extension = extension;
17661766

1767-
ret = sof_ipc_tx_message(sdev->ipc, &msg, 0, NULL, 0);
1767+
ret = sof_ipc_tx_message_no_reply(sdev->ipc, &msg, 0);
17681768
if (ret < 0)
17691769
dev_err(sdev->dev, "failed to unbind modules %s -> %s\n",
17701770
src_widget->widget->name, sink_widget->widget->name);

sound/soc/sof/sof-client-ipc-flood-test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ static int sof_debug_ipc_flood_test(struct sof_client_dev *cdev,
8383
/* send test IPC's */
8484
while (1) {
8585
start = ktime_get();
86-
ret = sof_client_ipc_tx_message(cdev, &hdr, NULL, 0);
86+
ret = sof_client_ipc_tx_message_no_reply(cdev, &hdr);
8787
end = ktime_get();
8888

8989
if (ret < 0)

sound/soc/sof/sof-client-probes-ipc3.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ static int ipc3_probes_init(struct sof_client_dev *cdev, u32 stream_tag,
7676
msg->dma[0].stream_tag = stream_tag;
7777
msg->dma[0].dma_buffer_size = buffer_size;
7878

79-
ret = sof_client_ipc_tx_message(cdev, msg, NULL, 0);
79+
ret = sof_client_ipc_tx_message_no_reply(cdev, msg);
8080
kfree(msg);
8181
return ret;
8282
}
@@ -96,7 +96,7 @@ static int ipc3_probes_deinit(struct sof_client_dev *cdev)
9696
msg.size = sizeof(msg);
9797
msg.cmd = SOF_IPC_GLB_PROBE | SOF_IPC_PROBE_DEINIT;
9898

99-
return sof_client_ipc_tx_message(cdev, &msg, NULL, 0);
99+
return sof_client_ipc_tx_message_no_reply(cdev, &msg);
100100
}
101101

102102
static int ipc3_probes_info(struct sof_client_dev *cdev, unsigned int cmd,
@@ -188,7 +188,7 @@ static int ipc3_probes_points_add(struct sof_client_dev *cdev,
188188
msg->hdr.cmd = SOF_IPC_GLB_PROBE | SOF_IPC_PROBE_POINT_ADD;
189189
memcpy(&msg->desc[0], desc, size - sizeof(*msg));
190190

191-
ret = sof_client_ipc_tx_message(cdev, msg, NULL, 0);
191+
ret = sof_client_ipc_tx_message_no_reply(cdev, msg);
192192
kfree(msg);
193193
return ret;
194194
}
@@ -218,7 +218,7 @@ static int ipc3_probes_points_remove(struct sof_client_dev *cdev,
218218
msg->hdr.cmd = SOF_IPC_GLB_PROBE | SOF_IPC_PROBE_POINT_REMOVE;
219219
memcpy(&msg->buffer_id[0], buffer_id, size - sizeof(*msg));
220220

221-
ret = sof_client_ipc_tx_message(cdev, msg, NULL, 0);
221+
ret = sof_client_ipc_tx_message_no_reply(cdev, msg);
222222
kfree(msg);
223223
return ret;
224224
}

0 commit comments

Comments
 (0)