Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 150
ASoC: SOF: ipc4-topology: add process support#3755
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
502b89a83453b424358fa83e2b2a9f33ad9File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -60,5 +60,6 @@ | ||
| /* SOF ABI magic number "SOF\0". */ | ||
| #define SOF_ABI_MAGIC 0x00464F53 | ||
| #define SOF_IPC4_ABI_MAGIC 0x34464F53 | ||
| #endif | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -96,7 +96,7 @@ | ||
| */ | ||
| #define SOF_TKN_COMP_SINK_PIN_BINDING_WNAME 413 | ||
| #define SOF_TKN_COMP_SRC_PIN_BINDING_WNAME 414 | ||
| #define SOF_TKN_COMP_PAYLOAD_WITH_OUTPUT 415 | ||
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. According to the commit message this patch adds Author 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. Thanks for pointing it out. | ||
| /* SSP */ | ||
| #define SOF_TKN_INTEL_SSP_CLKS_CONTROL 500 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -173,15 +173,25 @@ static int sof_ipc4_widget_kcontrol_setup(struct snd_sof_dev *sdev, struct snd_s | ||
| struct snd_sof_control *scontrol; | ||
| int ret; | ||
| list_for_each_entry(scontrol, &sdev->kcontrol_list, list) | ||
| list_for_each_entry(scontrol, &sdev->kcontrol_list, list) { | ||
| if (scontrol->comp_id == swidget->comp_id) { | ||
| ret = sof_ipc4_set_volume_data(sdev, swidget, scontrol); | ||
| if (ret < 0) { | ||
| dev_err(sdev->dev, "%s: kcontrol %d set up failed for widget %s\n", | ||
| __func__, scontrol->comp_id, swidget->widget->name); | ||
| return ret; | ||
| switch (scontrol->info_type) { | ||
| case SND_SOC_TPLG_CTL_VOLSW: | ||
| case SND_SOC_TPLG_CTL_VOLSW_SX: | ||
| case SND_SOC_TPLG_CTL_VOLSW_XR_SX: | ||
| ret = sof_ipc4_set_volume_data(sdev, swidget, scontrol); | ||
| if (ret < 0) { | ||
| dev_err(sdev->dev, "kcontrol %d set up failed for widget %s\n", | ||
| scontrol->comp_id, swidget->widget->name); | ||
| return ret; | ||
| } | ||
libinyang marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| break; | ||
| default: | ||
| /* do nothing */ | ||
| break; | ||
| } | ||
| } | ||
| } | ||
| return 0; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -100,6 +100,8 @@ static const struct sof_topology_token dai_tokens[] = { | ||
| static const struct sof_topology_token comp_ext_tokens[] = { | ||
| {SOF_TKN_COMP_UUID, SND_SOC_TPLG_TUPLE_TYPE_UUID, get_token_uuid, | ||
| offsetof(struct snd_sof_widget, uuid)}, | ||
| {SOF_TKN_COMP_PAYLOAD_WITH_OUTPUT, SND_SOC_TPLG_TUPLE_TYPE_BOOL, get_token_u16, | ||
| offsetof(struct snd_sof_widget, payload_with_output)}, | ||
| }; | ||
| static const struct sof_topology_token gain_tokens[] = { | ||
| @@ -803,6 +805,86 @@ static void sof_ipc4_widget_free_comp_mixer(struct snd_sof_widget *swidget) | ||
| swidget->private = NULL; | ||
| } | ||
| /* | ||
| * Add the process modules support. The process modules are defined as snd_soc_dapm_effect modules. | ||
| */ | ||
| static int sof_ipc4_widget_setup_comp_process(struct snd_sof_widget *swidget) | ||
| { | ||
| struct snd_soc_component *scomp = swidget->scomp; | ||
| struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp); | ||
| struct sof_ipc4_control_data *control_data; | ||
| struct sof_ipc4_process *process; | ||
| struct snd_sof_control *scontrol; | ||
| int cfg_size; | ||
| void *cfg; | ||
| int ret; | ||
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. can you re-order these? Author 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. OK, I will do it. What about 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. structsnd_soc_component*scomp=swidget->scomp;
structsnd_sof_dev*sdev=snd_soc_component_get_drvdata(scomp);
structsof_ipc4_control_data*control_data;
structsof_ipc4_process*process;
structsnd_sof_control*scontrol;
intcfg_size;
void*cfg;
intret;Author 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. OK | ||
| process = kzalloc(sizeof(*process), GFP_KERNEL); | ||
| if (!process) | ||
| return -ENOMEM; | ||
| swidget->private = process; | ||
| ret = sof_ipc4_get_audio_fmt(scomp, swidget, &process->available_fmt, true); | ||
| if (ret) | ||
| goto err; | ||
| cfg_size = sizeof(struct sof_ipc4_base_module_cfg); | ||
| if (swidget->payload_with_output) | ||
| cfg_size += sizeof(struct sof_ipc4_audio_format); | ||
| /* allocate the cfg for process modules */ | ||
libinyang marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| list_for_each_entry(scontrol, &sdev->kcontrol_list, list) { | ||
| if (scontrol->comp_id == swidget->comp_id) { | ||
| control_data = scontrol->ipc_control_data; | ||
| /* | ||
| * TODO: add flag in topology to indicate whether the module has | ||
| * SOF_IPC4_MOD_INIT_INSTANCE type kcontrol and do sanity check here | ||
| */ | ||
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. TODO in the kernel or in the topology file? Author 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. Both in kernel and tplg file. This is an improvement not a must. I will implement this feature later. | ||
| if (control_data->data->ipc_blob_type == SOF_IPC4_MOD_INIT_INSTANCE) { | ||
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. SOF_IPC4_MOD_INIT_INSTANCE is not treated as a flag, it is a value and it is checked here? What this means?
| ||
| cfg_size += control_data->data->size; | ||
| break; | ||
| } | ||
| } | ||
| } | ||
| cfg = kzalloc(cfg_size, GFP_KERNEL); | ||
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. How this is structured? leave a blank line on front of kzalloc at best and I would prefer a curly bracket for the Author 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. OK, I will add a bracket and a blank line. | ||
| if (!cfg) { | ||
| ret = -ENOMEM; | ||
| goto free_available_fmt; | ||
ranj063 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| } | ||
| process->ipc_config_data = cfg; | ||
| process->ipc_config_size = cfg_size; | ||
| ret = sof_ipc4_widget_setup_msg(swidget, &process->msg); | ||
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. For me it is more logical to group the lines differently, but it could be only me: cfg=kzalloc(cfg_size, GFP_KERNEL);
if (!cfg) {
ret=-ENOMEM;
goto free_available_fmt;
}
process->ipc_config_data=cfg;
process->ipc_config_size=cfg_size;
ret=sof_ipc4_widget_setup_msg(swidget, &process->msg);
if (ret)
goto free_cfg_data;Author 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. OK | ||
| if (ret) | ||
| goto free_cfg_data; | ||
| return 0; | ||
| free_cfg_data: | ||
| kfree(process->ipc_config_data); | ||
| process->ipc_config_data = NULL; | ||
| free_available_fmt: | ||
| sof_ipc4_free_audio_fmt(&process->available_fmt); | ||
| err: | ||
| kfree(process); | ||
| swidget->private = NULL; | ||
| return ret; | ||
| } | ||
| static void sof_ipc4_widget_free_comp_process(struct snd_sof_widget *swidget) | ||
| { | ||
| struct sof_ipc4_process *process = swidget->private; | ||
| if (!process) | ||
| return; | ||
| kfree(process->ipc_config_data); | ||
| sof_ipc4_free_audio_fmt(&process->available_fmt); | ||
libinyang marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| kfree(swidget->private); | ||
| swidget->private = NULL; | ||
| } | ||
| static void | ||
| sof_ipc4_update_pipeline_mem_usage(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget, | ||
| struct sof_ipc4_base_module_cfg *base_config) | ||
| @@ -1387,6 +1469,86 @@ static int sof_ipc4_prepare_src_module(struct snd_sof_widget *swidget, | ||
| return 0; | ||
| } | ||
| static int sof_ipc4_prepare_process_module(struct snd_sof_widget *swidget, | ||
| struct snd_pcm_hw_params *fe_params, | ||
| struct snd_sof_platform_stream_params *platform_params, | ||
| struct snd_pcm_hw_params *pipeline_params, int dir) | ||
| { | ||
| struct snd_soc_component *scomp = swidget->scomp; | ||
| struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp); | ||
| struct snd_soc_dapm_widget *widget = swidget->widget; | ||
| struct sof_ipc4_process *process = swidget->private; | ||
| struct sof_ipc4_available_audio_format *available_fmt = &process->available_fmt; | ||
| struct sof_ipc4_control_data *control_data; | ||
| struct snd_sof_control *scontrol = NULL; | ||
| void *cfg = process->ipc_config_data; | ||
| const struct snd_kcontrol_new *kc; | ||
| struct soc_bytes_ext *sbe; | ||
| void *extra_flag; | ||
| int ret, i; | ||
| available_fmt->ref_audio_fmt = &available_fmt->base_config->audio_fmt; | ||
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. Is this changes between Author 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. I think we can but all other modules do it in the prepare callback function. If we want to move the set operation in the setup time, I think we need a separate patch. I guess we do it in the prepare function because we need to use it only in this function. | ||
| /* | ||
| * Output format is optional for process modules. | ||
| * Process modules setup the output format based on audio format tokens in topology. | ||
| */ | ||
| if (swidget->payload_with_output) | ||
| ret = sof_ipc4_init_audio_fmt(sdev, swidget, &process->base_config, | ||
| &process->output_format, pipeline_params, | ||
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. this doesnt seem logical. If output_fmt_cnt is > 1, shouldnt you parse all output formats based on the count? Why do we only have 1 output_format in struct sof_ipc4_process? Author 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. Actually, the output_fmt_cnt is always 0 or 1 for all our current modules. I made the output_fmt_cnt as an integer not bool just for easy to extend. There is a limitation in SOF current design. But likely, the limitation won't be hit so far. As you know, in tplg, one input_format only maps one output_format in the Object.Base.audio_format. This means even a module has 2 output pins, the output format cnt is always 1. We don't support 2 different output formats at all. This is why the output format cnt should always be 1 in the current design. And likely, this is OK as all the modules we support now do need 0 or 1 output format configuration in the init instance payload. If the module needs 2 or more output formats in the future, then let's talk about it at that time (I don't think we will meet such situation) | ||
| available_fmt, | ||
| sizeof(struct sof_ipc4_base_module_cfg)); | ||
| else | ||
| ret = sof_ipc4_init_audio_fmt(sdev, swidget, &process->base_config, | ||
| NULL, pipeline_params, available_fmt, | ||
| sizeof(struct sof_ipc4_base_module_cfg)); | ||
| if (ret < 0) | ||
| return ret; | ||
| /* update pipeline memory usage */ | ||
| sof_ipc4_update_pipeline_mem_usage(sdev, swidget, &process->base_config); | ||
| /* | ||
| * ipc_config_data is composed of the base_config, optional output formats followed | ||
| * by the data required for module init in that order. | ||
| */ | ||
| memcpy(cfg, &process->base_config, sizeof(struct sof_ipc4_base_module_cfg)); | ||
| cfg += sizeof(struct sof_ipc4_base_module_cfg); | ||
| /* copy output format to configure data payload */ | ||
| if (swidget->payload_with_output) { | ||
| memcpy(cfg, &process->output_format, sizeof(struct sof_ipc4_audio_format)); | ||
libinyang marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| cfg += sizeof(struct sof_ipc4_audio_format); | ||
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. memcpy(cfg, &process->output_format, sizeof(process->output_format));
cfg+=sizeof(process->output_format);Be consistent with the use of Author 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. ok | ||
| } | ||
| for (i = 0; i < widget->num_kcontrols; i++) { | ||
| kc = &widget->kcontrol_news[i]; | ||
| if (!kc) | ||
| return -ENODEV; | ||
| /* payload uses byte kcontrol */ | ||
| if (widget->dobj.widget.kcontrol_type[i] != SND_SOC_TPLG_TYPE_BYTES) | ||
| continue; | ||
ujfalusi marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| sbe = (struct soc_bytes_ext *)kc->private_value; | ||
| scontrol = sbe->dobj.private; | ||
| if (!scontrol) | ||
| continue; | ||
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. CAn this happen? If it does, isn't it an error? Author 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. I'm not sure. I saw the old code is doing the same check. Maybe there are some corner cases? | ||
| control_data = scontrol->ipc_control_data; | ||
| if (control_data->data->ipc_blob_type != SOF_IPC4_MOD_INIT_INSTANCE) | ||
| continue; | ||
| /* | ||
| * TODO: add flag in topology to indicate whether the module has | ||
| * SOF_IPC4_MOD_INIT_INSTANCE type kcontrol and do sanity check here | ||
| ||
| */ | ||
| extra_flag = (void *)control_data->data->data; | ||
| memcpy(cfg, extra_flag, control_data->data->size); | ||
| break; | ||
| } | ||
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. I dont get this part. This is already done when you parse the byte controls for each widget, why parse again? Author 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. This code is mainly to copy the kcontrol blob data to ipc4 message payload. 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. @libinyang this is duplicating the work the common topology code has already done. In your 3rd patch you added support for copying the control data into control_data->data. Why not simply take the data from the scontrol->control_data? 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. You look for the first kcontrol wich matches SND_SOC_TPLG_TYPE_BYTES and SOF_IPC4_MOD_INIT_INSTANCE then break out and skip the rest of the controls? Author 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. No : ). One BYTES control is enough. We won't create 2 BYTES controls in the topology for the init instance payload in the topology. | ||
| return 0; | ||
| } | ||
| static int sof_ipc4_control_load_volume(struct snd_sof_dev *sdev, struct snd_sof_control *scontrol) | ||
| { | ||
| struct sof_ipc4_control_data *control_data; | ||
| @@ -1419,13 +1581,55 @@ static int sof_ipc4_control_load_volume(struct snd_sof_dev *sdev, struct snd_sof | ||
| return 0; | ||
| } | ||
| static int sof_ipc4_control_load_bytes(struct snd_sof_dev *sdev, struct snd_sof_control *scontrol) | ||
| { | ||
| struct sof_ipc4_control_data *control_data; | ||
| int ret; | ||
| scontrol->size = sizeof(struct sof_ipc4_control_data) + scontrol->priv_size; | ||
| scontrol->ipc_control_data = kzalloc(scontrol->size, GFP_KERNEL); | ||
libinyang marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| if (!scontrol->ipc_control_data) | ||
| return -ENOMEM; | ||
| control_data = scontrol->ipc_control_data; | ||
| control_data->index = scontrol->index; | ||
| if (scontrol->priv_size > 0) { | ||
| memcpy(control_data->data, scontrol->priv, scontrol->priv_size); | ||
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. don't you need to free scontrol->priv here, now that you've copied it into the data portion of control_data? Again, please look at the IPC3 implementation. There shouldnt be a big difference between the 2 versions except for the IPC structure Author 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. @ranj063 scontrol->priv is not allocated by this function. So it should not be freed here? I saw topology.c will free it in sof_control_unload(). Is it enough? | ||
| if (control_data->data->magic != SOF_IPC4_ABI_MAGIC) { | ||
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. if the magic is not SOF4 then it is likely that it is from 'older' topology file, pre SOF4 magic times which works currently, right? Author 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. The kernel supports both IPC3 and IPC4 topologies (and firmware) at the same time, which can be set by the module parameters. The IPC3 and IPC4 topologies are put different folders. 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. Yes, but we already run IPC4 w/o having a magic number, so if you introduce a magic check then the currently working tplg files will stop working -> needs orchestrated topology and kernel update, no? Author 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.
Oh, right. This requires the update. Luckly, there is no commercial platforms on the market which is using IPC4. We still have time to update the topology. | ||
| dev_err(sdev->dev, "Wrong ABI magic 0x%08x.\n", control_data->data->magic); | ||
| ret = -EINVAL; | ||
| goto err; | ||
| } | ||
| /* TODO: check the ABI version */ | ||
ujfalusi marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| if (control_data->data->size + sizeof(struct sof_ipc4_abi_hdr) != | ||
| scontrol->priv_size) { | ||
| dev_err(sdev->dev, "Conflict in bytes vs. priv size.\n"); | ||
| ret = -EINVAL; | ||
| goto err; | ||
| } | ||
| } | ||
| return 0; | ||
| err: | ||
| kfree(scontrol->ipc_control_data); | ||
| scontrol->ipc_control_data = NULL; | ||
| return ret; | ||
| } | ||
| static int sof_ipc4_control_setup(struct snd_sof_dev *sdev, struct snd_sof_control *scontrol) | ||
| { | ||
| switch (scontrol->info_type) { | ||
| case SND_SOC_TPLG_CTL_VOLSW: | ||
| case SND_SOC_TPLG_CTL_VOLSW_SX: | ||
| case SND_SOC_TPLG_CTL_VOLSW_XR_SX: | ||
| return sof_ipc4_control_load_volume(sdev, scontrol); | ||
| case SND_SOC_TPLG_CTL_BYTES: | ||
| return sof_ipc4_control_load_bytes(sdev, scontrol); | ||
| default: | ||
| break; | ||
| } | ||
| @@ -1517,6 +1721,22 @@ static int sof_ipc4_widget_setup(struct snd_sof_dev *sdev, struct snd_sof_widget | ||
| msg = &src->msg; | ||
| break; | ||
| } | ||
| case snd_soc_dapm_effect: | ||
| { | ||
| struct sof_ipc4_process *process = swidget->private; | ||
| if (!process->ipc_config_size) { | ||
| dev_err(sdev->dev, "module %s has no config data!\n", | ||
| swidget->widget->name); | ||
| return -EINVAL; | ||
| } | ||
| ipc_size = process->ipc_config_size; | ||
| ipc_data = process->ipc_config_data; | ||
ranj063 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| msg = &process->msg; | ||
| break; | ||
| } | ||
| default: | ||
| dev_err(sdev->dev, "widget type %d not supported", swidget->id); | ||
| return -EINVAL; | ||
| @@ -2024,6 +2244,15 @@ static enum sof_tokens src_token_list[] = { | ||
| SOF_COMP_EXT_TOKENS, | ||
| }; | ||
| static enum sof_tokens process_token_list[] = { | ||
| SOF_COMP_TOKENS, | ||
| SOF_AUDIO_FMT_NUM_TOKENS, | ||
| SOF_IN_AUDIO_FORMAT_TOKENS, | ||
| SOF_OUT_AUDIO_FORMAT_TOKENS, | ||
| SOF_AUDIO_FORMAT_BUFFER_SIZE_TOKENS, | ||
| SOF_COMP_EXT_TOKENS, | ||
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. why is your new token for OUTPUT_FMT_CNT not a part of this list? If it is not needed, why introduce it at all? Author 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. It's in SOF_COMP_EXT_TOKENS | ||
| }; | ||
| static const struct sof_ipc_tplg_widget_ops tplg_ipc4_widget_ops[SND_SOC_DAPM_TYPE_COUNT] = { | ||
| [snd_soc_dapm_aif_in] = {sof_ipc4_widget_setup_pcm, sof_ipc4_widget_free_comp_pcm, | ||
| host_token_list, ARRAY_SIZE(host_token_list), NULL, | ||
| @@ -2057,6 +2286,11 @@ static const struct sof_ipc_tplg_widget_ops tplg_ipc4_widget_ops[SND_SOC_DAPM_TY | ||
| src_token_list, ARRAY_SIZE(src_token_list), | ||
| NULL, sof_ipc4_prepare_src_module, | ||
| NULL}, | ||
| [snd_soc_dapm_effect] = {sof_ipc4_widget_setup_comp_process, | ||
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. So, this patch add snd_soc_dapm_effect support for IPC4. Author 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. Yes, this is what is done in IPC3. I'm not sure why we do it like this. 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. What I meant is that the commit title should (imho) tell that the patch implements the effect support and the commit message details that it is internally done with 'process' things. Author 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. Got it. | ||
| sof_ipc4_widget_free_comp_process, | ||
| process_token_list, ARRAY_SIZE(process_token_list), | ||
| NULL, sof_ipc4_prepare_process_module, | ||
| NULL}, | ||
| }; | ||
| const struct sof_ipc_tplg_ops ipc4_tplg_ops = { | ||
Uh oh!
There was an error while loading. Please reload this page.
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.
Would it be nicer if the same order is kept as with the IPC3 version of the abi header?
iow, is there a reason to shuffle them?
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.
@ranj063 thought the
typeis not used any more. So we removed this field. Removing or not removing thetypefield are both OK to me. @ranj063 What's you opinion?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.
I will use:
So the structure is compatible to IPC3
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.
This ABI struct is coming via the topology file and it is not sent to the firmware, right?
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.
Right. It is coming from topology.