Skip to content

Commit 0386dd9

Browse files
committed
ASoC: SOF: Rework the firmware ready message handling
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>: The firmware ready (fw_ready) message is sent by the firmware to notify the host that it has been booted up and caries additional information about it's configuration. All of this is IPC specific, the message itself is IPC version specific and the information itself also. Move the code to handle the fw_ready message under ipc3.c since the parsing and interpretation is IPC specific. A followup series is going to take care of the rest of the loader.c to make it IPC agnostic.
2 parents 9a2fb6e + 19faf9e commit 0386dd9

12 files changed

Lines changed: 307 additions & 261 deletions

File tree

sound/soc/sof/amd/renoir.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ struct snd_sof_dsp_ops sof_renoir_ops = {
152152
.ipc_msg_data = acp_sof_ipc_msg_data,
153153
.get_mailbox_offset = acp_sof_ipc_get_mailbox_offset,
154154
.irq_thread = acp_sof_ipc_irq_thread,
155-
.fw_ready = sof_fw_ready,
156155

157156
/* DAI drivers */
158157
.drv = renoir_sof_dai,

sound/soc/sof/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ int snd_sof_device_probe(struct device *dev, struct snd_sof_pdata *plat_data)
374374
if (!sof_ops(sdev) || !sof_ops(sdev)->probe || !sof_ops(sdev)->run ||
375375
!sof_ops(sdev)->block_read || !sof_ops(sdev)->block_write ||
376376
!sof_ops(sdev)->send_msg || !sof_ops(sdev)->load_firmware ||
377-
!sof_ops(sdev)->ipc_msg_data || !sof_ops(sdev)->fw_ready) {
377+
!sof_ops(sdev)->ipc_msg_data) {
378378
dev_err(dev, "error: missing mandatory ops\n");
379379
return -EINVAL;
380380
}

sound/soc/sof/imx/imx8.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,6 @@ static struct snd_sof_dsp_ops sof_imx8_ops = {
504504

505505
/* ipc */
506506
.send_msg = imx8_send_msg,
507-
.fw_ready = sof_fw_ready,
508507
.get_mailbox_offset = imx8_get_mailbox_offset,
509508
.get_window_offset = imx8_get_window_offset,
510509

@@ -567,7 +566,6 @@ static struct snd_sof_dsp_ops sof_imx8x_ops = {
567566

568567
/* ipc */
569568
.send_msg = imx8_send_msg,
570-
.fw_ready = sof_fw_ready,
571569
.get_mailbox_offset = imx8_get_mailbox_offset,
572570
.get_window_offset = imx8_get_window_offset,
573571

sound/soc/sof/imx/imx8m.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,6 @@ static struct snd_sof_dsp_ops sof_imx8m_ops = {
430430

431431
/* ipc */
432432
.send_msg = imx8m_send_msg,
433-
.fw_ready = sof_fw_ready,
434433
.get_mailbox_offset = imx8m_get_mailbox_offset,
435434
.get_window_offset = imx8m_get_window_offset,
436435

sound/soc/sof/intel/bdw.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,6 @@ static struct snd_sof_dsp_ops sof_bdw_ops = {
591591

592592
/* ipc */
593593
.send_msg = bdw_send_msg,
594-
.fw_ready = sof_fw_ready,
595594
.get_mailbox_offset = bdw_get_mailbox_offset,
596595
.get_window_offset = bdw_get_window_offset,
597596

sound/soc/sof/intel/byt.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@ static struct snd_sof_dsp_ops sof_byt_ops = {
245245

246246
/* ipc */
247247
.send_msg = atom_send_msg,
248-
.fw_ready = sof_fw_ready,
249248
.get_mailbox_offset = atom_get_mailbox_offset,
250249
.get_window_offset = atom_get_window_offset,
251250

@@ -328,7 +327,6 @@ static struct snd_sof_dsp_ops sof_cht_ops = {
328327

329328
/* ipc */
330329
.send_msg = atom_send_msg,
331-
.fw_ready = sof_fw_ready,
332330
.get_mailbox_offset = atom_get_mailbox_offset,
333331
.get_window_offset = atom_get_window_offset,
334332

sound/soc/sof/intel/hda-common-ops.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ struct snd_sof_dsp_ops sof_hda_common_ops = {
3434
.mailbox_write = sof_mailbox_write,
3535

3636
/* ipc */
37-
.fw_ready = sof_fw_ready,
3837
.get_mailbox_offset = hda_dsp_ipc_get_mailbox_offset,
3938
.get_window_offset = hda_dsp_ipc_get_window_offset,
4039

sound/soc/sof/intel/pci-tng.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ struct snd_sof_dsp_ops sof_tng_ops = {
164164

165165
/* ipc */
166166
.send_msg = atom_send_msg,
167-
.fw_ready = sof_fw_ready,
168167
.get_mailbox_offset = atom_get_mailbox_offset,
169168
.get_window_offset = atom_get_window_offset,
170169

sound/soc/sof/ipc.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -188,21 +188,6 @@ int snd_sof_ipc_valid(struct snd_sof_dev *sdev)
188188
}
189189
EXPORT_SYMBOL(snd_sof_ipc_valid);
190190

191-
int sof_ipc_init_msg_memory(struct snd_sof_dev *sdev)
192-
{
193-
struct snd_sof_ipc_msg *msg;
194-
195-
msg = &sdev->ipc->msg;
196-
197-
msg->reply_data = devm_kzalloc(sdev->dev, SOF_IPC_MSG_MAX_SIZE, GFP_KERNEL);
198-
if (!msg->reply_data)
199-
return -ENOMEM;
200-
201-
sdev->ipc->max_payload_size = SOF_IPC_MSG_MAX_SIZE;
202-
203-
return 0;
204-
}
205-
206191
struct snd_sof_ipc *snd_sof_ipc_init(struct snd_sof_dev *sdev)
207192
{
208193
struct snd_sof_ipc *ipc;

0 commit comments

Comments
 (0)