Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 367
Tools: Testbench: Add to IPC4 version UUID based components load, apply initial byte control, etc.#9542
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.
Tools: Testbench: Add to IPC4 version UUID based components load, apply initial byte control, etc. #9542
Changes from all commits
4831c58dbeaa69b6fd773a768ebac6a0b84d9d360e14933a4cb5946eFile 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 |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| /* SPDX-License-Identifier: BSD-3-Clause | ||
| * | ||
| * Copyright(c) 2017-2024 Intel Corporation | ||
| */ | ||
| #ifndef __SOF_AUDIO_SRC_SRC_IPC_H__ | ||
| #define __SOF_AUDIO_SRC_SRC_IPC_H__ | ||
| #include <sof/audio/ipc-config.h> | ||
| #include <ipc4/base-config.h> | ||
| #include <stdint.h> | ||
| /* src component private data */ | ||
| struct ipc4_config_src { | ||
| struct ipc4_base_module_cfg base; | ||
| uint32_t sink_rate; | ||
| }; | ||
| #endif /* __SOF_AUDIO_SRC_SRC_IPC_H__ */ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -10,7 +10,27 @@ | ||
| #include "testbench/utils.h" | ||
lgirdwood marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| #define TB_IPC4_MAX_TPLG_OBJECT_SIZE 4096 | ||
| #define TB_IPC4_MAX_MSG_SIZE 384 | ||
| /* See module_set_large_config() where message fragment is | ||
| * MAILBOX_DSPBOX_SIZE. The add of header size (8) is because | ||
| * testbench and plugin have the set large config header in | ||
| * same memory as the payload. | ||
| */ | ||
| #define TB_IPC4_MAX_MSG_SIZE (MAILBOX_DSPBOX_SIZE + sizeof(struct ipc4_module_large_config)) | ||
| #define TB_PGA_MODULE_ID 0x6 | ||
| #define TB_SRC_MODULE_ID 0x7 | ||
| #define TB_ASRC_MODULE_ID 0x8 | ||
| #define TB_PROCESS_MODULE_ID 0x95 | ||
| #define TB_FILE_OUT_AIF_MODULE_ID 0x9a | ||
| #define TB_FILE_IN_AIF_MODULE_ID 0x9b | ||
| #define TB_FILE_OUT_DAI_MODULE_ID 0x9c | ||
| #define TB_FILE_IN_DAI_MODULE_ID 0x9d | ||
| enum tb_pin_type { | ||
| TB_PIN_TYPE_INPUT = 0, | ||
| TB_PIN_TYPE_OUTPUT, | ||
| }; | ||
| int tb_delete_pipeline(struct testbench_prm *tp, struct tplg_pipeline_info *pipe_info); | ||
| int tb_free_all_pipelines(struct testbench_prm *tp); | ||
| @@ -24,6 +44,8 @@ int tb_new_dai_in_out(struct testbench_prm *tp, int dir); | ||
| int tb_new_pga(struct testbench_prm *tp); | ||
| int tb_new_process(struct testbench_prm *tp); | ||
| int tb_pipelines_set_state(struct testbench_prm *tp, int state, int dir); | ||
| int tb_send_bytes_data(struct tb_mq_desc *ipc_tx, struct tb_mq_desc *ipc_rx, | ||
| uint32_t module_id, uint32_t instance_id, struct sof_abi_hdr *abi); | ||
| int tb_set_reset_state(struct testbench_prm *tp); | ||
| int tb_set_running_state(struct testbench_prm *tp); | ||
| int tb_set_up_pipeline(struct testbench_prm *tp, struct tplg_pipeline_info *pipe_info); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -37,6 +37,9 @@ struct file_comp_lookup { | ||
| #define TB_NAME_SIZE 256 | ||
| #define TB_MAX_CONFIG_COUNT 2 | ||
| #define TB_MAX_CONFIG_NAME_SIZE 64 | ||
| #define TB_MAX_VOLUME_SIZE 120 | ||
| #define TB_MAX_DATA_SIZE 512 | ||
| #define TB_MAX_CTLS 16 | ||
| struct tb_mq_desc { | ||
| char queue_name[TB_NAME_SIZE]; | ||
| @@ -52,6 +55,27 @@ struct tb_config { | ||
| int channels; | ||
| unsigned long format; | ||
| }; | ||
| struct tb_ctl { | ||
Member 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 we include the ABI header rather than duplicate ? I guess this comes from ALSA asoc.h ? CollaboratorAuthor 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, this struct is a direct copy from SOF plugin. If we change, we should change both to be able to merge the sources later to a common library like tplg_parser. What do you think @ranj063 ? Member 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, so we can do this in parallel with plugin when we ship it. | ||
| unsigned int module_id; | ||
| unsigned int instance_id; | ||
| unsigned int type; | ||
| unsigned int volume_table[TB_MAX_VOLUME_SIZE]; | ||
| unsigned int index; | ||
| char data[TB_MAX_DATA_SIZE]; | ||
| union { | ||
| struct snd_soc_tplg_mixer_control mixer_ctl; | ||
| struct snd_soc_tplg_enum_control enum_ctl; | ||
| struct snd_soc_tplg_bytes_control bytes_ctl; | ||
| }; | ||
| }; | ||
| struct tb_glb_state { | ||
| char magic[8]; /* SOF_MAGIC */ | ||
| uint32_t num_ctls; /* number of ctls */ | ||
| size_t size; /* size of this structure in bytes */ | ||
| struct tb_ctl *ctl; | ||
| }; | ||
| #endif | ||
| /* | ||
| @@ -114,6 +138,7 @@ struct testbench_prm { | ||
| struct tb_config config[TB_MAX_CONFIG_COUNT]; | ||
| int num_configs; | ||
| size_t period_size; | ||
| struct tb_glb_state glb_ctx; | ||
| #endif | ||
| }; | ||
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.
Should we have size at the start ?
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 is not the struct for config blobs. I only moved this structure to be separate from large src_common.h that caused a build problem.
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.
ok, but this is an IPC header, so this should be for host/module configuration.
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.
It's not clear to me what you are suggesting to do. Should these IPC headers be somewhere else or use some more consistent directory locations and naming?
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.
@lgirdwood Ping, can you help me fix this. I don't think this PR has any other opens left.
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.
ok, we can address this later as I see this structure is used as header for module data in other modules.