summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>2023-05-15 13:33:31 +0300
committerMark Brown <broonie@kernel.org>2023-05-15 20:12:52 +0900
commitae45aebe45600a85c410280badec6b209979cf7c (patch)
tree679b2580cdd944d69ffe1a4df516895a3ca52f8f /sound/soc
parenta2e07c3319f79f7305641b98d32765dc5b607873 (diff)
downloadlinux-next-ae45aebe45600a85c410280badec6b209979cf7c.tar.gz
ASoC: SOF: ipc4-topology: Rename sof_ipc4_init_audio_fmt()
Rename it to sof_ipc4_init_input_audio_fmt() as it only does input format selection now. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com Link: https://lore.kernel.org/r/20230515103336.16132-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/sof/ipc4-topology.c51
1 files changed, 26 insertions, 25 deletions
diff --git a/sound/soc/sof/ipc4-topology.c b/sound/soc/sof/ipc4-topology.c
index 87ab415b27da..a079dd8eb7e1 100644
--- a/sound/soc/sof/ipc4-topology.c
+++ b/sound/soc/sof/ipc4-topology.c
@@ -1048,12 +1048,12 @@ static int sof_ipc4_init_output_audio_fmt(struct snd_sof_dev *sdev,
return i;
}
-static int sof_ipc4_init_audio_fmt(struct snd_sof_dev *sdev,
- struct snd_sof_widget *swidget,
- struct sof_ipc4_base_module_cfg *base_config,
- struct snd_pcm_hw_params *params,
- struct sof_ipc4_available_audio_format *available_fmt,
- struct sof_ipc4_pin_format *pin_fmts, u32 pin_fmts_size)
+static int sof_ipc4_init_input_audio_fmt(struct snd_sof_dev *sdev,
+ struct snd_sof_widget *swidget,
+ struct sof_ipc4_base_module_cfg *base_config,
+ struct snd_pcm_hw_params *params,
+ struct sof_ipc4_available_audio_format *available_fmt,
+ struct sof_ipc4_pin_format *pin_fmts, u32 pin_fmts_size)
{
u32 valid_bits;
u32 channels;
@@ -1514,8 +1514,9 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget,
}
/* set input and output audio formats */
- ret = sof_ipc4_init_audio_fmt(sdev, swidget, &copier_data->base_config, ref_params,
- available_fmt, format_list_to_search, format_list_count);
+ ret = sof_ipc4_init_input_audio_fmt(sdev, swidget, &copier_data->base_config, ref_params,
+ available_fmt, format_list_to_search,
+ format_list_count);
if (ret < 0)
return ret;
@@ -1541,7 +1542,7 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget,
{
/*
* Only SOF_DAI_INTEL_ALH needs copier_data to set blob.
- * That's why only ALH dai's blob is set after sof_ipc4_init_audio_fmt
+ * That's why only ALH dai's blob is set after sof_ipc4_init_input_audio_fmt
*/
if (ipc4_copier->dai_type == SOF_DAI_INTEL_ALH) {
struct sof_ipc4_alh_configuration_blob *blob;
@@ -1692,10 +1693,10 @@ static int sof_ipc4_prepare_gain_module(struct snd_sof_widget *swidget,
struct sof_ipc4_available_audio_format *available_fmt = &gain->available_fmt;
int ret;
- ret = sof_ipc4_init_audio_fmt(sdev, swidget, &gain->base_config,
- pipeline_params, available_fmt,
- available_fmt->input_pin_fmts,
- available_fmt->num_input_formats);
+ ret = sof_ipc4_init_input_audio_fmt(sdev, swidget, &gain->base_config,
+ pipeline_params, available_fmt,
+ available_fmt->input_pin_fmts,
+ available_fmt->num_input_formats);
if (ret < 0)
return ret;
@@ -1718,10 +1719,10 @@ static int sof_ipc4_prepare_mixer_module(struct snd_sof_widget *swidget,
struct sof_ipc4_available_audio_format *available_fmt = &mixer->available_fmt;
int ret;
- ret = sof_ipc4_init_audio_fmt(sdev, swidget, &mixer->base_config,
- pipeline_params, available_fmt,
- available_fmt->input_pin_fmts,
- available_fmt->num_input_formats);
+ ret = sof_ipc4_init_input_audio_fmt(sdev, swidget, &mixer->base_config,
+ pipeline_params, available_fmt,
+ available_fmt->input_pin_fmts,
+ available_fmt->num_input_formats);
if (ret < 0)
return ret;
@@ -1745,10 +1746,10 @@ static int sof_ipc4_prepare_src_module(struct snd_sof_widget *swidget,
struct snd_interval *rate;
int ret;
- ret = sof_ipc4_init_audio_fmt(sdev, swidget, &src->base_config,
- pipeline_params, available_fmt,
- available_fmt->input_pin_fmts,
- available_fmt->num_input_formats);
+ ret = sof_ipc4_init_input_audio_fmt(sdev, swidget, &src->base_config,
+ pipeline_params, available_fmt,
+ available_fmt->input_pin_fmts,
+ available_fmt->num_input_formats);
if (ret < 0)
return ret;
@@ -1856,10 +1857,10 @@ static int sof_ipc4_prepare_process_module(struct snd_sof_widget *swidget,
int output_fmt_index;
int ret;
- ret = sof_ipc4_init_audio_fmt(sdev, swidget, &process->base_config,
- pipeline_params, available_fmt,
- available_fmt->input_pin_fmts,
- available_fmt->num_input_formats);
+ ret = sof_ipc4_init_input_audio_fmt(sdev, swidget, &process->base_config,
+ pipeline_params, available_fmt,
+ available_fmt->input_pin_fmts,
+ available_fmt->num_input_formats);
if (ret < 0)
return ret;