ctl: rename sof-eqctl to sof-ctl

This tool is generic and can be used with any binary kcontrol to
send data to/from components at runtime.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This commit is contained in:
Liam Girdwood 2019-06-03 15:44:28 +01:00 committed by Liam Girdwood
parent e96efc1638
commit 2bb9ebe20d
14 changed files with 27 additions and 34 deletions

View File

@ -15,6 +15,6 @@ project(SOF_TOOLS C)
set(SOF_ROOT_SOURCE_DIRECTORY "${PROJECT_SOURCE_DIR}/..") set(SOF_ROOT_SOURCE_DIRECTORY "${PROJECT_SOURCE_DIR}/..")
add_subdirectory(logger) add_subdirectory(logger)
add_subdirectory(eqctl) add_subdirectory(ctl)
add_subdirectory(topology) add_subdirectory(topology)
add_subdirectory(test) add_subdirectory(test)

11
tools/ctl/CMakeLists.txt Normal file
View File

@ -0,0 +1,11 @@
# SPDX-License-Identifier: BSD-3-Clause
add_executable(sof-ctl
ctl.c
)
target_link_libraries(sof-ctl PRIVATE
"-lasound"
)
install(TARGETS sof-ctl DESTINATION bin)

View File

@ -1,7 +1,7 @@
How to use sof-eqctl tool How to use sof-ctl tool
========================= =========================
This tool helps to access the ext bytes or tlv bytes control of SOF This tool helps to access the ext bytes or tlv bytes control of SOF
equalizer components eq_iir and eq_fir. Please find the documentation components (like equalizer eq_iir and eq_fir). Please find the documentation
in https://thesofproject.github.io/latest/getting_started/index.html in https://thesofproject.github.io/latest/getting_started/index.html for
for more information. more information.

View File

@ -14,24 +14,17 @@
static void usage(char *name) static void usage(char *name)
{ {
fprintf(stdout, "Usage %s <option(s)>\n", name); fprintf(stdout, "Usage:\t %s [-D <device>] [-c <control name>]", name);
fprintf(stdout, "Set example %s -Dhw:0 ", name); fprintf(stdout, " [-s <data>]\n");
fprintf(stdout, "-c \"numid=22,name=\\\"EQIIR1.0 EQIIR\\\"\" -s "); fprintf(stdout, "\t %s [-D <device>] [-n <control id>]", name);
fprintf(stdout, "iir.txt\n"); fprintf(stdout, " [-s <data>]\n");
fprintf(stdout, "Set example %s -Dhw:0 -n 22 -s iir.txt\n", name); fprintf(stdout, "\t %s -h\n", name);
fprintf(stdout, "Get example %s -Dhw:0 -n 22\n", name); fprintf(stdout, "\nWhere:\n");
fprintf(stdout, "%s:\t \t\tControl SOF equalizers\n", name); fprintf(stdout, " -D device name (default is hw:0)\n");
fprintf(stdout, "%s:\t -D <dev>\tUse device <dev>, defaults to hw:0\n", fprintf(stdout, " -c control name e.g.");
name); fprintf(stdout, " numid=22,name=\\\"EQIIR1.0 EQIIR\\\"\"\n");
fprintf(stdout, "%s:\t -c <name>\tGet configuration for EQ <name>\n", fprintf(stdout, " -n control id e.g. 22\n");
name); fprintf(stdout, " -s set data using ASCII CSV input file\n");
fprintf(stdout, "%s:\t -n <number>\tGet configuration for ", name);
fprintf(stdout, "given numid\n");
fprintf(stdout, "%s:\t -s <file>\tSetup equalizer with data", name);
fprintf(stdout, "in <file>.\n");
fprintf(stdout, "\t\t\t\tThe ASCII text file must contain comma\n");
fprintf(stdout, "\t\t\t\tseparated unsigned integers.\n");
exit(0);
} }
static int read_setup(unsigned int *data, char setup[], size_t smax) static int read_setup(unsigned int *data, char setup[], size_t smax)

View File

@ -1,11 +0,0 @@
# SPDX-License-Identifier: BSD-3-Clause
add_executable(sof-eqctl
eqctl.c
)
target_link_libraries(sof-eqctl PRIVATE
"-lasound"
)
install(TARGETS sof-eqctl DESTINATION bin)