diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 28201b83d..0f616283e 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -15,6 +15,6 @@ project(SOF_TOOLS C) set(SOF_ROOT_SOURCE_DIRECTORY "${PROJECT_SOURCE_DIR}/..") add_subdirectory(logger) -add_subdirectory(eqctl) +add_subdirectory(ctl) add_subdirectory(topology) add_subdirectory(test) diff --git a/tools/ctl/CMakeLists.txt b/tools/ctl/CMakeLists.txt new file mode 100644 index 000000000..87f767791 --- /dev/null +++ b/tools/ctl/CMakeLists.txt @@ -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) diff --git a/tools/eqctl/README b/tools/ctl/README similarity index 55% rename from tools/eqctl/README rename to tools/ctl/README index 49762054e..685802f58 100644 --- a/tools/eqctl/README +++ b/tools/ctl/README @@ -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 -equalizer components eq_iir and eq_fir. Please find the documentation -in https://thesofproject.github.io/latest/getting_started/index.html -for more information. +components (like equalizer eq_iir and eq_fir). Please find the documentation +in https://thesofproject.github.io/latest/getting_started/index.html for +more information. diff --git a/tools/eqctl/eqctl.c b/tools/ctl/ctl.c similarity index 84% rename from tools/eqctl/eqctl.c rename to tools/ctl/ctl.c index 204bffa87..e78267406 100644 --- a/tools/eqctl/eqctl.c +++ b/tools/ctl/ctl.c @@ -14,24 +14,17 @@ static void usage(char *name) { - fprintf(stdout, "Usage %s \n", name); - fprintf(stdout, "Set example %s -Dhw:0 ", name); - fprintf(stdout, "-c \"numid=22,name=\\\"EQIIR1.0 EQIIR\\\"\" -s "); - fprintf(stdout, "iir.txt\n"); - fprintf(stdout, "Set example %s -Dhw:0 -n 22 -s iir.txt\n", name); - fprintf(stdout, "Get example %s -Dhw:0 -n 22\n", name); - fprintf(stdout, "%s:\t \t\tControl SOF equalizers\n", name); - fprintf(stdout, "%s:\t -D \tUse device , defaults to hw:0\n", - name); - fprintf(stdout, "%s:\t -c \tGet configuration for EQ \n", - name); - fprintf(stdout, "%s:\t -n \tGet configuration for ", name); - fprintf(stdout, "given numid\n"); - fprintf(stdout, "%s:\t -s \tSetup equalizer with data", name); - fprintf(stdout, "in .\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); + fprintf(stdout, "Usage:\t %s [-D ] [-c ]", name); + fprintf(stdout, " [-s ]\n"); + fprintf(stdout, "\t %s [-D ] [-n ]", name); + fprintf(stdout, " [-s ]\n"); + fprintf(stdout, "\t %s -h\n", name); + fprintf(stdout, "\nWhere:\n"); + fprintf(stdout, " -D device name (default is hw:0)\n"); + fprintf(stdout, " -c control name e.g."); + fprintf(stdout, " numid=22,name=\\\"EQIIR1.0 EQIIR\\\"\"\n"); + fprintf(stdout, " -n control id e.g. 22\n"); + fprintf(stdout, " -s set data using ASCII CSV input file\n"); } static int read_setup(unsigned int *data, char setup[], size_t smax) diff --git a/tools/eqctl/eq_fir_flat.txt b/tools/ctl/eq_fir_flat.txt similarity index 100% rename from tools/eqctl/eq_fir_flat.txt rename to tools/ctl/eq_fir_flat.txt diff --git a/tools/eqctl/eq_fir_loudness.txt b/tools/ctl/eq_fir_loudness.txt similarity index 100% rename from tools/eqctl/eq_fir_loudness.txt rename to tools/ctl/eq_fir_loudness.txt diff --git a/tools/eqctl/eq_fir_mid.txt b/tools/ctl/eq_fir_mid.txt similarity index 100% rename from tools/eqctl/eq_fir_mid.txt rename to tools/ctl/eq_fir_mid.txt diff --git a/tools/eqctl/eq_fir_pass.txt b/tools/ctl/eq_fir_pass.txt similarity index 100% rename from tools/eqctl/eq_fir_pass.txt rename to tools/ctl/eq_fir_pass.txt diff --git a/tools/eqctl/eq_iir_bandpass.txt b/tools/ctl/eq_iir_bandpass.txt similarity index 100% rename from tools/eqctl/eq_iir_bandpass.txt rename to tools/ctl/eq_iir_bandpass.txt diff --git a/tools/eqctl/eq_iir_bassboost.txt b/tools/ctl/eq_iir_bassboost.txt similarity index 100% rename from tools/eqctl/eq_iir_bassboost.txt rename to tools/ctl/eq_iir_bassboost.txt diff --git a/tools/eqctl/eq_iir_flat.txt b/tools/ctl/eq_iir_flat.txt similarity index 100% rename from tools/eqctl/eq_iir_flat.txt rename to tools/ctl/eq_iir_flat.txt diff --git a/tools/eqctl/eq_iir_loudness.txt b/tools/ctl/eq_iir_loudness.txt similarity index 100% rename from tools/eqctl/eq_iir_loudness.txt rename to tools/ctl/eq_iir_loudness.txt diff --git a/tools/eqctl/eq_iir_pass.txt b/tools/ctl/eq_iir_pass.txt similarity index 100% rename from tools/eqctl/eq_iir_pass.txt rename to tools/ctl/eq_iir_pass.txt diff --git a/tools/eqctl/CMakeLists.txt b/tools/eqctl/CMakeLists.txt deleted file mode 100644 index dc635aa38..000000000 --- a/tools/eqctl/CMakeLists.txt +++ /dev/null @@ -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)