-
Notifications
You must be signed in to change notification settings - Fork 140
Add support for hostless pipelines #5571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
1934f8e
fed3d97
a2ba70c
fb66474
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1281,7 +1281,7 @@ static void sof_ipc4_widget_free_comp_process(struct snd_sof_widget *swidget) | |
|
|
||
| static void | ||
| sof_ipc4_update_resource_usage(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget, | ||
| struct sof_ipc4_base_module_cfg *base_config) | ||
| struct sof_ipc4_base_module_cfg *base_config, int dir) | ||
| { | ||
| struct sof_ipc4_fw_module *fw_module = swidget->module_info; | ||
| struct snd_sof_widget *pipe_widget; | ||
|
|
@@ -1313,6 +1313,10 @@ sof_ipc4_update_resource_usage(struct snd_sof_dev *sdev, struct snd_sof_widget * | |
| pipeline = pipe_widget->private; | ||
| pipeline->mem_usage += total; | ||
|
|
||
| /* set pipeline direction */ | ||
| pipeline->msg.extension |= SOF_IPC4_GLB_PIPE_EXT_DIRECTION_SET(0x1); | ||
| pipeline->msg.extension |= SOF_IPC4_GLB_PIPE_EXT_DIRECTION(dir); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Document what dir value is what direction, I assume playback is 0, capture is 1? pipeline->msg.extension |= SOF_IPC4_GLB_PIPE_EXT_DIRECTION(!!dir);Another way to put this could be to so: |
||
|
|
||
| /* Update base_config->cpc from the module manifest */ | ||
| sof_ipc4_update_cpc_from_manifest(sdev, fw_module, base_config); | ||
|
|
||
|
|
@@ -2452,7 +2456,7 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget, | |
| input_fmt_index, output_fmt_index); | ||
|
|
||
| /* update pipeline memory usage */ | ||
| sof_ipc4_update_resource_usage(sdev, swidget, &copier_data->base_config); | ||
| sof_ipc4_update_resource_usage(sdev, swidget, &copier_data->base_config, dir); | ||
|
|
||
| /* copy IPC data */ | ||
| memcpy(*ipc_config_data, (void *)copier_data, sizeof(*copier_data)); | ||
|
|
@@ -2515,7 +2519,7 @@ static int sof_ipc4_prepare_gain_module(struct snd_sof_widget *swidget, | |
| input_fmt_index, output_fmt_index); | ||
|
|
||
| /* update pipeline memory usage */ | ||
| sof_ipc4_update_resource_usage(sdev, swidget, &gain->data.base_config); | ||
| sof_ipc4_update_resource_usage(sdev, swidget, &gain->data.base_config, dir); | ||
|
|
||
| return 0; | ||
| } | ||
|
|
@@ -2560,7 +2564,7 @@ static int sof_ipc4_prepare_mixer_module(struct snd_sof_widget *swidget, | |
| input_fmt_index, output_fmt_index); | ||
|
|
||
| /* update pipeline memory usage */ | ||
| sof_ipc4_update_resource_usage(sdev, swidget, &mixer->base_config); | ||
| sof_ipc4_update_resource_usage(sdev, swidget, &mixer->base_config, dir); | ||
|
|
||
| return 0; | ||
| } | ||
|
|
@@ -2626,7 +2630,7 @@ static int sof_ipc4_prepare_src_module(struct snd_sof_widget *swidget, | |
| input_fmt_index, output_fmt_index); | ||
|
|
||
| /* update pipeline memory usage */ | ||
| sof_ipc4_update_resource_usage(sdev, swidget, &src->data.base_config); | ||
| sof_ipc4_update_resource_usage(sdev, swidget, &src->data.base_config, dir); | ||
|
|
||
| out_audio_fmt = &available_fmt->output_pin_fmts[output_fmt_index].audio_fmt; | ||
| src->data.sink_rate = out_audio_fmt->sampling_frequency; | ||
|
|
@@ -2783,7 +2787,7 @@ static int sof_ipc4_prepare_process_module(struct snd_sof_widget *swidget, | |
| input_fmt_index, output_fmt_index); | ||
|
|
||
| /* update pipeline memory usage */ | ||
| sof_ipc4_update_resource_usage(sdev, swidget, &process->base_config); | ||
| sof_ipc4_update_resource_usage(sdev, swidget, &process->base_config, dir); | ||
|
|
||
| /* ipc_config_data is composed of the base_config followed by an optional extension */ | ||
| memcpy(cfg, &process->base_config, sizeof(struct sof_ipc4_base_module_cfg)); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SOF_IPC4_GLB_PIPE_EXT_DIRECTION_VALID ?