Commit 9d562fdc authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Mark Brown

ASoC: SOF: ipc: Rename send parameter in snd_sof_ipc_set_get_comp_data()

Rename the send parameter to set in snd_sof_ipc_set_get_comp_data() and
sof_set_get_large_ctrl_data() to be more aligned with the function name.

No functional change.
Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20211215180404.53254-2-ranjani.sridharan@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2167c0b2
...@@ -745,7 +745,7 @@ static int sof_get_ctrl_copy_params(enum sof_ipc_ctrl_type ctrl_type, ...@@ -745,7 +745,7 @@ static int sof_get_ctrl_copy_params(enum sof_ipc_ctrl_type ctrl_type,
static int sof_set_get_large_ctrl_data(struct snd_sof_dev *sdev, static int sof_set_get_large_ctrl_data(struct snd_sof_dev *sdev,
struct sof_ipc_ctrl_data *cdata, struct sof_ipc_ctrl_data *cdata,
struct sof_ipc_ctrl_data_params *sparams, struct sof_ipc_ctrl_data_params *sparams,
bool send) bool set)
{ {
struct sof_ipc_ctrl_data *partdata; struct sof_ipc_ctrl_data *partdata;
size_t send_bytes; size_t send_bytes;
...@@ -760,7 +760,7 @@ static int sof_set_get_large_ctrl_data(struct snd_sof_dev *sdev, ...@@ -760,7 +760,7 @@ static int sof_set_get_large_ctrl_data(struct snd_sof_dev *sdev,
if (!partdata) if (!partdata)
return -ENOMEM; return -ENOMEM;
if (send) if (set)
err = sof_get_ctrl_copy_params(cdata->type, cdata, partdata, err = sof_get_ctrl_copy_params(cdata->type, cdata, partdata,
sparams); sparams);
else else
...@@ -789,7 +789,7 @@ static int sof_set_get_large_ctrl_data(struct snd_sof_dev *sdev, ...@@ -789,7 +789,7 @@ static int sof_set_get_large_ctrl_data(struct snd_sof_dev *sdev,
msg_bytes -= send_bytes; msg_bytes -= send_bytes;
partdata->elems_remaining = msg_bytes; partdata->elems_remaining = msg_bytes;
if (send) if (set)
memcpy(sparams->dst, sparams->src + offset, send_bytes); memcpy(sparams->dst, sparams->src + offset, send_bytes);
err = sof_ipc_tx_message_unlocked(sdev->ipc, err = sof_ipc_tx_message_unlocked(sdev->ipc,
...@@ -801,7 +801,7 @@ static int sof_set_get_large_ctrl_data(struct snd_sof_dev *sdev, ...@@ -801,7 +801,7 @@ static int sof_set_get_large_ctrl_data(struct snd_sof_dev *sdev,
if (err < 0) if (err < 0)
break; break;
if (!send) if (!set)
memcpy(sparams->dst + offset, sparams->src, send_bytes); memcpy(sparams->dst + offset, sparams->src, send_bytes);
offset += pl_size; offset += pl_size;
...@@ -819,8 +819,7 @@ static int sof_set_get_large_ctrl_data(struct snd_sof_dev *sdev, ...@@ -819,8 +819,7 @@ static int sof_set_get_large_ctrl_data(struct snd_sof_dev *sdev,
int snd_sof_ipc_set_get_comp_data(struct snd_sof_control *scontrol, int snd_sof_ipc_set_get_comp_data(struct snd_sof_control *scontrol,
u32 ipc_cmd, u32 ipc_cmd,
enum sof_ipc_ctrl_type ctrl_type, enum sof_ipc_ctrl_type ctrl_type,
enum sof_ipc_ctrl_cmd ctrl_cmd, enum sof_ipc_ctrl_cmd ctrl_cmd, bool set)
bool send)
{ {
struct snd_soc_component *scomp = scontrol->scomp; struct snd_soc_component *scomp = scontrol->scomp;
struct sof_ipc_ctrl_data *cdata = scontrol->control_data; struct sof_ipc_ctrl_data *cdata = scontrol->control_data;
...@@ -858,7 +857,7 @@ int snd_sof_ipc_set_get_comp_data(struct snd_sof_control *scontrol, ...@@ -858,7 +857,7 @@ int snd_sof_ipc_set_get_comp_data(struct snd_sof_control *scontrol,
/* write/read value header via mmaped region */ /* write/read value header via mmaped region */
send_bytes = sizeof(struct sof_ipc_ctrl_value_chan) * send_bytes = sizeof(struct sof_ipc_ctrl_value_chan) *
cdata->num_elems; cdata->num_elems;
if (send) if (set)
err = snd_sof_dsp_block_write(sdev, SOF_FW_BLK_TYPE_IRAM, err = snd_sof_dsp_block_write(sdev, SOF_FW_BLK_TYPE_IRAM,
scontrol->readback_offset, scontrol->readback_offset,
cdata->chanv, send_bytes); cdata->chanv, send_bytes);
...@@ -870,7 +869,7 @@ int snd_sof_ipc_set_get_comp_data(struct snd_sof_control *scontrol, ...@@ -870,7 +869,7 @@ int snd_sof_ipc_set_get_comp_data(struct snd_sof_control *scontrol,
if (err) if (err)
dev_err_once(sdev->dev, "error: %s TYPE_IRAM failed\n", dev_err_once(sdev->dev, "error: %s TYPE_IRAM failed\n",
send ? "write to" : "read from"); set ? "write to" : "read from");
return err; return err;
} }
...@@ -934,7 +933,7 @@ int snd_sof_ipc_set_get_comp_data(struct snd_sof_control *scontrol, ...@@ -934,7 +933,7 @@ int snd_sof_ipc_set_get_comp_data(struct snd_sof_control *scontrol,
return -EINVAL; return -EINVAL;
} }
err = sof_set_get_large_ctrl_data(sdev, cdata, &sparams, send); err = sof_set_get_large_ctrl_data(sdev, cdata, &sparams, set);
if (err < 0) if (err < 0)
dev_err(sdev->dev, "error: set/get large ctrl ipc comp %d\n", dev_err(sdev->dev, "error: set/get large ctrl ipc comp %d\n",
......
...@@ -242,8 +242,7 @@ static inline void snd_sof_compr_init_elapsed_work(struct work_struct *work) { } ...@@ -242,8 +242,7 @@ static inline void snd_sof_compr_init_elapsed_work(struct work_struct *work) { }
int snd_sof_ipc_set_get_comp_data(struct snd_sof_control *scontrol, int snd_sof_ipc_set_get_comp_data(struct snd_sof_control *scontrol,
u32 ipc_cmd, u32 ipc_cmd,
enum sof_ipc_ctrl_type ctrl_type, enum sof_ipc_ctrl_type ctrl_type,
enum sof_ipc_ctrl_cmd ctrl_cmd, enum sof_ipc_ctrl_cmd ctrl_cmd, bool set);
bool send);
/* DAI link fixup */ /* DAI link fixup */
int sof_pcm_dai_link_fixup(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params); int sof_pcm_dai_link_fixup(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment