Lines Matching refs:ipc
240 static int tx_wait_done(struct snd_sof_ipc *ipc, struct snd_sof_ipc_msg *msg, in tx_wait_done() argument
243 struct snd_sof_dev *sdev = ipc->sdev; in tx_wait_done()
255 snd_sof_handle_fw_exception(ipc->sdev); in tx_wait_done()
282 static int sof_ipc_tx_message_unlocked(struct snd_sof_ipc *ipc, u32 header, in sof_ipc_tx_message_unlocked() argument
286 struct snd_sof_dev *sdev = ipc->sdev; in sof_ipc_tx_message_unlocked()
290 if (ipc->disable_ipc_tx) in sof_ipc_tx_message_unlocked()
300 msg = &ipc->msg; in sof_ipc_tx_message_unlocked()
330 return tx_wait_done(ipc, msg, reply_data); in sof_ipc_tx_message_unlocked()
334 int sof_ipc_tx_message(struct snd_sof_ipc *ipc, u32 header, in sof_ipc_tx_message() argument
344 ret = snd_sof_dsp_set_power_state(ipc->sdev, &target_state); in sof_ipc_tx_message()
346 dev_err(ipc->sdev->dev, "error: resuming DSP %d\n", ret); in sof_ipc_tx_message()
350 return sof_ipc_tx_message_no_pm(ipc, header, msg_data, msg_bytes, in sof_ipc_tx_message()
360 int sof_ipc_tx_message_no_pm(struct snd_sof_ipc *ipc, u32 header, in sof_ipc_tx_message_no_pm() argument
371 mutex_lock(&ipc->tx_mutex); in sof_ipc_tx_message_no_pm()
373 ret = sof_ipc_tx_message_unlocked(ipc, header, msg_data, msg_bytes, in sof_ipc_tx_message_no_pm()
376 mutex_unlock(&ipc->tx_mutex); in sof_ipc_tx_message_no_pm()
385 struct snd_sof_ipc_msg *msg = &sdev->ipc->msg; in snd_sof_ipc_reply()
624 err = sof_ipc_tx_message(sdev->ipc, in snd_sof_ipc_stream_posn()
705 mutex_lock(&sdev->ipc->tx_mutex); in sof_set_get_large_ctrl_data()
719 err = sof_ipc_tx_message_unlocked(sdev->ipc, in sof_set_get_large_ctrl_data()
734 mutex_unlock(&sdev->ipc->tx_mutex); in sof_set_get_large_ctrl_data()
840 err = sof_ipc_tx_message(sdev->ipc, cdata->rhdr.hdr.cmd, cdata, in snd_sof_ipc_set_get_comp_data()
926 msg = &sdev->ipc->msg; in sof_ipc_init_msg_memory()
940 struct snd_sof_ipc *ipc; in snd_sof_ipc_init() local
943 ipc = devm_kzalloc(sdev->dev, sizeof(*ipc), GFP_KERNEL); in snd_sof_ipc_init()
944 if (!ipc) in snd_sof_ipc_init()
947 mutex_init(&ipc->tx_mutex); in snd_sof_ipc_init()
948 ipc->sdev = sdev; in snd_sof_ipc_init()
949 msg = &ipc->msg; in snd_sof_ipc_init()
956 return ipc; in snd_sof_ipc_init()
962 struct snd_sof_ipc *ipc = sdev->ipc; in snd_sof_ipc_free() local
964 if (!ipc) in snd_sof_ipc_free()
968 mutex_lock(&ipc->tx_mutex); in snd_sof_ipc_free()
969 ipc->disable_ipc_tx = true; in snd_sof_ipc_free()
970 mutex_unlock(&ipc->tx_mutex); in snd_sof_ipc_free()