aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt14
-rw-r--r--src/pcm.c2
-rw-r--r--utils/tinymix.c4
3 files changed, 14 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f4db226..ba1aea3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -55,12 +55,20 @@ add_util("tinymix" "utils/tinymix.c")
install(FILES ${HDRS}
DESTINATION "include/tinyalsa")
+if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
+ set(CMAKE_INSTALL_LIBDIR lib)
+endif()
+
+if(NOT DEFINED CMAKE_INSTALL_BINDIR)
+ set(CMAKE_INSTALL_BINDIR bin)
+endif()
+
install(TARGETS "tinyalsa"
"tinyplay"
"tinycap"
"tinymix"
"tinypcminfo"
- RUNTIME DESTINATION "bin"
- ARCHIVE DESTINATION "lib"
- LIBRARY DESTINATION "lib")
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/src/pcm.c b/src/pcm.c
index 7a8defc..c28e098 100644
--- a/src/pcm.c
+++ b/src/pcm.c
@@ -418,7 +418,7 @@ int pcm_set_config(struct pcm *pcm, const struct pcm_config *config)
memset(&sparams, 0, sizeof(sparams));
sparams.tstamp_mode = SNDRV_PCM_TSTAMP_ENABLE;
sparams.period_step = 1;
- sparams.avail_min = 1;
+ sparams.avail_min = config->period_size;
if (!config->start_threshold) {
if (pcm->flags & PCM_IN)
diff --git a/utils/tinymix.c b/utils/tinymix.c
index abab78d..04205dd 100644
--- a/utils/tinymix.c
+++ b/utils/tinymix.c
@@ -48,8 +48,8 @@ void usage(void)
{
printf("usage: tinymix [options] <command>\n");
printf("options:\n");
- printf("\t-h, --help : prints this help message and exists\n");
- printf("\t-v, --version : prints this version of tinymix and exists\n");
+ printf("\t-h, --help : prints this help message and exits\n");
+ printf("\t-v, --version : prints this version of tinymix and exits\n");
printf("\t-D, --card NUMBER : specifies the card number of the mixer\n");
printf("commands:\n");
printf("\tget NAME|ID : prints the values of a control\n");