Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package alsa for openSUSE:Factory checked in 
at 2021-06-16 20:33:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/alsa (Old)
 and      /work/SRC/openSUSE:Factory/.alsa.new.32437 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "alsa"

Wed Jun 16 20:33:28 2021 rev:211 rq:899946 version:1.2.5.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/alsa/alsa.changes        2021-06-12 
20:05:40.552680615 +0200
+++ /work/SRC/openSUSE:Factory/.alsa.new.32437/alsa.changes     2021-06-16 
20:33:38.162996815 +0200
@@ -1,0 +2,11 @@
+Mon Jun 14 14:58:05 CEST 2021 - ti...@suse.de
+
+- Update to version 1.2.5.1:
+  a bug fix release, including previous patches:
+  https://www.alsa-project.org/wiki/Changes_v1.2.5_v1.2.5.1
+- Drop obsoleted patches:
+  0001-conf-fix-load_for_all_cards.patch
+  0002-ucm-add-_alibpref-to-get-the-private-device-prefix.patch
+  0003-ucm-fix-_alibpref-string-add-.-delimiter-to-the-end.patch
+
+-------------------------------------------------------------------

Old:
----
  0001-conf-fix-load_for_all_cards.patch
  0002-ucm-add-_alibpref-to-get-the-private-device-prefix.patch
  0003-ucm-fix-_alibpref-string-add-.-delimiter-to-the-end.patch
  alsa-lib-1.2.5.tar.bz2

New:
----
  alsa-lib-1.2.5.1.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ alsa.spec ++++++
--- /var/tmp/diff_new_pack.WUTw6S/_old  2021-06-16 20:33:38.994998235 +0200
+++ /var/tmp/diff_new_pack.WUTw6S/_new  2021-06-16 20:33:38.998998242 +0200
@@ -32,7 +32,7 @@
 %endif
 
 Name:           alsa
-Version:        1.2.5
+Version:        1.2.5.1
 Release:        0
 Summary:        Advanced Linux Sound Architecture
 License:        LGPL-2.1-or-later
@@ -52,9 +52,6 @@
 Source31:       all_notes_off.bin
 Source32:       all_notes_off.mid
 Source34:       alsa-init.sh
-Patch1:         0001-conf-fix-load_for_all_cards.patch
-Patch2:         0002-ucm-add-_alibpref-to-get-the-private-device-prefix.patch
-Patch3:         0003-ucm-fix-_alibpref-string-add-.-delimiter-to-the-end.patch
 # rest suse fixes
 Patch101:       alsa-lib-ignore-non-accessible-ALSA_CONFIG_PATH.patch
 BuildRequires:  doxygen
@@ -143,9 +140,6 @@
 
 %prep
 %setup -q -n alsa-lib-%{version}
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
 %patch101 -p1
 
 %build



++++++ alsa-lib-1.2.5.tar.bz2 -> alsa-lib-1.2.5.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.5/configure 
new/alsa-lib-1.2.5.1/configure
--- old/alsa-lib-1.2.5/configure        2021-05-27 23:30:50.000000000 +0200
+++ new/alsa-lib-1.2.5.1/configure      2021-06-14 13:44:12.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for alsa-lib 1.2.5.
+# Generated by GNU Autoconf 2.69 for alsa-lib 1.2.5.1.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@
 # Identity of this package.
 PACKAGE_NAME='alsa-lib'
 PACKAGE_TARNAME='alsa-lib'
-PACKAGE_VERSION='1.2.5'
-PACKAGE_STRING='alsa-lib 1.2.5'
+PACKAGE_VERSION='1.2.5.1'
+PACKAGE_STRING='alsa-lib 1.2.5.1'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1471,7 +1471,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures alsa-lib 1.2.5 to adapt to many kinds of systems.
+\`configure' configures alsa-lib 1.2.5.1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1542,7 +1542,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of alsa-lib 1.2.5:";;
+     short | recursive ) echo "Configuration of alsa-lib 1.2.5.1:";;
    esac
   cat <<\_ACEOF
 
@@ -1704,7 +1704,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-alsa-lib configure 1.2.5
+alsa-lib configure 1.2.5.1
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2115,7 +2115,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by alsa-lib $as_me 1.2.5, which was
+It was created by alsa-lib $as_me 1.2.5.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3053,7 +3053,7 @@
 
 # Define the identity of the package.
  PACKAGE='alsa-lib'
- VERSION='1.2.5'
+ VERSION='1.2.5.1'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -12706,6 +12706,17 @@
 fi
 done
 
+for ac_func in eaccess
+do :
+  ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
+if test "x$ac_cv_func_eaccess" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_EACCESS 1
+_ACEOF
+
+fi
+done
+
 
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library version" >&5
@@ -14936,7 +14947,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by alsa-lib $as_me 1.2.5, which was
+This file was extended by alsa-lib $as_me 1.2.5.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -15002,7 +15013,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-alsa-lib config.status 1.2.5
+alsa-lib config.status 1.2.5.1
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.5/configure.ac 
new/alsa-lib-1.2.5.1/configure.ac
--- old/alsa-lib-1.2.5/configure.ac     2021-05-27 23:30:16.000000000 +0200
+++ new/alsa-lib-1.2.5.1/configure.ac   2021-06-14 12:28:44.000000000 +0200
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.59)
-AC_INIT(alsa-lib, 1.2.5)
+AC_INIT(alsa-lib, 1.2.5.1)
 
 AC_CONFIG_SRCDIR([src/control/control.c])
 AC_CONFIG_MACRO_DIR([m4])
@@ -50,6 +50,7 @@
 dnl Checks for library functions.
 AC_PROG_GCC_TRADITIONAL
 AC_CHECK_FUNCS([uselocale])
+AC_CHECK_FUNCS([eaccess])
 
 SAVE_LIBRARY_VERSION
 AC_SUBST(LIBTOOL_VERSION_INFO)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.5/include/alsa-symbols.h 
new/alsa-lib-1.2.5.1/include/alsa-symbols.h
--- old/alsa-lib-1.2.5/include/alsa-symbols.h   2021-05-27 23:30:16.000000000 
+0200
+++ new/alsa-lib-1.2.5.1/include/alsa-symbols.h 2021-06-14 12:28:44.000000000 
+0200
@@ -34,7 +34,11 @@
 #define default_symbol_version(real, name, version) \
        __asm__ (".symver " ASM_NAME(#real) "," ASM_NAME(#name) "@@" #version)
 
+#ifdef __clang__
+#define EXPORT_SYMBOL __attribute__((visibility("default")))
+#else
 #define EXPORT_SYMBOL __attribute__((visibility("default"),externally_visible))
+#endif
 
 #ifdef USE_VERSIONED_SYMBOLS
 #define use_symbol_version(real, name, version) \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.5/include/config.h.in 
new/alsa-lib-1.2.5.1/include/config.h.in
--- old/alsa-lib-1.2.5/include/config.h.in      2021-05-27 23:30:47.000000000 
+0200
+++ new/alsa-lib-1.2.5.1/include/config.h.in    2021-06-14 13:44:09.000000000 
+0200
@@ -66,6 +66,9 @@
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
+/* Define to 1 if you have the `eaccess' function. */
+#undef HAVE_EACCESS
+
 /* Define to 1 if you have the <endian.h> header file. */
 #undef HAVE_ENDIAN_H
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.5/include/use-case.h 
new/alsa-lib-1.2.5.1/include/use-case.h
--- old/alsa-lib-1.2.5/include/use-case.h       2021-05-27 23:30:16.000000000 
+0200
+++ new/alsa-lib-1.2.5.1/include/use-case.h     2021-06-14 12:28:44.000000000 
+0200
@@ -258,6 +258,7 @@
  *   - _verb           - return current verb
  *   - _file           - return configuration file loaded for current card
  *   - _alibcfg                - return private alsa-lib's configuration for 
current card
+ *   - _alibpref       - return private alsa-lib's configuration device prefix 
for current card
  *
  *   - [=]{NAME}[/[{modifier}|{/device}][/{verb}]]
  *                      - value identifier {NAME}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.5/include/version.h 
new/alsa-lib-1.2.5.1/include/version.h
--- old/alsa-lib-1.2.5/include/version.h        2021-05-27 23:31:04.000000000 
+0200
+++ new/alsa-lib-1.2.5.1/include/version.h      2021-06-14 13:44:25.000000000 
+0200
@@ -10,5 +10,5 @@
 #define SND_LIB_VER(maj, min, sub) (((maj)<<16)|((min)<<8)|(sub))
 #define SND_LIB_VERSION SND_LIB_VER(SND_LIB_MAJOR, SND_LIB_MINOR, 
SND_LIB_SUBMINOR)
 /** library version (string) */
-#define SND_LIB_VERSION_STR    "1.2.5"
+#define SND_LIB_VERSION_STR    "1.2.5.1"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.5/libtool new/alsa-lib-1.2.5.1/libtool
--- old/alsa-lib-1.2.5/libtool  2021-05-27 23:31:03.000000000 +0200
+++ new/alsa-lib-1.2.5.1/libtool        2021-06-14 13:44:25.000000000 +0200
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Generated automatically by config.status (alsa-lib) 1.2.5
+# Generated automatically by config.status (alsa-lib) 1.2.5.1
 # Libtool was configured on host 68d9557a10be:
 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.5/src/conf.c 
new/alsa-lib-1.2.5.1/src/conf.c
--- old/alsa-lib-1.2.5/src/conf.c       2021-05-27 23:30:16.000000000 +0200
+++ new/alsa-lib-1.2.5.1/src/conf.c     2021-06-14 12:28:44.000000000 +0200
@@ -4325,18 +4325,23 @@
 int snd_config_hook_load_for_all_cards(snd_config_t *root, snd_config_t 
*config, snd_config_t **dst, snd_config_t *private_data ATTRIBUTE_UNUSED)
 {
        int card = -1, err;
+       snd_config_t *loaded;   // trace loaded cards
        
+       err = snd_config_top(&loaded);
+       if (err < 0)
+               return err;
        do {
                err = snd_card_next(&card);
                if (err < 0)
-                       return err;
+                       goto __fin_err;
                if (card >= 0) {
-                       snd_config_t *n, *private_data = NULL;
+                       snd_config_t *n, *m, *private_data = NULL;
                        const char *driver;
                        char *fdriver = NULL;
+                       bool load;
                        err = snd_determine_driver(card, &fdriver);
                        if (err < 0)
-                               return err;
+                               goto __fin_err;
                        if (snd_config_search(root, fdriver, &n) >= 0) {
                                if (snd_config_get_string(n, &driver) < 0) {
                                        if (snd_config_get_type(n) == 
SND_CONFIG_TYPE_COMPOUND) {
@@ -4357,6 +4362,19 @@
                                driver = fdriver;
                        }
                      __std:
+                       load = true;
+                       err = snd_config_imake_integer(&m, driver, 1);
+                       if (err < 0)
+                               goto __err;
+                       err = snd_config_add(loaded, m);
+                       if (err < 0) {
+                               if (err == -EEXIST) {
+                                       snd_config_delete(m);
+                                       load = false;
+                               } else {
+                                       goto __err;
+                               }
+                       }
                        private_data = _snd_config_hook_private_data(card, 
driver);
                        if (!private_data) {
                                err = -ENOMEM;
@@ -4365,17 +4383,22 @@
                        err = _snd_config_hook_table(root, config, 
private_data);
                        if (err < 0)
                                goto __err;
-                       err = snd_config_hook_load(root, config, &n, 
private_data);
+                       if (load)
+                               err = snd_config_hook_load(root, config, &n, 
private_data);
                      __err:
                        if (private_data)
                                snd_config_delete(private_data);
                        free(fdriver);
                        if (err < 0)
-                               return err;
+                               goto __fin_err;
                }
        } while (card >= 0);
+       snd_config_delete(loaded);
        *dst = NULL;
        return 0;
+__fin_err:
+       snd_config_delete(loaded);
+       return err;
 }
 #ifndef DOC_HIDDEN
 SND_DLSYM_BUILD_VERSION(snd_config_hook_load_for_all_cards, 
SND_CONFIG_DLSYM_VERSION_HOOK);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.5/src/confmisc.c 
new/alsa-lib-1.2.5.1/src/confmisc.c
--- old/alsa-lib-1.2.5/src/confmisc.c   2021-05-27 23:30:16.000000000 +0200
+++ new/alsa-lib-1.2.5.1/src/confmisc.c 2021-06-14 12:28:44.000000000 +0200
@@ -154,10 +154,10 @@
        long v;
        int err;
 
-       if ((err = snd_config_get_integer(conf, &v)) < 0) {
-               if ((err = snd_config_get_string(conf, &str)) < 0) {
-                       snd_config_get_id(conf, &id);
-                       SNDERR("Invalid field %s", id);
+       if (snd_config_get_integer(conf, &v) < 0) {
+               if (snd_config_get_string(conf, &str)) {
+                       if (snd_config_get_id(conf, &id) >= 0)
+                               SNDERR("Invalid field %s", id);
                        return -EINVAL;
                }
                err = snd_card_get_index(str);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.5/src/control/control_remap.c 
new/alsa-lib-1.2.5.1/src/control/control_remap.c
--- old/alsa-lib-1.2.5/src/control/control_remap.c      2021-05-27 
23:30:16.000000000 +0200
+++ new/alsa-lib-1.2.5.1/src/control/control_remap.c    2021-06-14 
12:28:44.000000000 +0200
@@ -323,7 +323,7 @@
 static int snd_ctl_remap_async(snd_ctl_t *ctl, int sig, pid_t pid)
 {
        snd_ctl_remap_t *priv = ctl->private_data;
-       return snd_ctl_remap_async(priv->child, sig, pid);
+       return snd_ctl_async(priv->child, sig, pid);
 }
 
 static int snd_ctl_remap_subscribe_events(snd_ctl_t *ctl, int subscribe)
@@ -1040,7 +1040,7 @@
 
        snd_config_for_each(i, next, conf) {
                snd_config_t *n = snd_config_iterator_entry(i);
-               long idx, chn;
+               long idx = -1, chn = -1;
                const char *id;
                if (snd_config_get_id(n, &id) < 0)
                        continue;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.5/src/pcm/pcm_direct.c 
new/alsa-lib-1.2.5.1/src/pcm/pcm_direct.c
--- old/alsa-lib-1.2.5/src/pcm/pcm_direct.c     2021-05-27 23:30:16.000000000 
+0200
+++ new/alsa-lib-1.2.5.1/src/pcm/pcm_direct.c   2021-06-14 12:28:44.000000000 
+0200
@@ -1857,8 +1857,6 @@
                        continue;
                }
        }
-       if (card < 0)
-               card = 0;
        if (device < 0)
                device = 0;
        if (subdevice < 0)
@@ -2126,24 +2124,20 @@
        dmix->type = type;
 
        ret = snd_pcm_new(pcmp, type, name, stream, mode);
-       if (ret < 0) {
-_err_nosem:
-               free(dmix->bindings);
-               free(dmix);
-               return ret;
-       }
+       if (ret < 0)
+               goto _err_nosem;
 
        while (1) {
                ret = snd_pcm_direct_semaphore_create_or_connect(dmix);
                if (ret < 0) {
                        SNDERR("unable to create IPC semaphore");
-                       goto _err_nosem;
+                       goto _err_nosem_free;
                }
                ret = snd_pcm_direct_semaphore_down(dmix, 
DIRECT_IPC_SEM_CLIENT);
                if (ret < 0) {
                        snd_pcm_direct_semaphore_discard(dmix);
                        if (--fail_sem_loop <= 0)
-                               goto _err_nosem;
+                               goto _err_nosem_free;
                        continue;
                }
                break;
@@ -2153,10 +2147,17 @@
        if (ret < 0) {
                SNDERR("unable to create IPC shm instance");
                snd_pcm_direct_semaphore_up(dmix, DIRECT_IPC_SEM_CLIENT);
-               goto _err_nosem;
+               goto _err_nosem_free;
        } else {
                *_dmix = dmix;
        }
 
        return ret;
+_err_nosem_free:
+       snd_pcm_free(*pcmp);
+       *pcmp = NULL;
+_err_nosem:
+       free(dmix->bindings);
+       free(dmix);
+       return ret;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.5/src/pcm/pcm_dmix.c 
new/alsa-lib-1.2.5.1/src/pcm/pcm_dmix.c
--- old/alsa-lib-1.2.5/src/pcm/pcm_dmix.c       2021-05-27 23:30:16.000000000 
+0200
+++ new/alsa-lib-1.2.5.1/src/pcm/pcm_dmix.c     2021-06-14 12:28:44.000000000 
+0200
@@ -998,7 +998,7 @@
                      snd_config_t *root, snd_config_t *sconf,
                      snd_pcm_stream_t stream, int mode)
 {
-       snd_pcm_t *pcm = NULL, *spcm = NULL;
+       snd_pcm_t *pcm, *spcm = NULL;
        snd_pcm_direct_t *dmix;
        int ret, first_instance;
 
@@ -1154,12 +1154,9 @@
        } else
                snd_pcm_direct_semaphore_up(dmix, DIRECT_IPC_SEM_CLIENT);
  _err_nosem:
-       if (dmix) {
-               free(dmix->bindings);
-               free(dmix);
-       }
-       if (pcm)
-               snd_pcm_free(pcm);
+       free(dmix->bindings);
+       free(dmix);
+       snd_pcm_free(pcm);
        return ret;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.5/src/pcm/pcm_dshare.c 
new/alsa-lib-1.2.5.1/src/pcm/pcm_dshare.c
--- old/alsa-lib-1.2.5/src/pcm/pcm_dshare.c     2021-05-27 23:30:16.000000000 
+0200
+++ new/alsa-lib-1.2.5.1/src/pcm/pcm_dshare.c   2021-06-14 12:28:44.000000000 
+0200
@@ -690,8 +690,8 @@
                        snd_config_t *root, snd_config_t *sconf,
                        snd_pcm_stream_t stream, int mode)
 {
-       snd_pcm_t *pcm = NULL, *spcm = NULL;
-       snd_pcm_direct_t *dshare = NULL;
+       snd_pcm_t *pcm, *spcm = NULL;
+       snd_pcm_direct_t *dshare;
        int ret, first_instance;
        unsigned int chn;
 
@@ -851,12 +851,9 @@
        } else
                snd_pcm_direct_semaphore_up(dshare, DIRECT_IPC_SEM_CLIENT);
  _err_nosem:
-       if (dshare) {
-               free(dshare->bindings);
-               free(dshare);
-       }
-       if (pcm)
-               snd_pcm_free(pcm);
+       free(dshare->bindings);
+       free(dshare);
+       snd_pcm_free(pcm);
        return ret;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.5/src/pcm/pcm_dsnoop.c 
new/alsa-lib-1.2.5.1/src/pcm/pcm_dsnoop.c
--- old/alsa-lib-1.2.5/src/pcm/pcm_dsnoop.c     2021-05-27 23:30:16.000000000 
+0200
+++ new/alsa-lib-1.2.5.1/src/pcm/pcm_dsnoop.c   2021-06-14 12:28:44.000000000 
+0200
@@ -564,8 +564,8 @@
                        snd_config_t *root, snd_config_t *sconf,
                        snd_pcm_stream_t stream, int mode)
 {
-       snd_pcm_t *pcm = NULL, *spcm = NULL;
-       snd_pcm_direct_t *dsnoop = NULL;
+       snd_pcm_t *pcm, *spcm = NULL;
+       snd_pcm_direct_t *dsnoop;
        int ret, first_instance;
 
        assert(pcmp);
@@ -708,12 +708,9 @@
                snd_pcm_direct_semaphore_up(dsnoop, DIRECT_IPC_SEM_CLIENT);
 
  _err_nosem:
-       if (dsnoop) {
-               free(dsnoop->bindings);
-               free(dsnoop);
-       }
-       if (pcm)
-               snd_pcm_free(pcm);
+       free(dsnoop->bindings);
+       free(dsnoop);
+       snd_pcm_free(pcm);
        return ret;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.5/src/pcm/pcm_softvol.c 
new/alsa-lib-1.2.5.1/src/pcm/pcm_softvol.c
--- old/alsa-lib-1.2.5/src/pcm/pcm_softvol.c    2021-05-27 23:30:16.000000000 
+0200
+++ new/alsa-lib-1.2.5.1/src/pcm/pcm_softvol.c  2021-06-14 12:28:44.000000000 
+0200
@@ -711,13 +711,13 @@
                        unsigned int *old_tlv, size_t old_tlv_size)
 {
        unsigned int tlv[4];
-       if (sizeof(tlv) <= old_tlv_size && memcmp(tlv, old_tlv, sizeof(tlv)) == 
0)
-               return 0;
        tlv[SNDRV_CTL_TLVO_TYPE] = SND_CTL_TLVT_DB_SCALE;
        tlv[SNDRV_CTL_TLVO_LEN] = 2 * sizeof(int);
        tlv[SNDRV_CTL_TLVO_DB_SCALE_MIN] = (int)(svol->min_dB * 100);
        tlv[SNDRV_CTL_TLVO_DB_SCALE_MUTE_AND_STEP] =
                (int)((svol->max_dB - svol->min_dB) * 100 / svol->max_val);
+       if (sizeof(tlv) <= old_tlv_size && memcmp(tlv, old_tlv, sizeof(tlv)) == 
0)
+               return 0;
        return snd_ctl_elem_tlv_write(svol->ctl, &cinfo->id, tlv);
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.5/src/timer/timer_hw.c 
new/alsa-lib-1.2.5.1/src/timer/timer_hw.c
--- old/alsa-lib-1.2.5/src/timer/timer_hw.c     2021-05-27 23:30:16.000000000 
+0200
+++ new/alsa-lib-1.2.5.1/src/timer/timer_hw.c   2021-06-14 12:28:44.000000000 
+0200
@@ -330,8 +330,6 @@
                SNDERR("Unexpected field %s", id);
                return -EINVAL;
        }
-       if (card < 0)
-               return -EINVAL;
        return snd_timer_hw_open(timer, name, dev_class, dev_sclass, card, 
device, subdevice, mode);
 }
 SND_DLSYM_BUILD_VERSION(_snd_timer_hw_open, SND_TIMER_DLSYM_VERSION);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.5/src/ucm/main.c 
new/alsa-lib-1.2.5.1/src/ucm/main.c
--- old/alsa-lib-1.2.5/src/ucm/main.c   2021-05-27 23:30:16.000000000 +0200
+++ new/alsa-lib-1.2.5.1/src/ucm/main.c 2021-06-14 12:28:44.000000000 +0200
@@ -37,6 +37,7 @@
 #include <stdarg.h>
 #include <pthread.h>
 #include <sys/stat.h>
+#include <sys/wait.h>
 #include <limits.h>
 
 /*
@@ -605,8 +606,10 @@
                uc_error("unable to open file '%s': %s", file, 
snd_strerror(err));
                goto _err;
        }
-       if (!config || snd_config_is_empty(config))
+       if (!config || snd_config_is_empty(config)) {
+               snd_output_close(out);
                goto _err;
+       }
        if (with_root) {
                snd_output_printf(out, "%s ", root);
                err = _snd_config_save_node_value(config, out, 0);
@@ -2139,6 +2142,25 @@
 }
 
 /**
+ * \brief Get device prefix for private alsa-lib configuration
+ * \param uc_mgr Use case manager
+ * \param str Returned value string
+ * \return Zero on success (value is filled), otherwise a negative error code
+ */
+static int get_alibpref(snd_use_case_mgr_t *uc_mgr, char **str)
+{
+       const size_t l = 10;
+       char *s;
+
+       s = malloc(l);
+       if (s == NULL)
+               return -ENOMEM;
+       snprintf(s, l, "_ucm%04X.", uc_mgr->ucm_card_number);
+       *str = s;
+       return 0;
+}
+
+/**
  * \brief Get current - string
  * \param uc_mgr Use case manager
  * \param identifier 
@@ -2193,6 +2215,8 @@
 
        } else if (strcmp(identifier, "_alibcfg") == 0) {
                err = get_alibcfg(uc_mgr, (char **)value);
+       } else if (strcmp(identifier, "_alibpref") == 0) {
+               err = get_alibpref(uc_mgr, (char **)value);
        } else if (identifier[0] == '_') {
                err = -ENOENT;
        } else {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.5/src/ucm/parser.c 
new/alsa-lib-1.2.5.1/src/ucm/parser.c
--- old/alsa-lib-1.2.5/src/ucm/parser.c 2021-05-27 23:30:16.000000000 +0200
+++ new/alsa-lib-1.2.5.1/src/ucm/parser.c       2021-06-14 12:28:44.000000000 
+0200
@@ -1779,7 +1779,7 @@
                        err = parse_libconfig(uc_mgr, n);
                        if (err < 0) {
                                uc_error("error: failed to parse LibConfig");
-                               return err;
+                               goto _err;
                        }
                        continue;
                }
@@ -2518,7 +2518,11 @@
 
                snprintf(fn, sizeof(fn), "%s.conf", d_name);
                ucm_filename(filename, sizeof(filename), 2, d_name, fn);
+#ifdef HAVE_EACCESS
                if (eaccess(filename, R_OK))
+#else
+               if (access(filename, R_OK))
+#endif
                        continue;
 
                err = uc_mgr_config_load(2, filename, &cfg);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.5/src/ucm/ucm_cond.c 
new/alsa-lib-1.2.5.1/src/ucm/ucm_cond.c
--- old/alsa-lib-1.2.5/src/ucm/ucm_cond.c       2021-05-27 23:30:16.000000000 
+0200
+++ new/alsa-lib-1.2.5.1/src/ucm/ucm_cond.c     2021-06-14 12:28:44.000000000 
+0200
@@ -160,11 +160,12 @@
        if (err < 0)
                return err;
        err = regcomp(&re, s, options);
-       free(s);
        if (err) {
                uc_error("Regex '%s' compilation failed (code %d)", s, err);
+               free(s);
                return -EINVAL;
        }
+       free(s);
 
        err = uc_mgr_get_substituted_value(uc_mgr, &s, string);
        if (err < 0) {
@@ -271,7 +272,7 @@
 
 static int if_eval_path(snd_use_case_mgr_t *uc_mgr, snd_config_t *eval)
 {
-       const char *path, *mode = NULL;
+       const char *path, *mode = "";
        int err, amode = F_OK;
 
        if (uc_mgr->conf_format < 4) {
@@ -304,7 +305,11 @@
                return -EINVAL;
        }
 
+#ifdef HAVE_EACCESS
        if (eaccess(path, amode))
+#else
+       if (access(path, amode))
+#endif
                return 0;
 
        return 1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.5/src/ucm/ucm_exec.c 
new/alsa-lib-1.2.5.1/src/ucm/ucm_exec.c
--- old/alsa-lib-1.2.5/src/ucm/ucm_exec.c       2021-05-27 23:30:16.000000000 
+0200
+++ new/alsa-lib-1.2.5.1/src/ucm/ucm_exec.c     2021-06-14 12:28:44.000000000 
+0200
@@ -30,6 +30,7 @@
 #include "ucm_local.h"
 #include <sys/stat.h>
 #include <sys/wait.h>
+#include <limits.h>
 #include <dirent.h>
 
 static pthread_mutex_t fork_lock = PTHREAD_MUTEX_INITIALIZER;
@@ -73,6 +74,7 @@
                                    || !(st.st_mode & S_IEXEC))
                                        continue;
                                snd_strlcpy(out, bin, len);
+                               closedir(dir);
                                return 1;
                        }
                        closedir(dir);
@@ -184,7 +186,11 @@
                return -EINVAL;
 
        prog = argv[0];
-       if (argv[0][0] != '/' && argv[0][0] != '.') {
+       if (prog == NULL) {
+               err = -EINVAL;
+               goto __error;
+       }
+       if (prog[0] != '/' && prog[0] != '.') {
                if (!find_exec(argv[0], bin, sizeof(bin))) {
                        err = -ENOEXEC;
                        goto __error;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.5/src/ucm/ucm_include.c 
new/alsa-lib-1.2.5.1/src/ucm/ucm_include.c
--- old/alsa-lib-1.2.5/src/ucm/ucm_include.c    2021-05-27 23:30:16.000000000 
+0200
+++ new/alsa-lib-1.2.5.1/src/ucm/ucm_include.c  2021-06-14 12:28:44.000000000 
+0200
@@ -108,7 +108,7 @@
        return 0;
 }
 
-static int merge_it(snd_config_t *dst, snd_config_t *n)
+static int merge_it(snd_config_t *dst, snd_config_t *n, snd_config_t **_dn)
 {
        snd_config_t *dn;
        const char *id;
@@ -123,6 +123,8 @@
        err = snd_config_merge(dn, n, 0); /* merge / append mode */
        if (err < 0)
                snd_config_delete(n);
+       else
+               *_dn = dn;
        return err;
 }
 
@@ -198,7 +200,7 @@
                if (_before) {
                        err = snd_config_add_before(_before, n);
                        if (err == -EEXIST)
-                               err = merge_it(dst, n);
+                               err = merge_it(dst, n, &n);
                        if (err < 0)
                                return err;
                        _before = NULL;
@@ -206,7 +208,7 @@
                } else if (_after) {
                        err = snd_config_add_after(_after, n);
                        if (err == -EEXIST)
-                               err = merge_it(dst, n);
+                               err = merge_it(dst, n, &n);
                        if (err < 0)
                                return err;
                        _after = n;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.5/src/ucm/ucm_subs.c 
new/alsa-lib-1.2.5.1/src/ucm/ucm_subs.c
--- old/alsa-lib-1.2.5/src/ucm/ucm_subs.c       2021-05-27 23:30:16.000000000 
+0200
+++ new/alsa-lib-1.2.5.1/src/ucm/ucm_subs.c     2021-06-14 12:28:44.000000000 
+0200
@@ -224,7 +224,11 @@
                uc_error("unable to create memory input buffer");
                return NULL;
        }
-       snd_config_top(&config);
+       err = snd_config_top(&config);
+       if (err < 0) {
+               snd_input_close(input);
+               return NULL;
+       }
        err = snd_config_load(config, input);
        snd_input_close(input);
        if (err < 0) {
@@ -485,7 +489,7 @@
                uc_error("Missing device type!");
                return -EINVAL;
        }
-       for (t = types; t; t++)
+       for (t = types; t->name; t++)
                if (strcasecmp(t->name, s) == 0)
                        return t->init(iter, config);
        uc_error("Device type '%s' is invalid", s);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.5/version new/alsa-lib-1.2.5.1/version
--- old/alsa-lib-1.2.5/version  2021-05-27 23:30:59.000000000 +0200
+++ new/alsa-lib-1.2.5.1/version        2021-06-14 13:44:20.000000000 +0200
@@ -1 +1 @@
-1.2.5
+1.2.5.1

Reply via email to