mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-05 02:50:46 +00:00
tinyalsa: upgrade 1.1.1 -> 2.0.0
- CMakeList.txt patch deleted because added to the new version. Changelog: * Miscellaneous bugs fixed. * PCM plugin support. * Add CMake build support. * Add meson build support. * tinyplay can now read from stdin. * Improved versioning support for library. * Improvements to pcm actions (prepare at open time and after overrun, etc.) * Improvements/fixes to pcm_get_htimestamp(). * Fixes for the mixer percent functions. Signed-off-by: alperak <alperyasinak1@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
-46
@@ -1,46 +0,0 @@
|
||||
From fe4f3c2a37a81201f463ff962364f014f50c9896 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 16 Dec 2019 22:58:41 -0800
|
||||
Subject: [PATCH] Use CMAKE_INSTALL_<path> instead of hardcoding bin/lib/
|
||||
install paths
|
||||
|
||||
Helps fix build/packaging issues on machines where default libdir is not
|
||||
lib but say lib64
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/tinyalsa/tinyalsa/pull/143]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
CMakeLists.txt | 14 +++++++++++---
|
||||
1 file changed, 11 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index cb31c58..1cc4a85 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -41,12 +41,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})
|
||||
|
||||
--
|
||||
2.24.1
|
||||
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
From 639650dd64e483074dd7c3c7ea6dc1b1bd542743 Mon Sep 17 00:00:00 2001
|
||||
From: alperak <alperyasinak1@gmail.com>
|
||||
Date: Sun, 12 Nov 2023 20:16:55 +0300
|
||||
Subject: [PATCH] fixed compilation error caused by strncpy
|
||||
|
||||
Issue:
|
||||
https://github.com/tinyalsa/tinyalsa/issues/219
|
||||
|
||||
Fix:
|
||||
https://github.com/tinyalsa/tinyalsa/pull/220
|
||||
https://github.com/tinyalsa/tinyalsa/pull/221
|
||||
|
||||
Upstream-Status: Submitted
|
||||
|
||||
Signed-off-by: alperak <alperyasinak1@gmail.com>
|
||||
---
|
||||
src/mixer_plugin.c | 8 +++++---
|
||||
src/pcm_plugin.c | 9 ++++++---
|
||||
2 files changed, 11 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/mixer_plugin.c b/src/mixer_plugin.c
|
||||
index 34117a9..f608563 100644
|
||||
--- a/src/mixer_plugin.c
|
||||
+++ b/src/mixer_plugin.c
|
||||
@@ -82,7 +82,8 @@ static int mixer_plug_get_elem_id(struct mixer_plug_data *plug_data,
|
||||
id->iface = ctl->iface;
|
||||
|
||||
strncpy((char *)id->name, (char *)ctl->name,
|
||||
- sizeof(id->name));
|
||||
+ sizeof(id->name) - 1);
|
||||
+ ((char *)id->name)[sizeof(id->name) - 1] = '\0';
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -100,8 +101,9 @@ static int mixer_plug_info_enum(struct snd_control *ctl,
|
||||
|
||||
strncpy(einfo->value.enumerated.name,
|
||||
val->texts[einfo->value.enumerated.item],
|
||||
- sizeof(einfo->value.enumerated.name));
|
||||
-
|
||||
+ sizeof(einfo->value.enumerated.name) - 1);
|
||||
+ einfo->value.enumerated.name[sizeof(einfo->value.enumerated.name) - 1] = '\0';
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff --git a/src/pcm_plugin.c b/src/pcm_plugin.c
|
||||
index 15bfc80..47bf4a5 100644
|
||||
--- a/src/pcm_plugin.c
|
||||
+++ b/src/pcm_plugin.c
|
||||
@@ -153,9 +153,12 @@ static int pcm_plug_info(struct pcm_plug_data *plug_data,
|
||||
return ret;
|
||||
}
|
||||
|
||||
- strncpy((char *)info->id, name, sizeof(info->id));
|
||||
- strncpy((char *)info->name, name, sizeof(info->name));
|
||||
- strncpy((char *)info->subname, name, sizeof(info->subname));
|
||||
+ strncpy((char *)info->id, name, sizeof(info->id) - 1);
|
||||
+ ((char *)info->id)[sizeof(info->id) - 1] = '\0';
|
||||
+ strncpy((char *)info->name, name, sizeof(info->name) - 1);
|
||||
+ ((char *)info->name)[sizeof(info->name) - 1] = '\0';
|
||||
+ strncpy((char *)info->subname, name, sizeof(info->subname) - 1);
|
||||
+ ((char *)info->subname)[sizeof(info->subname) - 1] = '\0';
|
||||
|
||||
info->subdevices_count = 1;
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
+3
-4
@@ -4,13 +4,12 @@ HOMEPAGE = "https://github.com/tinyalsa/tinyalsa"
|
||||
SECTION = "libs/multimedia"
|
||||
|
||||
LICENSE = "BSD-3-Clause"
|
||||
LIC_FILES_CHKSUM = "file://NOTICE;md5=dbdefe400d894b510a9de14813181d0b"
|
||||
LIC_FILES_CHKSUM = "file://NOTICE;md5=e04cd6fa58488e016f7fb648ebea1db4"
|
||||
|
||||
SRCREV = "8449529c7e50f432091539ba7b438e79b04059b5"
|
||||
SRCREV = "1c5fb68ced57d838f2b7ecd0c00bc1fefc9ab60d"
|
||||
SRC_URI = "git://github.com/tinyalsa/tinyalsa;branch=master;protocol=https \
|
||||
file://0001-Use-CMAKE_INSTALL_-path-instead-of-hardcoding-bin-li.patch \
|
||||
file://0001-fixed-compilation-error-caused-by-strncpy.patch \
|
||||
"
|
||||
PV = "1.1.1+git${SRCPV}"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
Reference in New Issue
Block a user