diff mbox series

[meta-multimedia] tinyalsa: upgrade 1.1.1 -> 2.0.0

Message ID 20231112181028.577133-1-alperyasinak1@gmail.com
State Accepted
Headers show
Series [meta-multimedia] tinyalsa: upgrade 1.1.1 -> 2.0.0 | expand

Commit Message

Alper Ak Nov. 12, 2023, 6:10 p.m. UTC
- 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>
---
 ...L_-path-instead-of-hardcoding-bin-li.patch | 46 -------------
 ...-compilation-error-caused-by-strncpy.patch | 69 +++++++++++++++++++
 .../{tinyalsa.bb => tinyalsa_2.0.0.bb}        |  7 +-
 3 files changed, 72 insertions(+), 50 deletions(-)
 delete mode 100644 meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa/0001-Use-CMAKE_INSTALL_-path-instead-of-hardcoding-bin-li.patch
 create mode 100644 meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa/0001-fixed-compilation-error-caused-by-strncpy.patch
 rename meta-multimedia/recipes-multimedia/tinyalsa/{tinyalsa.bb => tinyalsa_2.0.0.bb} (71%)

Comments

Khem Raj Nov. 13, 2023, 6:34 p.m. UTC | #1
On Sun, 12 Nov 2023 21:10:28 +0300, alperak wrote:
> - 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.
> 
> [...]

Applied, thanks!

[1/1] tinyalsa: upgrade 1.1.1 -> 2.0.0
      commit: 5086a9b6d1357eb7e039e57a29b5f2bead8d5679

Best regards,
diff mbox series

Patch

diff --git a/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa/0001-Use-CMAKE_INSTALL_-path-instead-of-hardcoding-bin-li.patch b/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa/0001-Use-CMAKE_INSTALL_-path-instead-of-hardcoding-bin-li.patch
deleted file mode 100644
index 6f9c39996..000000000
--- a/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa/0001-Use-CMAKE_INSTALL_-path-instead-of-hardcoding-bin-li.patch
+++ /dev/null
@@ -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
-
diff --git a/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa/0001-fixed-compilation-error-caused-by-strncpy.patch b/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa/0001-fixed-compilation-error-caused-by-strncpy.patch
new file mode 100644
index 000000000..64ebdb19c
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa/0001-fixed-compilation-error-caused-by-strncpy.patch
@@ -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
+
diff --git a/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa.bb b/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa_2.0.0.bb
similarity index 71%
rename from meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa.bb
rename to meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa_2.0.0.bb
index 68cf8795a..e6f1be0e5 100644
--- a/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa.bb
+++ b/meta-multimedia/recipes-multimedia/tinyalsa/tinyalsa_2.0.0.bb
@@ -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"