* @swidget: pointer to struct snd_sof_widget containing tuples
* @available_fmt: pointer to struct sof_ipc4_available_audio_format being filling in
* @module_base_cfg: Pointer to the base_config in the module init IPC payload
- * @has_out_format: true if available_fmt contains output format
*
* Return: 0 if successful
*/
static int sof_ipc4_get_audio_fmt(struct snd_soc_component *scomp,
struct snd_sof_widget *swidget,
struct sof_ipc4_available_audio_format *available_fmt,
- struct sof_ipc4_base_module_cfg *module_base_cfg,
- bool has_out_format)
+ struct sof_ipc4_base_module_cfg *module_base_cfg)
{
struct sof_ipc4_base_module_cfg *base_config;
struct sof_ipc4_audio_format *out_format, *in_format;
sizeof(struct sof_ipc4_audio_format),
available_fmt->audio_fmt_num);
- if (!has_out_format)
- return 0;
-
out_format = kcalloc(available_fmt->audio_fmt_num, sizeof(*out_format), GFP_KERNEL);
if (!out_format) {
ret = -ENOMEM;
dev_dbg(scomp->dev, "Updating IPC structure for %s\n", swidget->widget->name);
ret = sof_ipc4_get_audio_fmt(scomp, swidget, available_fmt,
- &ipc4_copier->data.base_config, true);
+ &ipc4_copier->data.base_config);
if (ret)
goto free_copier;
dev_dbg(scomp->dev, "Updating IPC structure for %s\n", swidget->widget->name);
ret = sof_ipc4_get_audio_fmt(scomp, swidget, available_fmt,
- &ipc4_copier->data.base_config, true);
+ &ipc4_copier->data.base_config);
if (ret)
goto free_copier;
gain->data.channels = SOF_IPC4_GAIN_ALL_CHANNELS_MASK;
gain->data.init_val = SOF_IPC4_VOL_ZERO_DB;
- /* The out_audio_fmt in topology is ignored as it is not required to be sent to the FW */
- ret = sof_ipc4_get_audio_fmt(scomp, swidget, &gain->available_fmt, &gain->base_config,
- false);
+ ret = sof_ipc4_get_audio_fmt(scomp, swidget, &gain->available_fmt, &gain->base_config);
if (ret)
goto err;
swidget->private = mixer;
- /* The out_audio_fmt in topology is ignored as it is not required to be sent to the FW */
ret = sof_ipc4_get_audio_fmt(scomp, swidget, &mixer->available_fmt,
- &mixer->base_config, false);
+ &mixer->base_config);
if (ret)
goto err;
swidget->private = src;
- /* The out_audio_fmt in topology is ignored as it is not required by SRC */
- ret = sof_ipc4_get_audio_fmt(scomp, swidget, &src->available_fmt, &src->base_config,
- false);
+ ret = sof_ipc4_get_audio_fmt(scomp, swidget, &src->available_fmt, &src->base_config);
if (ret)
goto err;