Commit bdcf7926 authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Mark Brown

ASoC: SOF: probes: rename assign/free callbacks as startup/shutdown

assign/free are not well aligned to usual conventions and specifically
not to the compressed ops that make use of the probe callbacks.

Use the more common startup/shutdown. No functional change beyond
renaming.
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: default avatarPéter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220715145216.277003-11-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 054d1fd1
...@@ -25,7 +25,7 @@ hda_compr_get_stream(struct snd_compr_stream *cstream) ...@@ -25,7 +25,7 @@ hda_compr_get_stream(struct snd_compr_stream *cstream)
return cstream->runtime->private_data; return cstream->runtime->private_data;
} }
static int hda_probes_compr_assign(struct sof_client_dev *cdev, static int hda_probes_compr_startup(struct sof_client_dev *cdev,
struct snd_compr_stream *cstream, struct snd_compr_stream *cstream,
struct snd_soc_dai *dai, u32 *stream_id) struct snd_soc_dai *dai, u32 *stream_id)
{ {
...@@ -45,7 +45,7 @@ static int hda_probes_compr_assign(struct sof_client_dev *cdev, ...@@ -45,7 +45,7 @@ static int hda_probes_compr_assign(struct sof_client_dev *cdev,
return 0; return 0;
} }
static int hda_probes_compr_free(struct sof_client_dev *cdev, static int hda_probes_compr_shutdown(struct sof_client_dev *cdev,
struct snd_compr_stream *cstream, struct snd_compr_stream *cstream,
struct snd_soc_dai *dai) struct snd_soc_dai *dai)
{ {
...@@ -127,8 +127,8 @@ static int hda_probes_compr_pointer(struct sof_client_dev *cdev, ...@@ -127,8 +127,8 @@ static int hda_probes_compr_pointer(struct sof_client_dev *cdev,
/* SOF client implementation */ /* SOF client implementation */
static const struct sof_probes_host_ops hda_probes_ops = { static const struct sof_probes_host_ops hda_probes_ops = {
.assign = hda_probes_compr_assign, .startup = hda_probes_compr_startup,
.free = hda_probes_compr_free, .shutdown = hda_probes_compr_shutdown,
.set_params = hda_probes_compr_set_params, .set_params = hda_probes_compr_set_params,
.trigger = hda_probes_compr_trigger, .trigger = hda_probes_compr_trigger,
.pointer = hda_probes_compr_pointer, .pointer = hda_probes_compr_pointer,
......
...@@ -270,9 +270,9 @@ static int sof_probes_compr_startup(struct snd_compr_stream *cstream, ...@@ -270,9 +270,9 @@ static int sof_probes_compr_startup(struct snd_compr_stream *cstream,
if (ret) if (ret)
return ret; return ret;
ret = ops->assign(cdev, cstream, dai, &priv->extractor_stream_tag); ret = ops->startup(cdev, cstream, dai, &priv->extractor_stream_tag);
if (ret) { if (ret) {
dev_err(dai->dev, "Failed to assign probe stream: %d\n", ret); dev_err(dai->dev, "Failed to startup probe stream: %d\n", ret);
priv->extractor_stream_tag = SOF_PROBES_INVALID_NODE_ID; priv->extractor_stream_tag = SOF_PROBES_INVALID_NODE_ID;
sof_client_core_module_put(cdev); sof_client_core_module_put(cdev);
} }
...@@ -310,7 +310,7 @@ static int sof_probes_compr_shutdown(struct snd_compr_stream *cstream, ...@@ -310,7 +310,7 @@ static int sof_probes_compr_shutdown(struct snd_compr_stream *cstream,
priv->extractor_stream_tag = SOF_PROBES_INVALID_NODE_ID; priv->extractor_stream_tag = SOF_PROBES_INVALID_NODE_ID;
snd_compr_free_pages(cstream); snd_compr_free_pages(cstream);
ret = ops->free(cdev, cstream, dai); ret = ops->shutdown(cdev, cstream, dai);
sof_client_core_module_put(cdev); sof_client_core_module_put(cdev);
...@@ -709,7 +709,7 @@ static int sof_probes_client_probe(struct auxiliary_device *auxdev, ...@@ -709,7 +709,7 @@ static int sof_probes_client_probe(struct auxiliary_device *auxdev,
ops = dev->platform_data; ops = dev->platform_data;
if (!ops->assign || !ops->free || !ops->set_params || !ops->trigger || if (!ops->startup || !ops->shutdown || !ops->set_params || !ops->trigger ||
!ops->pointer) { !ops->pointer) {
dev_err(dev, "missing platform callback(s)\n"); dev_err(dev, "missing platform callback(s)\n");
return -ENODEV; return -ENODEV;
......
...@@ -14,9 +14,9 @@ struct snd_soc_dai; ...@@ -14,9 +14,9 @@ struct snd_soc_dai;
* DSP and host, like HDA. * DSP and host, like HDA.
*/ */
struct sof_probes_host_ops { struct sof_probes_host_ops {
int (*assign)(struct sof_client_dev *cdev, struct snd_compr_stream *cstream, int (*startup)(struct sof_client_dev *cdev, struct snd_compr_stream *cstream,
struct snd_soc_dai *dai, u32 *stream_id); struct snd_soc_dai *dai, u32 *stream_id);
int (*free)(struct sof_client_dev *cdev, struct snd_compr_stream *cstream, int (*shutdown)(struct sof_client_dev *cdev, struct snd_compr_stream *cstream,
struct snd_soc_dai *dai); struct snd_soc_dai *dai);
int (*set_params)(struct sof_client_dev *cdev, struct snd_compr_stream *cstream, int (*set_params)(struct sof_client_dev *cdev, struct snd_compr_stream *cstream,
struct snd_compr_params *params, struct snd_compr_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