Lines Matching refs:available_fmt

233 				  struct sof_ipc4_available_audio_format *available_fmt,  in sof_ipc4_get_audio_fmt()  argument
240 ret = sof_update_ipc_object(scomp, available_fmt, in sof_ipc4_get_audio_fmt()
242 swidget->num_tuples, sizeof(*available_fmt), 1); in sof_ipc4_get_audio_fmt()
248 if (!available_fmt->num_input_formats && !available_fmt->num_output_formats) { in sof_ipc4_get_audio_fmt()
255 available_fmt->num_input_formats, available_fmt->num_output_formats); in sof_ipc4_get_audio_fmt()
269 if (available_fmt->num_input_formats) { in sof_ipc4_get_audio_fmt()
270 in_format = kcalloc(available_fmt->num_input_formats, in sof_ipc4_get_audio_fmt()
274 available_fmt->input_pin_fmts = in_format; in sof_ipc4_get_audio_fmt()
279 available_fmt->num_input_formats); in sof_ipc4_get_audio_fmt()
287 available_fmt->num_input_formats); in sof_ipc4_get_audio_fmt()
290 if (available_fmt->num_output_formats) { in sof_ipc4_get_audio_fmt()
291 out_format = kcalloc(available_fmt->num_output_formats, sizeof(*out_format), in sof_ipc4_get_audio_fmt()
301 available_fmt->num_output_formats); in sof_ipc4_get_audio_fmt()
307 available_fmt->output_pin_fmts = out_format; in sof_ipc4_get_audio_fmt()
310 available_fmt->num_output_formats); in sof_ipc4_get_audio_fmt()
319 available_fmt->input_pin_fmts = NULL; in sof_ipc4_get_audio_fmt()
324 static void sof_ipc4_free_audio_fmt(struct sof_ipc4_available_audio_format *available_fmt) in sof_ipc4_free_audio_fmt() argument
327 kfree(available_fmt->output_pin_fmts); in sof_ipc4_free_audio_fmt()
328 available_fmt->output_pin_fmts = NULL; in sof_ipc4_free_audio_fmt()
329 kfree(available_fmt->input_pin_fmts); in sof_ipc4_free_audio_fmt()
330 available_fmt->input_pin_fmts = NULL; in sof_ipc4_free_audio_fmt()
398 struct sof_ipc4_available_audio_format *available_fmt; in sof_ipc4_widget_setup_pcm() local
409 available_fmt = &ipc4_copier->available_fmt; in sof_ipc4_widget_setup_pcm()
413 ret = sof_ipc4_get_audio_fmt(scomp, swidget, available_fmt, in sof_ipc4_widget_setup_pcm()
472 sof_ipc4_free_audio_fmt(available_fmt); in sof_ipc4_widget_setup_pcm()
482 struct sof_ipc4_available_audio_format *available_fmt; in sof_ipc4_widget_free_comp_pcm() local
487 available_fmt = &ipc4_copier->available_fmt; in sof_ipc4_widget_free_comp_pcm()
488 kfree(available_fmt->output_pin_fmts); in sof_ipc4_widget_free_comp_pcm()
496 struct sof_ipc4_available_audio_format *available_fmt; in sof_ipc4_widget_setup_comp_dai() local
509 available_fmt = &ipc4_copier->available_fmt; in sof_ipc4_widget_setup_comp_dai()
513 ret = sof_ipc4_get_audio_fmt(scomp, swidget, available_fmt, in sof_ipc4_widget_setup_comp_dai()
626 sof_ipc4_free_audio_fmt(available_fmt); in sof_ipc4_widget_setup_comp_dai()
636 struct sof_ipc4_available_audio_format *available_fmt; in sof_ipc4_widget_free_comp_dai() local
650 available_fmt = &ipc4_copier->available_fmt; in sof_ipc4_widget_free_comp_dai()
652 kfree(available_fmt->output_pin_fmts); in sof_ipc4_widget_free_comp_dai()
735 ret = sof_ipc4_get_audio_fmt(scomp, swidget, &gain->available_fmt, &gain->data.base_config); in sof_ipc4_widget_setup_comp_pga()
759 sof_ipc4_free_audio_fmt(&gain->available_fmt); in sof_ipc4_widget_setup_comp_pga()
772 sof_ipc4_free_audio_fmt(&gain->available_fmt); in sof_ipc4_widget_free_comp_pga()
791 ret = sof_ipc4_get_audio_fmt(scomp, swidget, &mixer->available_fmt, in sof_ipc4_widget_setup_comp_mixer()
802 sof_ipc4_free_audio_fmt(&mixer->available_fmt); in sof_ipc4_widget_setup_comp_mixer()
823 ret = sof_ipc4_get_audio_fmt(scomp, swidget, &src->available_fmt, in sof_ipc4_widget_setup_comp_src()
845 sof_ipc4_free_audio_fmt(&src->available_fmt); in sof_ipc4_widget_setup_comp_src()
858 sof_ipc4_free_audio_fmt(&src->available_fmt); in sof_ipc4_widget_free_comp_src()
870 sof_ipc4_free_audio_fmt(&mixer->available_fmt); in sof_ipc4_widget_free_comp_mixer()
893 ret = sof_ipc4_get_audio_fmt(scomp, swidget, &process->available_fmt, in sof_ipc4_widget_setup_comp_process()
947 sof_ipc4_free_audio_fmt(&process->available_fmt); in sof_ipc4_widget_setup_comp_process()
963 sof_ipc4_free_audio_fmt(&process->available_fmt); in sof_ipc4_widget_free_comp_process()
1105 struct sof_ipc4_available_audio_format *available_fmt, in sof_ipc4_init_output_audio_fmt() argument
1113 if (!available_fmt->num_output_formats) in sof_ipc4_init_output_audio_fmt()
1116 single_format = sof_ipc4_is_single_format(sdev, available_fmt->output_pin_fmts, in sof_ipc4_init_output_audio_fmt()
1117 available_fmt->num_output_formats); in sof_ipc4_init_output_audio_fmt()
1121 base_config->obs = available_fmt->output_pin_fmts[0].buffer_size; in sof_ipc4_init_output_audio_fmt()
1129 for (i = 0; i < available_fmt->num_output_formats; i++) { in sof_ipc4_init_output_audio_fmt()
1132 out_fmt = &available_fmt->output_pin_fmts[i].audio_fmt; in sof_ipc4_init_output_audio_fmt()
1139 base_config->obs = available_fmt->output_pin_fmts[i].buffer_size; in sof_ipc4_init_output_audio_fmt()
1166 struct sof_ipc4_available_audio_format *available_fmt) in sof_ipc4_init_input_audio_fmt() argument
1168 struct sof_ipc4_pin_format *pin_fmts = available_fmt->input_pin_fmts; in sof_ipc4_init_input_audio_fmt()
1169 u32 pin_fmts_size = available_fmt->num_input_formats; in sof_ipc4_init_input_audio_fmt()
1177 if (!available_fmt->num_input_formats) { in sof_ipc4_init_input_audio_fmt()
1182 single_format = sof_ipc4_is_single_format(sdev, available_fmt->input_pin_fmts, in sof_ipc4_init_input_audio_fmt()
1183 available_fmt->num_input_formats); in sof_ipc4_init_input_audio_fmt()
1220 if (available_fmt->num_input_formats && i < available_fmt->num_input_formats) { in sof_ipc4_init_input_audio_fmt()
1221 memcpy(&base_config->audio_fmt, &available_fmt->input_pin_fmts[i].audio_fmt, in sof_ipc4_init_input_audio_fmt()
1225 base_config->ibs = available_fmt->input_pin_fmts[i].buffer_size; in sof_ipc4_init_input_audio_fmt()
1228 sof_ipc4_dbg_audio_format(sdev->dev, &available_fmt->input_pin_fmts[i], 1); in sof_ipc4_init_input_audio_fmt()
1428 struct sof_ipc4_available_audio_format *available_fmt; in sof_ipc4_prepare_copier_module() local
1469 available_fmt = &ipc4_copier->available_fmt; in sof_ipc4_prepare_copier_module()
1534 available_fmt = &ipc4_copier->available_fmt; in sof_ipc4_prepare_copier_module()
1560 available_fmt = &ipc4_copier->available_fmt; in sof_ipc4_prepare_copier_module()
1573 available_fmt); in sof_ipc4_prepare_copier_module()
1579 available_fmt->output_pin_fmts, in sof_ipc4_prepare_copier_module()
1580 available_fmt->num_output_formats); in sof_ipc4_prepare_copier_module()
1588 in_fmt = &available_fmt->input_pin_fmts[ret].audio_fmt; in sof_ipc4_prepare_copier_module()
1622 out_fmt = &available_fmt->output_pin_fmts[0].audio_fmt; in sof_ipc4_prepare_copier_module()
1631 available_fmt, out_ref_rate, in sof_ipc4_prepare_copier_module()
1647 &available_fmt->output_pin_fmts[output_fmt_index].audio_fmt, in sof_ipc4_prepare_copier_module()
1650 sof_ipc4_dbg_audio_format(sdev->dev, &available_fmt->output_pin_fmts[output_fmt_index], 1); in sof_ipc4_prepare_copier_module()
1834 struct sof_ipc4_available_audio_format *available_fmt = &gain->available_fmt; in sof_ipc4_prepare_gain_module() local
1840 pipeline_params, available_fmt); in sof_ipc4_prepare_gain_module()
1844 in_fmt = &available_fmt->input_pin_fmts[ret].audio_fmt; in sof_ipc4_prepare_gain_module()
1849 ret = sof_ipc4_init_output_audio_fmt(sdev, &gain->data.base_config, available_fmt, in sof_ipc4_prepare_gain_module()
1871 struct sof_ipc4_available_audio_format *available_fmt = &mixer->available_fmt; in sof_ipc4_prepare_mixer_module() local
1877 pipeline_params, available_fmt); in sof_ipc4_prepare_mixer_module()
1881 in_fmt = &available_fmt->input_pin_fmts[ret].audio_fmt; in sof_ipc4_prepare_mixer_module()
1886 ret = sof_ipc4_init_output_audio_fmt(sdev, &mixer->base_config, available_fmt, in sof_ipc4_prepare_mixer_module()
1908 struct sof_ipc4_available_audio_format *available_fmt = &src->available_fmt; in sof_ipc4_prepare_src_module() local
1915 pipeline_params, available_fmt); in sof_ipc4_prepare_src_module()
1923 if (dir == SNDRV_PCM_STREAM_PLAYBACK && available_fmt->num_output_formats > 1) { in sof_ipc4_prepare_src_module()
1925 available_fmt->num_output_formats, swidget->widget->name); in sof_ipc4_prepare_src_module()
1933 in_audio_fmt = &available_fmt->input_pin_fmts[input_format_index].audio_fmt; in sof_ipc4_prepare_src_module()
1945 available_fmt, out_ref_rate, in sof_ipc4_prepare_src_module()
1956 out_audio_fmt = &available_fmt->output_pin_fmts[output_format_index].audio_fmt; in sof_ipc4_prepare_src_module()
1968 struct sof_ipc4_available_audio_format *available_fmt = &process->available_fmt; in sof_ipc4_process_set_pin_formats() local
1978 format_list_to_search = available_fmt->input_pin_fmts; in sof_ipc4_process_set_pin_formats()
1979 format_list_count = available_fmt->num_input_formats; in sof_ipc4_process_set_pin_formats()
1983 format_list_to_search = available_fmt->output_pin_fmts; in sof_ipc4_process_set_pin_formats()
1984 format_list_count = available_fmt->num_output_formats; in sof_ipc4_process_set_pin_formats()
2049 struct sof_ipc4_available_audio_format *available_fmt = &process->available_fmt; in sof_ipc4_prepare_process_module() local
2057 pipeline_params, available_fmt); in sof_ipc4_prepare_process_module()
2061 in_fmt = &available_fmt->input_pin_fmts[ret].audio_fmt; in sof_ipc4_prepare_process_module()
2067 available_fmt, out_ref_rate, in sof_ipc4_prepare_process_module()
2069 if (output_fmt_index < 0 && available_fmt->num_output_formats) { in sof_ipc4_prepare_process_module()
2076 if (available_fmt->num_output_formats && in sof_ipc4_prepare_process_module()
2077 output_fmt_index < available_fmt->num_output_formats && in sof_ipc4_prepare_process_module()
2078 !available_fmt->output_pin_fmts[output_fmt_index].pin_index) { in sof_ipc4_prepare_process_module()
2080 &available_fmt->output_pin_fmts[output_fmt_index].audio_fmt, in sof_ipc4_prepare_process_module()