Lines Matching refs:available_fmt

225 				  struct sof_ipc4_available_audio_format *available_fmt,  in sof_ipc4_get_audio_fmt()  argument
232 ret = sof_update_ipc_object(scomp, available_fmt, in sof_ipc4_get_audio_fmt()
234 swidget->num_tuples, sizeof(*available_fmt), 1); in sof_ipc4_get_audio_fmt()
240 if (!available_fmt->num_input_formats && !available_fmt->num_output_formats) { in sof_ipc4_get_audio_fmt()
247 available_fmt->num_input_formats, available_fmt->num_output_formats); in sof_ipc4_get_audio_fmt()
261 if (available_fmt->num_input_formats) { in sof_ipc4_get_audio_fmt()
262 in_format = kcalloc(available_fmt->num_input_formats, in sof_ipc4_get_audio_fmt()
266 available_fmt->input_pin_fmts = in_format; in sof_ipc4_get_audio_fmt()
271 available_fmt->num_input_formats); in sof_ipc4_get_audio_fmt()
279 available_fmt->num_input_formats); in sof_ipc4_get_audio_fmt()
282 if (available_fmt->num_output_formats) { in sof_ipc4_get_audio_fmt()
283 out_format = kcalloc(available_fmt->num_output_formats, sizeof(*out_format), in sof_ipc4_get_audio_fmt()
293 available_fmt->num_output_formats); in sof_ipc4_get_audio_fmt()
299 available_fmt->output_pin_fmts = out_format; in sof_ipc4_get_audio_fmt()
302 available_fmt->num_output_formats); in sof_ipc4_get_audio_fmt()
311 available_fmt->input_pin_fmts = NULL; in sof_ipc4_get_audio_fmt()
316 static void sof_ipc4_free_audio_fmt(struct sof_ipc4_available_audio_format *available_fmt) in sof_ipc4_free_audio_fmt() argument
319 kfree(available_fmt->output_pin_fmts); in sof_ipc4_free_audio_fmt()
320 available_fmt->output_pin_fmts = NULL; in sof_ipc4_free_audio_fmt()
321 kfree(available_fmt->input_pin_fmts); in sof_ipc4_free_audio_fmt()
322 available_fmt->input_pin_fmts = NULL; in sof_ipc4_free_audio_fmt()
390 struct sof_ipc4_available_audio_format *available_fmt; in sof_ipc4_widget_setup_pcm() local
401 available_fmt = &ipc4_copier->available_fmt; in sof_ipc4_widget_setup_pcm()
405 ret = sof_ipc4_get_audio_fmt(scomp, swidget, available_fmt, in sof_ipc4_widget_setup_pcm()
464 sof_ipc4_free_audio_fmt(available_fmt); in sof_ipc4_widget_setup_pcm()
474 struct sof_ipc4_available_audio_format *available_fmt; in sof_ipc4_widget_free_comp_pcm() local
479 available_fmt = &ipc4_copier->available_fmt; in sof_ipc4_widget_free_comp_pcm()
480 kfree(available_fmt->output_pin_fmts); in sof_ipc4_widget_free_comp_pcm()
488 struct sof_ipc4_available_audio_format *available_fmt; in sof_ipc4_widget_setup_comp_dai() local
501 available_fmt = &ipc4_copier->available_fmt; in sof_ipc4_widget_setup_comp_dai()
505 ret = sof_ipc4_get_audio_fmt(scomp, swidget, available_fmt, in sof_ipc4_widget_setup_comp_dai()
618 sof_ipc4_free_audio_fmt(available_fmt); in sof_ipc4_widget_setup_comp_dai()
628 struct sof_ipc4_available_audio_format *available_fmt; in sof_ipc4_widget_free_comp_dai() local
642 available_fmt = &ipc4_copier->available_fmt; in sof_ipc4_widget_free_comp_dai()
644 kfree(available_fmt->output_pin_fmts); in sof_ipc4_widget_free_comp_dai()
725 ret = sof_ipc4_get_audio_fmt(scomp, swidget, &gain->available_fmt, &gain->base_config); in sof_ipc4_widget_setup_comp_pga()
749 sof_ipc4_free_audio_fmt(&gain->available_fmt); in sof_ipc4_widget_setup_comp_pga()
762 sof_ipc4_free_audio_fmt(&gain->available_fmt); in sof_ipc4_widget_free_comp_pga()
781 ret = sof_ipc4_get_audio_fmt(scomp, swidget, &mixer->available_fmt, in sof_ipc4_widget_setup_comp_mixer()
792 sof_ipc4_free_audio_fmt(&mixer->available_fmt); in sof_ipc4_widget_setup_comp_mixer()
812 ret = sof_ipc4_get_audio_fmt(scomp, swidget, &src->available_fmt, &src->base_config); in sof_ipc4_widget_setup_comp_src()
831 sof_ipc4_free_audio_fmt(&src->available_fmt); in sof_ipc4_widget_setup_comp_src()
844 sof_ipc4_free_audio_fmt(&src->available_fmt); in sof_ipc4_widget_free_comp_src()
856 sof_ipc4_free_audio_fmt(&mixer->available_fmt); in sof_ipc4_widget_free_comp_mixer()
878 ret = sof_ipc4_get_audio_fmt(scomp, swidget, &process->available_fmt, in sof_ipc4_widget_setup_comp_process()
928 sof_ipc4_free_audio_fmt(&process->available_fmt); in sof_ipc4_widget_setup_comp_process()
944 sof_ipc4_free_audio_fmt(&process->available_fmt); in sof_ipc4_widget_free_comp_process()
1086 struct sof_ipc4_available_audio_format *available_fmt, in sof_ipc4_init_output_audio_fmt() argument
1094 if (!available_fmt->num_output_formats) in sof_ipc4_init_output_audio_fmt()
1097 single_format = sof_ipc4_is_single_format(sdev, available_fmt->output_pin_fmts, in sof_ipc4_init_output_audio_fmt()
1098 available_fmt->num_output_formats); in sof_ipc4_init_output_audio_fmt()
1102 base_config->obs = available_fmt->output_pin_fmts[0].buffer_size; in sof_ipc4_init_output_audio_fmt()
1110 for (i = 0; i < available_fmt->num_output_formats; i++) { in sof_ipc4_init_output_audio_fmt()
1113 out_fmt = &available_fmt->output_pin_fmts[i].audio_fmt; in sof_ipc4_init_output_audio_fmt()
1120 base_config->obs = available_fmt->output_pin_fmts[i].buffer_size; in sof_ipc4_init_output_audio_fmt()
1147 struct sof_ipc4_available_audio_format *available_fmt) in sof_ipc4_init_input_audio_fmt() argument
1149 struct sof_ipc4_pin_format *pin_fmts = available_fmt->input_pin_fmts; in sof_ipc4_init_input_audio_fmt()
1150 u32 pin_fmts_size = available_fmt->num_input_formats; in sof_ipc4_init_input_audio_fmt()
1158 if (!available_fmt->num_input_formats) { in sof_ipc4_init_input_audio_fmt()
1163 single_format = sof_ipc4_is_single_format(sdev, available_fmt->input_pin_fmts, in sof_ipc4_init_input_audio_fmt()
1164 available_fmt->num_input_formats); in sof_ipc4_init_input_audio_fmt()
1201 if (available_fmt->num_input_formats && i < available_fmt->num_input_formats) { in sof_ipc4_init_input_audio_fmt()
1202 memcpy(&base_config->audio_fmt, &available_fmt->input_pin_fmts[i].audio_fmt, in sof_ipc4_init_input_audio_fmt()
1206 base_config->ibs = available_fmt->input_pin_fmts[i].buffer_size; in sof_ipc4_init_input_audio_fmt()
1209 sof_ipc4_dbg_audio_format(sdev->dev, &available_fmt->input_pin_fmts[i], 1); in sof_ipc4_init_input_audio_fmt()
1403 struct sof_ipc4_available_audio_format *available_fmt; in sof_ipc4_prepare_copier_module() local
1444 available_fmt = &ipc4_copier->available_fmt; in sof_ipc4_prepare_copier_module()
1509 available_fmt = &ipc4_copier->available_fmt; in sof_ipc4_prepare_copier_module()
1535 available_fmt = &ipc4_copier->available_fmt; in sof_ipc4_prepare_copier_module()
1548 available_fmt); in sof_ipc4_prepare_copier_module()
1554 available_fmt->output_pin_fmts, in sof_ipc4_prepare_copier_module()
1555 available_fmt->num_output_formats); in sof_ipc4_prepare_copier_module()
1563 in_fmt = &available_fmt->input_pin_fmts[ret].audio_fmt; in sof_ipc4_prepare_copier_module()
1597 out_fmt = &available_fmt->output_pin_fmts[0].audio_fmt; in sof_ipc4_prepare_copier_module()
1606 available_fmt, out_ref_rate, in sof_ipc4_prepare_copier_module()
1622 &available_fmt->output_pin_fmts[output_fmt_index].audio_fmt, in sof_ipc4_prepare_copier_module()
1625 sof_ipc4_dbg_audio_format(sdev->dev, &available_fmt->output_pin_fmts[output_fmt_index], 1); in sof_ipc4_prepare_copier_module()
1809 struct sof_ipc4_available_audio_format *available_fmt = &gain->available_fmt; in sof_ipc4_prepare_gain_module() local
1815 pipeline_params, available_fmt); in sof_ipc4_prepare_gain_module()
1819 in_fmt = &available_fmt->input_pin_fmts[ret].audio_fmt; in sof_ipc4_prepare_gain_module()
1824 ret = sof_ipc4_init_output_audio_fmt(sdev, &gain->base_config, available_fmt, in sof_ipc4_prepare_gain_module()
1846 struct sof_ipc4_available_audio_format *available_fmt = &mixer->available_fmt; in sof_ipc4_prepare_mixer_module() local
1852 pipeline_params, available_fmt); in sof_ipc4_prepare_mixer_module()
1856 in_fmt = &available_fmt->input_pin_fmts[ret].audio_fmt; in sof_ipc4_prepare_mixer_module()
1861 ret = sof_ipc4_init_output_audio_fmt(sdev, &mixer->base_config, available_fmt, in sof_ipc4_prepare_mixer_module()
1883 struct sof_ipc4_available_audio_format *available_fmt = &src->available_fmt; in sof_ipc4_prepare_src_module() local
1890 pipeline_params, available_fmt); in sof_ipc4_prepare_src_module()
1898 if (dir == SNDRV_PCM_STREAM_PLAYBACK && available_fmt->num_output_formats > 1) { in sof_ipc4_prepare_src_module()
1900 available_fmt->num_output_formats, swidget->widget->name); in sof_ipc4_prepare_src_module()
1908 in_audio_fmt = &available_fmt->input_pin_fmts[input_format_index].audio_fmt; in sof_ipc4_prepare_src_module()
1920 available_fmt, out_ref_rate, in sof_ipc4_prepare_src_module()
1931 out_audio_fmt = &available_fmt->output_pin_fmts[output_format_index].audio_fmt; in sof_ipc4_prepare_src_module()
1943 struct sof_ipc4_available_audio_format *available_fmt = &process->available_fmt; in sof_ipc4_process_set_pin_formats() local
1953 format_list_to_search = available_fmt->input_pin_fmts; in sof_ipc4_process_set_pin_formats()
1954 format_list_count = available_fmt->num_input_formats; in sof_ipc4_process_set_pin_formats()
1958 format_list_to_search = available_fmt->output_pin_fmts; in sof_ipc4_process_set_pin_formats()
1959 format_list_count = available_fmt->num_output_formats; in sof_ipc4_process_set_pin_formats()
2024 struct sof_ipc4_available_audio_format *available_fmt = &process->available_fmt; in sof_ipc4_prepare_process_module() local
2032 pipeline_params, available_fmt); in sof_ipc4_prepare_process_module()
2036 in_fmt = &available_fmt->input_pin_fmts[ret].audio_fmt; in sof_ipc4_prepare_process_module()
2042 available_fmt, out_ref_rate, in sof_ipc4_prepare_process_module()
2044 if (output_fmt_index < 0 && available_fmt->num_output_formats) { in sof_ipc4_prepare_process_module()
2051 if (available_fmt->num_output_formats && in sof_ipc4_prepare_process_module()
2052 output_fmt_index < available_fmt->num_output_formats && in sof_ipc4_prepare_process_module()
2053 !available_fmt->output_pin_fmts[output_fmt_index].pin_index) { in sof_ipc4_prepare_process_module()
2055 &available_fmt->output_pin_fmts[output_fmt_index].audio_fmt, in sof_ipc4_prepare_process_module()