Skip to content

Commit

Permalink
Tools: Testbech: Add IPC4 support
Browse files Browse the repository at this point in the history
This patch copies many similar changes as has been done for
SOF plugin since split and developed further from testbench. The
changes include:

    - Move tplg_ctx to under testbench_prm struct for better
      compatibility with plugin and topology parser.
    - Similarly as plugin ad to testbench_prm widget list, route list,
      pcm list and pipeline list.


Signed-off-by: Seppo Ingalsuo <[email protected]>
  • Loading branch information
singalsu committed Apr 10, 2024
1 parent e8d92c4 commit 35faee2
Show file tree
Hide file tree
Showing 15 changed files with 2,252 additions and 998 deletions.
3 changes: 2 additions & 1 deletion src/arch/host/configs/library_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ CONFIG_COMP_VOLUME=y
CONFIG_COMP_VOLUME_LINEAR_RAMP=y
CONFIG_COMP_VOLUME_WINDOWS_FADE=y
CONFIG_DEBUG_MEMORY_USAGE_SCAN=n
CONFIG_IPC_MAJOR_3=y
#CONFIG_IPC_MAJOR_3=y
CONFIG_IPC_MAJOR_4=y
CONFIG_LIBRARY=y
CONFIG_LIBRARY_STATIC=y
CONFIG_MATH_IIR_DF2T=y
Expand Down
5 changes: 5 additions & 0 deletions src/include/sof/audio/component.h
Original file line number Diff line number Diff line change
Expand Up @@ -703,21 +703,26 @@ void sys_comp_host_init(void);
void sys_comp_kpb_init(void);
void sys_comp_selector_init(void);

void sys_comp_module_copier_interface_init(void);
void sys_comp_module_crossover_interface_init(void);
void sys_comp_module_dcblock_interface_init(void);
void sys_comp_module_demux_interface_init(void);
void sys_comp_module_drc_interface_init(void);
void sys_comp_module_dts_interface_init(void);
void sys_comp_module_eq_fir_interface_init(void);
void sys_comp_module_eq_iir_interface_init(void);
void sys_comp_module_gain_interface_init(void);
void sys_comp_module_google_rtc_audio_processing_interface_init(void);
void sys_comp_module_igo_nr_interface_init(void);
void sys_comp_module_mfcc_interface_init(void);
void sys_comp_module_mixer_interface_init(void);
void sys_comp_module_mixin_interface_init(void);
void sys_comp_module_mixout_interface_init(void);
void sys_comp_module_multiband_drc_interface_init(void);
void sys_comp_module_mux_interface_init(void);
void sys_comp_module_asrc_interface_init(void);
void sys_comp_module_rtnr_interface_init(void);
void sys_comp_module_selector_interface_init(void);
void sys_comp_module_src_interface_init(void);
void sys_comp_module_tdfb_interface_init(void);
void sys_comp_module_volume_interface_init(void);
Expand Down
10 changes: 10 additions & 0 deletions src/ipc/ipc4/helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,16 @@ static const struct ipc4_module_uuid uuid_map[] = {
.d = { 0xa0, 0x8f, 0x97, 0xfc, 0xc4, 0x2e, 0xaa, 0xeb }}}, /* ALSA aplay */
{0x99, {.a = 0x66def9f0, .b = 0x39f2, .c = 0x11ed,
.d = { 0xf7, 0x89, 0xaf, 0x98, 0xa6, 0x44, 0x0c, 0xc4 }}}, /* ALSA arecord */
{0x9a, {.a = 0xbfc7488c, .b = 0x75aa, .c = 0x4ce8,
.d = { 0x9d, 0xbe, 0xd8, 0xda, 0x08, 0xa6, 0x98, 0xc2 }}}, /* FILE component */
{0x9b, {.a = 0xbfc7488c, .b = 0x75aa, .c = 0x4ce8,
.d = { 0x9d, 0xbe, 0xd8, 0xda, 0x08, 0xa6, 0x98, 0xc2 }}}, /* FILE component */
{0x9c, {.a = 0xbfc7488c, .b = 0x75aa, .c = 0x4ce8,
.d = { 0x9d, 0xbe, 0xd8, 0xda, 0x08, 0xa6, 0x98, 0xc2 }}}, /* FILE component */
{0x9d, {.a = 0xbfc7488c, .b = 0x75aa, .c = 0x4ce8,
.d = { 0x9d, 0xbe, 0xd8, 0xda, 0x08, 0xa6, 0x98, 0xc2 }}}, /* FILE component */
{0x9e, {.a = 0xb809efaf, .b = 0x5681, .c = 0x42b1,
.d = { 0x9e, 0xd6, 0x04, 0xbb, 0x01, 0x2d, 0xd3, 0x84 }}}, /* dcblock */
};

static const struct comp_driver *ipc4_library_get_drv(int module_id)
Expand Down
9 changes: 9 additions & 0 deletions tools/testbench/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,17 @@ add_executable(testbench
common_test.c
file.c
topology.c
topology_ipc4.c
)

# TODO
#if(CONFIG_IPC_MAJOR_3)
# add_local_sources(testbench topology_ipc3.c)
#elseif(CONFIG_IPC_MAJOR_4)
# add_local_sources(testbench topology_ipc4.c)
#endif()


sof_append_relative_path_definitions(testbench)

target_include_directories(testbench PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
Expand Down
Loading

0 comments on commit 35faee2

Please sign in to comment.