Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package alsa for openSUSE:Factory checked in 
at 2024-06-14 18:57:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/alsa (Old)
 and      /work/SRC/openSUSE:Factory/.alsa.new.19518 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "alsa"

Fri Jun 14 18:57:43 2024 rev:226 rq:1180719 version:1.2.12

Changes:
--------
--- /work/SRC/openSUSE:Factory/alsa/alsa.changes        2024-02-04 
19:07:07.296111495 +0100
+++ /work/SRC/openSUSE:Factory/.alsa.new.19518/alsa.changes     2024-06-14 
18:57:52.766426574 +0200
@@ -1,0 +2,13 @@
+Thu Jun 13 14:51:29 UTC 2024 - Takashi Iwai <[email protected]>
+
+- Update to alsa-lib 1.2.12:
+  * pcm: plug support for iec958 subframe samples
+  * pcm: ladspa - Skip missing ladspa directories
+  * topology: correct version script path
+  * ucm: define and describe Syntax 7
+  * async handler cleanup fix
+  * conf updates
+  For details, see:
+    https://www.alsa-project.org/wiki/Changes_v1.2.11_v1.2.12#alsa-lib
+
+-------------------------------------------------------------------

Old:
----
  alsa-lib-1.2.11.tar.bz2
  alsa-lib-1.2.11.tar.bz2.sig

New:
----
  alsa-lib-1.2.12.tar.bz2
  alsa-lib-1.2.12.tar.bz2.sig

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

Other differences:
------------------
++++++ alsa.spec ++++++
--- /var/tmp/diff_new_pack.KkhwWB/_old  2024-06-14 18:57:53.634457880 +0200
+++ /var/tmp/diff_new_pack.KkhwWB/_new  2024-06-14 18:57:53.634457880 +0200
@@ -32,7 +32,7 @@
 %endif
 
 Name:           alsa
-Version:        1.2.11
+Version:        1.2.12
 Release:        0
 Summary:        Advanced Linux Sound Architecture
 License:        LGPL-2.1-or-later



++++++ alsa-lib-1.2.11.tar.bz2 -> alsa-lib-1.2.12.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.11/configure 
new/alsa-lib-1.2.12/configure
--- old/alsa-lib-1.2.11/configure       2024-01-29 17:17:52.000000000 +0100
+++ new/alsa-lib-1.2.12/configure       2024-06-10 11:20:55.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.11.
+# Generated by GNU Autoconf 2.69 for alsa-lib 1.2.12.
 #
 #
 # 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.11'
-PACKAGE_STRING='alsa-lib 1.2.11'
+PACKAGE_VERSION='1.2.12'
+PACKAGE_STRING='alsa-lib 1.2.12'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1472,7 +1472,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.11 to adapt to many kinds of systems.
+\`configure' configures alsa-lib 1.2.12 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1543,7 +1543,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of alsa-lib 1.2.11:";;
+     short | recursive ) echo "Configuration of alsa-lib 1.2.12:";;
    esac
   cat <<\_ACEOF
 
@@ -1706,7 +1706,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-alsa-lib configure 1.2.11
+alsa-lib configure 1.2.12
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2117,7 +2117,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.11, which was
+It was created by alsa-lib $as_me 1.2.12, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3055,7 +3055,7 @@
 
 # Define the identity of the package.
  PACKAGE='alsa-lib'
- VERSION='1.2.11'
+ VERSION='1.2.12'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -14349,6 +14349,11 @@
 $as_echo "#define BUILD_PCM_PLUGIN_ALAW \"1\"" >>confdefs.h
 
 fi
+if test "$build_pcm_iec958" = "yes"; then
+
+$as_echo "#define BUILD_PCM_PLUGIN_IEC958 \"1\"" >>confdefs.h
+
+fi
 if test "$build_pcm_mmap_emul" = "yes"; then
 
 $as_echo "#define BUILD_PCM_PLUGIN_MMAP_EMUL \"1\"" >>confdefs.h
@@ -15234,7 +15239,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.11, which was
+This file was extended by alsa-lib $as_me 1.2.12, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -15300,7 +15305,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.11
+alsa-lib config.status 1.2.12
 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.11/configure.ac 
new/alsa-lib-1.2.12/configure.ac
--- old/alsa-lib-1.2.11/configure.ac    2024-01-29 17:16:07.000000000 +0100
+++ new/alsa-lib-1.2.12/configure.ac    2024-06-10 11:18:34.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.11)
+AC_INIT(alsa-lib, 1.2.12)
 
 AC_CONFIG_SRCDIR([src/control/control.c])
 AC_CONFIG_MACRO_DIR([m4])
@@ -642,6 +642,9 @@
 if test "$build_pcm_alaw" = "yes"; then
   AC_DEFINE([BUILD_PCM_PLUGIN_ALAW], "1", [Build PCM alaw plugin])
 fi
+if test "$build_pcm_iec958" = "yes"; then
+  AC_DEFINE([BUILD_PCM_PLUGIN_IEC958], "1", [Build PCM iec958 plugin])
+fi
 if test "$build_pcm_mmap_emul" = "yes"; then
   AC_DEFINE([BUILD_PCM_PLUGIN_MMAP_EMUL], "1", [Build PCM mmap-emul plugin])
 fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.11/include/config.h.in 
new/alsa-lib-1.2.12/include/config.h.in
--- old/alsa-lib-1.2.11/include/config.h.in     2024-01-29 17:17:49.000000000 
+0100
+++ new/alsa-lib-1.2.12/include/config.h.in     2024-06-10 11:20:52.000000000 
+0200
@@ -33,6 +33,9 @@
 /* Build PCM alaw plugin */
 #undef BUILD_PCM_PLUGIN_ALAW
 
+/* Build PCM iec958 plugin */
+#undef BUILD_PCM_PLUGIN_IEC958
+
 /* Build PCM lfloat plugin */
 #undef BUILD_PCM_PLUGIN_LFLOAT
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.11/include/pcm_plugin.h 
new/alsa-lib-1.2.12/include/pcm_plugin.h
--- old/alsa-lib-1.2.11/include/pcm_plugin.h    2024-01-29 17:16:07.000000000 
+0100
+++ new/alsa-lib-1.2.12/include/pcm_plugin.h    2024-06-10 11:18:34.000000000 
+0200
@@ -134,6 +134,19 @@
                        snd_pcm_stream_t stream, int mode);
 
 /*
+ *  IEC958 subframe conversion plugin
+ */
+int snd_pcm_iec958_open(snd_pcm_t **pcmp, const char *name,
+                       snd_pcm_format_t sformat, snd_pcm_t *slave,
+                       int close_slave,
+                       const unsigned char *status_bits,
+                       const unsigned char *preamble_vals,
+                       int hdmi_mode);
+int _snd_pcm_iec958_open(snd_pcm_t **pcmp, const char *name,
+                        snd_config_t *root, snd_config_t *conf,
+                        snd_pcm_stream_t stream, int mode);
+
+/*
  *  Route plugin for linear formats
  */
 int snd_pcm_route_load_ttable(snd_config_t *tt, snd_pcm_route_ttable_entry_t 
*ttable,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.11/include/use-case.h 
new/alsa-lib-1.2.12/include/use-case.h
--- old/alsa-lib-1.2.11/include/use-case.h      2024-01-29 17:16:07.000000000 
+0100
+++ new/alsa-lib-1.2.12/include/use-case.h      2024-06-10 11:18:34.000000000 
+0200
@@ -139,7 +139,7 @@
 #define SND_USE_CASE_DEV_BLUETOOTH     "Bluetooth"     /**< Bluetooth Device */
 #define SND_USE_CASE_DEV_EARPIECE      "Earpiece"      /**< Earpiece Device */
 #define SND_USE_CASE_DEV_SPDIF         "SPDIF"         /**< SPDIF Device */
-#define SND_USE_CASE_DEV_HDMI          "HDMI"          /**< HDMI Device */
+#define SND_USE_CASE_DEV_HDMI          "HDMI"          /**< HDMI / DisplayPort 
Device */
 #define SND_USE_CASE_DEV_USB           "USB"           /**< USB Device 
(multifunctional) */
 #define SND_USE_CASE_DEV_DIRECT                "Direct"        /**< Direct 
Device (no channel remapping), (e.g. ProAudio usage) */
 /* add new devices to end of list */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.11/include/version.h 
new/alsa-lib-1.2.12/include/version.h
--- old/alsa-lib-1.2.11/include/version.h       2024-01-29 17:18:04.000000000 
+0100
+++ new/alsa-lib-1.2.12/include/version.h       2024-06-10 11:21:05.000000000 
+0200
@@ -4,11 +4,11 @@
 
 #define SND_LIB_MAJOR          1 /**< major number of library version */
 #define SND_LIB_MINOR          2 /**< minor number of library version */
-#define SND_LIB_SUBMINOR       11 /**< subminor number of library version */
+#define SND_LIB_SUBMINOR       12 /**< subminor number of library version */
 #define SND_LIB_EXTRAVER       1000000 /**< extra version number, used mainly 
for betas */
 /** library version */
 #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.11"
+#define SND_LIB_VERSION_STR    "1.2.12"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.11/libtool new/alsa-lib-1.2.12/libtool
--- old/alsa-lib-1.2.11/libtool 2024-01-29 17:18:04.000000000 +0100
+++ new/alsa-lib-1.2.12/libtool 2024-06-10 11:21:05.000000000 +0200
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Generated automatically by config.status (alsa-lib) 1.2.11
+# Generated automatically by config.status (alsa-lib) 1.2.12
 # Libtool was configured on host f420bc43a183:
 # 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.11/src/async.c 
new/alsa-lib-1.2.12/src/async.c
--- old/alsa-lib-1.2.11/src/async.c     2024-01-29 17:16:07.000000000 +0100
+++ new/alsa-lib-1.2.12/src/async.c     2024-06-10 11:18:34.000000000 +0200
@@ -149,12 +149,31 @@
  */
 int snd_async_del_handler(snd_async_handler_t *handler)
 {
-       int err = 0;
-       int was_empty = list_empty(&snd_async_handlers);
+       int err = 0, err2 = 0;
+       int was_empty;
        assert(handler);
+       if (handler->type != SND_ASYNC_HANDLER_GENERIC) {
+               if (!list_empty(&handler->hlist))
+                       list_del(&handler->hlist);
+               if (!list_empty(&handler->hlist))
+                       goto _glist;
+               switch (handler->type) {
+#ifdef BUILD_PCM
+               case SND_ASYNC_HANDLER_PCM:
+                       err2 = snd_pcm_async(handler->u.pcm, -1, 1);
+                       break;
+#endif
+               case SND_ASYNC_HANDLER_CTL:
+                       err2 = snd_ctl_async(handler->u.ctl, -1, 1);
+                       break;
+               default:
+                       assert(0);
+               }
+       }
+ _glist:
+       was_empty = list_empty(&snd_async_handlers);
        list_del(&handler->glist);
-       if (!was_empty
-        && list_empty(&snd_async_handlers)) {
+       if (!was_empty && list_empty(&snd_async_handlers)) {
                err = sigaction(snd_async_signo, &previous_action, NULL);
                if (err < 0) {
                        SYSERR("sigaction");
@@ -162,27 +181,8 @@
                }
                memset(&previous_action, 0, sizeof(previous_action));
        }
-       if (handler->type == SND_ASYNC_HANDLER_GENERIC)
-               goto _end;
-       if (!list_empty(&handler->hlist))
-               list_del(&handler->hlist);
-       if (!list_empty(&handler->hlist))
-               goto _end;
-       switch (handler->type) {
-#ifdef BUILD_PCM
-       case SND_ASYNC_HANDLER_PCM:
-               err = snd_pcm_async(handler->u.pcm, -1, 1);
-               break;
-#endif
-       case SND_ASYNC_HANDLER_CTL:
-               err = snd_ctl_async(handler->u.ctl, -1, 1);
-               break;
-       default:
-               assert(0);
-       }
- _end:
        free(handler);
-       return err;
+       return err ? err : err2;
 }
 
 /**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.11/src/conf/cards/HDA-Intel.conf 
new/alsa-lib-1.2.12/src/conf/cards/HDA-Intel.conf
--- old/alsa-lib-1.2.11/src/conf/cards/HDA-Intel.conf   2024-01-29 
17:16:07.000000000 +0100
+++ new/alsa-lib-1.2.12/src/conf/cards/HDA-Intel.conf   2024-06-10 
11:18:34.000000000 +0200
@@ -163,8 +163,6 @@
        hint.device 1
 }
 
-<confdir:pcm/hdmi.conf>
-
 HDA-Intel.pcm.hdmi.common {
        @args [ CARD DEVICE CTLINDEX AES0 AES1 AES2 AES3 ]
        @args.CARD {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.11/src/conf/cards/HdmiLpeAudio.conf 
new/alsa-lib-1.2.12/src/conf/cards/HdmiLpeAudio.conf
--- old/alsa-lib-1.2.11/src/conf/cards/HdmiLpeAudio.conf        2024-01-29 
17:16:07.000000000 +0100
+++ new/alsa-lib-1.2.12/src/conf/cards/HdmiLpeAudio.conf        2024-06-10 
11:18:34.000000000 +0200
@@ -2,8 +2,6 @@
 # Configuration for the Intel HDMI/DP LPE audio
 #
 
-<confdir:pcm/hdmi.conf>
-
 HdmiLpeAudio.pcm.hdmi.0 {
        @args [ CARD AES0 AES1 AES2 AES3 ]
        @args.CARD {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.11/src/conf/cards/USB-Audio.conf 
new/alsa-lib-1.2.12/src/conf/cards/USB-Audio.conf
--- old/alsa-lib-1.2.11/src/conf/cards/USB-Audio.conf   2024-01-29 
17:16:07.000000000 +0100
+++ new/alsa-lib-1.2.12/src/conf/cards/USB-Audio.conf   2024-06-10 
11:18:34.000000000 +0200
@@ -53,6 +53,7 @@
        "Blue Snowball" 999
        "C-Media USB Headphone Set" 999
        "Cmedia Audio" 999
+       "Corsair HS60 PRO Surround USB S" 999
        "DELL PROFESSIONAL SOUND BAR AE5" 999
        "HP Digital Stereo Headset" 999
        "GN 9330" 999
@@ -66,8 +67,11 @@
        "Plantronics USB Headset" 999
        "Plantronics Wireless Audio" 999
        "SB WoW Headset" 999
+       "Scarlett 2i2 4th Gen" 999
        "Scarlett 2i2 USB" 999
        "Scarlett 2i4 USB" 999
+       "Scarlett Solo 4th Gen" 999
+       "Scarlett Solo USB" 999
        "Sennheiser USB headset" 999
        "SWTOR Gaming Headset by Razer" 999
        "ThinkStation P620 Main" 999
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.11/src/conf/cards/aliases.conf 
new/alsa-lib-1.2.12/src/conf/cards/aliases.conf
--- old/alsa-lib-1.2.11/src/conf/cards/aliases.conf     2024-01-29 
17:16:07.000000000 +0100
+++ new/alsa-lib-1.2.12/src/conf/cards/aliases.conf     2024-06-10 
11:18:34.000000000 +0200
@@ -62,3 +62,4 @@
 <confdir:pcm/default.conf>
 <confdir:pcm/dmix.conf>
 <confdir:pcm/dsnoop.conf>
+<confdir:pcm/hdmi.conf>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.11/src/conf/cards/vc4-hdmi.conf 
new/alsa-lib-1.2.12/src/conf/cards/vc4-hdmi.conf
--- old/alsa-lib-1.2.11/src/conf/cards/vc4-hdmi.conf    2024-01-29 
17:16:07.000000000 +0100
+++ new/alsa-lib-1.2.12/src/conf/cards/vc4-hdmi.conf    2024-06-10 
11:18:34.000000000 +0200
@@ -3,8 +3,6 @@
 # subframe conversion
 #
 
-<confdir:pcm/hdmi.conf>
-
 vc4-hdmi.pcm.hdmi.0 {
        @args [ CARD AES0 AES1 AES2 AES3 ]
        @args.CARD {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.11/src/pcm/pcm.c 
new/alsa-lib-1.2.12/src/pcm/pcm.c
--- old/alsa-lib-1.2.11/src/pcm/pcm.c   2024-01-29 17:16:07.000000000 +0100
+++ new/alsa-lib-1.2.12/src/pcm/pcm.c   2024-06-10 11:18:34.000000000 +0200
@@ -215,7 +215,8 @@
 #snd_pcm_hw_params_get_sbits() function. The example: ICE1712
 chips support 32-bit sample processing, but low byte is ignored (playback)
 or zero (capture). The function snd_pcm_hw_params_get_sbits()
-returns 24 in this case.
+returns 24 in this case. The significant bits are related to the usable
+sample bits (width) not the physical sample space.
 
 \section alsa_transfers ALSA transfers
 
@@ -3903,7 +3904,16 @@
 /**
  * \brief Get sample resolution info from a configuration space
  * \param params Configuration space
- * \return signification bits in sample otherwise a negative error code if the 
info is not available
+ * \return sample resolution (in bits) otherwise a negative error code if the 
info is not available
+ *
+ * For linear formats, this function returns sample resolution -
+ * used bits starting from the first usable significant bit defined by
+ * the format (e.g. bit 31 for S32_LE format or bit 23 for S24_LE format -
+ * starting from bit zero). Application may use full sample bit range defined
+ * by the format, but additional bits (outside this sample resolution) are
+ * stripped (not processed).
+ *
+ * For non-linear formats, this value may have a special meaning which may be 
defined in future.
  *
  * This function should only be called when the configuration space
  * contains a single configuration. Call #snd_pcm_hw_params to choose
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.11/src/pcm/pcm_hw.c 
new/alsa-lib-1.2.12/src/pcm/pcm_hw.c
--- old/alsa-lib-1.2.11/src/pcm/pcm_hw.c        2024-01-29 17:16:07.000000000 
+0100
+++ new/alsa-lib-1.2.12/src/pcm/pcm_hw.c        2024-06-10 11:18:34.000000000 
+0200
@@ -379,12 +379,28 @@
        return 0;
 }
 
-static inline int hw_params_call(snd_pcm_hw_t *pcm_hw, snd_pcm_hw_params_t 
*params)
+#define hw_param_mask(params,var) \
+       &((params)->masks[(var) - SND_PCM_HW_PARAM_FIRST_MASK])
+
+static int hw_params_call(snd_pcm_hw_t *pcm_hw, snd_pcm_hw_params_t *params)
 {
+       int err;
+
        /* check for new hw_params structure; it's available from 2.0.2 version 
of PCM API */
        if (SNDRV_PROTOCOL_VERSION(2, 0, 2) <= pcm_hw->version)
-               return ioctl(pcm_hw->fd, SNDRV_PCM_IOCTL_HW_PARAMS, params);
-       return use_old_hw_params_ioctl(pcm_hw->fd, SND_PCM_IOCTL_HW_PARAMS_OLD, 
params);
+               err = ioctl(pcm_hw->fd, SNDRV_PCM_IOCTL_HW_PARAMS, params);
+       else
+               err = use_old_hw_params_ioctl(pcm_hw->fd, 
SND_PCM_IOCTL_HW_PARAMS_OLD, params);
+       if (err >= 0 && pcm_hw->version < SNDRV_PROTOCOL_VERSION(2, 0, 17) && 
params->msbits > 0) {
+               snd_mask_t *m = hw_param_mask(params, 
SNDRV_PCM_HW_PARAM_FORMAT);
+               if (snd_mask_single(m)) {
+                       snd_pcm_format_t format = snd_mask_min(m);
+                       int width = snd_pcm_format_width(format);
+                       if (width > 0 && params->msbits > (unsigned int)width)
+                               params->msbits = width;
+               }
+       }
+       return err;
 }
 
 static int snd_pcm_hw_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.11/src/pcm/pcm_ladspa.c 
new/alsa-lib-1.2.12/src/pcm/pcm_ladspa.c
--- old/alsa-lib-1.2.11/src/pcm/pcm_ladspa.c    2024-01-29 17:16:07.000000000 
+0100
+++ new/alsa-lib-1.2.12/src/pcm/pcm_ladspa.c    2024-06-10 11:18:34.000000000 
+0200
@@ -1210,7 +1210,7 @@
                        return err;
                err = snd_pcm_ladspa_check_dir(plugin, fullpath, label, 
ladspa_id);
                free(fullpath);
-               if (err < 0)
+               if (err < 0 && err != -ENOENT)
                        return err;
                if (err > 0)
                        return 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.11/src/pcm/pcm_misc.c 
new/alsa-lib-1.2.12/src/pcm/pcm_misc.c
--- old/alsa-lib-1.2.11/src/pcm/pcm_misc.c      2024-01-29 17:16:07.000000000 
+0100
+++ new/alsa-lib-1.2.12/src/pcm/pcm_misc.c      2024-06-10 11:18:34.000000000 
+0200
@@ -203,9 +203,9 @@
 }
 
 /**
- * \brief Return nominal bits per a PCM sample
+ * \brief Return the bit-width of the format
  * \param format Sample format
- * \return bits per sample, a negative error code if not applicable
+ * \return the bit-width of the format, or a negative error code if not 
applicable
  */
 int snd_pcm_format_width(snd_pcm_format_t format)
 {
@@ -270,9 +270,9 @@
 }
 
 /**
- * \brief Return bits needed to store a PCM sample
+ * \brief Return the physical bit-width of the format (bits needed to store a 
PCM sample)
  * \param format Sample format
- * \return bits per sample, a negative error code if not applicable
+ * \return the physical bit-width of the format, or a negative error code if 
not applicable
  */
 int snd_pcm_format_physical_width(snd_pcm_format_t format)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.11/src/pcm/pcm_params.c 
new/alsa-lib-1.2.12/src/pcm/pcm_params.c
--- old/alsa-lib-1.2.11/src/pcm/pcm_params.c    2024-01-29 17:16:07.000000000 
+0100
+++ new/alsa-lib-1.2.12/src/pcm/pcm_params.c    2024-06-10 11:18:34.000000000 
+0200
@@ -2075,6 +2075,7 @@
 {
        unsigned int k;
        snd_interval_t *i;
+       snd_mask_t *m;
        unsigned int rstamps[RULES];
        unsigned int vstamps[SND_PCM_HW_PARAM_LAST_INTERVAL + 1];
        unsigned int stamp = 2;
@@ -2159,6 +2160,11 @@
                i = hw_param_interval(params, SND_PCM_HW_PARAM_SAMPLE_BITS);
                if (snd_interval_single(i))
                        params->msbits = snd_interval_value(i);
+               m = hw_param_mask_c(params, SNDRV_PCM_HW_PARAM_FORMAT);
+               if (snd_mask_single(m)) {
+                       snd_pcm_format_t format = snd_mask_min(m);
+                       params->msbits = snd_pcm_format_width(format);
+               }
        }
 
        if (!params->rate_den) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.11/src/pcm/pcm_plug.c 
new/alsa-lib-1.2.12/src/pcm/pcm_plug.c
--- old/alsa-lib-1.2.11/src/pcm/pcm_plug.c      2024-01-29 17:16:07.000000000 
+0100
+++ new/alsa-lib-1.2.12/src/pcm/pcm_plug.c      2024-06-10 11:18:34.000000000 
+0200
@@ -186,7 +186,8 @@
 
 #if defined(BUILD_PCM_PLUGIN_MULAW) || \
        defined(BUILD_PCM_PLUGIN_ALAW) || \
-       defined(BUILD_PCM_PLUGIN_ADPCM)
+       defined(BUILD_PCM_PLUGIN_ADPCM) || \
+       defined(BUILD_PCM_PLUGIN_IEC958)
 #define BUILD_PCM_NONLINEAR
 #endif
 
@@ -201,6 +202,10 @@
 #ifdef BUILD_PCM_PLUGIN_ADPCM
        SND_PCM_FORMAT_IMA_ADPCM,
 #endif
+#ifdef BUILD_PCM_PLUGIN_IEC958
+       SND_PCM_FORMAT_IEC958_SUBFRAME_LE,
+       SND_PCM_FORMAT_IEC958_SUBFRAME_BE,
+#endif
 };
 #endif
 
@@ -490,6 +495,18 @@
 }
 #endif
 
+#ifdef BUILD_PCM_PLUGIN_IEC958
+static int iec958_open(snd_pcm_t **pcmp, const char *name,
+                      snd_pcm_format_t sformat, snd_pcm_t *slave,
+                      int close_slave)
+{
+       unsigned char preamble_vals[3] = {
+               0x08, 0x02, 0x04 /* Z, X, Y */
+       };
+       return snd_pcm_iec958_open(pcmp, name, sformat, slave, close_slave, 
NULL, preamble_vals, 0);
+}
+#endif
+
 static int snd_pcm_plug_change_format(snd_pcm_t *pcm, snd_pcm_t **new, 
snd_pcm_plug_params_t *clt, snd_pcm_plug_params_t *slv)
 {
        snd_pcm_plug_t *plug = pcm->private_data;
@@ -527,6 +544,12 @@
                        f = snd_pcm_adpcm_open;
                        break;
 #endif
+#ifdef BUILD_PCM_PLUGIN_IEC958
+               case SND_PCM_FORMAT_IEC958_SUBFRAME_LE:
+               case SND_PCM_FORMAT_IEC958_SUBFRAME_BE:
+                       f = iec958_open;
+                       break;
+#endif
                default:
 #ifdef BUILD_PCM_PLUGIN_LFLOAT
                        if (snd_pcm_format_float(clt->format))
@@ -567,6 +590,12 @@
                        f = snd_pcm_adpcm_open;
                        break;
 #endif
+#ifdef BUILD_PCM_PLUGIN_IEC958
+               case SND_PCM_FORMAT_IEC958_SUBFRAME_LE:
+               case SND_PCM_FORMAT_IEC958_SUBFRAME_BE:
+                       f = iec958_open;
+                       break;
+#endif
                default:
                        return -EINVAL;
                }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.11/src/topology/Makefile.am 
new/alsa-lib-1.2.12/src/topology/Makefile.am
--- old/alsa-lib-1.2.11/src/topology/Makefile.am        2024-01-29 
17:16:07.000000000 +0100
+++ new/alsa-lib-1.2.12/src/topology/Makefile.am        2024-06-10 
11:18:34.000000000 +0200
@@ -2,7 +2,7 @@
 COMPATNUM=@LIBTOOL_VERSION_INFO@
 
 if VERSIONED_SYMBOLS
-VSYMS = -Wl,--version-script=Versions
+VSYMS = -Wl,--version-script=$(srcdir)/Versions
 else
 VSYMS =
 endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.11/src/topology/Makefile.in 
new/alsa-lib-1.2.12/src/topology/Makefile.in
--- old/alsa-lib-1.2.11/src/topology/Makefile.in        2024-01-29 
17:17:51.000000000 +0100
+++ new/alsa-lib-1.2.12/src/topology/Makefile.in        2024-06-10 
11:20:54.000000000 +0200
@@ -348,7 +348,7 @@
 EXTRA_DIST = Versions
 COMPATNUM = @LIBTOOL_VERSION_INFO@
 @VERSIONED_SYMBOLS_FALSE@VSYMS = 
-@VERSIONED_SYMBOLS_TRUE@VSYMS = -Wl,--version-script=Versions
+@VERSIONED_SYMBOLS_TRUE@VSYMS = -Wl,--version-script=$(srcdir)/Versions
 @SYMBOLIC_FUNCTIONS_FALSE@SYMFUNCS = 
 @SYMBOLIC_FUNCTIONS_TRUE@SYMFUNCS = -Wl,-Bsymbolic-functions
 lib_LTLIBRARIES = libatopology.la
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.11/src/ucm/parser.c 
new/alsa-lib-1.2.12/src/ucm/parser.c
--- old/alsa-lib-1.2.11/src/ucm/parser.c        2024-01-29 17:16:07.000000000 
+0100
+++ new/alsa-lib-1.2.12/src/ucm/parser.c        2024-06-10 11:18:34.000000000 
+0200
@@ -415,7 +415,7 @@
        snd_config_iterator_t i, next;
        snd_config_t *m, *mc, *a, *n;
        const char *mid, *id;
-       char name[128], *var;
+       char name[128], *var, *var2;
        const char *s;
        int err;
 
@@ -446,12 +446,25 @@
                err = snd_config_get_id(n, &id);
                if (err < 0)
                        goto __err_path;
+               snprintf(name, sizeof(name), "__%s", id);
+               if (uc_mgr_get_variable(uc_mgr, name)) {
+                       uc_error("Macro argument '%s' is already defined", 
name);
+                       goto __err_path;
+               }
                err = snd_config_get_ascii(n, &var);
                if (err < 0)
                        goto __err_path;
-               snprintf(name, sizeof(name), "__%s", id);
-               err = uc_mgr_set_variable(uc_mgr, name, var);
-               free(var);
+               if (uc_mgr->conf_format < 7) {
+                       err = uc_mgr_set_variable(uc_mgr, name, var);
+                       free(var);
+               } else {
+                       err = uc_mgr_get_substituted_value(uc_mgr, &var2, var);
+                       free(var);
+                       if (err >= 0) {
+                               err = uc_mgr_set_variable(uc_mgr, name, var2);
+                               free(var2);
+                       }
+               }
                if (err < 0)
                        goto __err_path;
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.11/src/ucm/ucm_cond.c 
new/alsa-lib-1.2.12/src/ucm/ucm_cond.c
--- old/alsa-lib-1.2.11/src/ucm/ucm_cond.c      2024-01-29 17:16:07.000000000 
+0100
+++ new/alsa-lib-1.2.12/src/ucm/ucm_cond.c      2024-06-10 11:18:34.000000000 
+0200
@@ -274,6 +274,7 @@
 {
        const char *path, *mode = "";
        int err, amode = F_OK;
+       char *s;
 
        if (uc_mgr->conf_format < 4) {
                uc_error("Path condition is supported in v4+ syntax");
@@ -292,27 +293,44 @@
                return -EINVAL;
        }
 
-       if (strncasecmp(mode, "exist", 5) == 0) {
+       if (uc_mgr->conf_format < 7) {
+               s = (char *)mode;
+       } else {
+               err = uc_mgr_get_substituted_value(uc_mgr, &s, mode);
+               if (err < 0)
+                       return err;
+       }
+       if (strncasecmp(s, "exist", 5) == 0) {
                amode = F_OK;
-       } else if (strcasecmp(mode, "read") == 0) {
+       } else if (strcasecmp(s, "read") == 0) {
                amode = R_OK;
-       } else if (strcasecmp(mode, "write") == 0) {
+       } else if (strcasecmp(s, "write") == 0) {
                amode = W_OK;
-       } else if (strcasecmp(mode, "exec") == 0) {
+       } else if (strcasecmp(s, "exec") == 0) {
                amode = X_OK;
        } else {
-               uc_error("Path unknown mode (If.Condition.Mode)");
+               uc_error("Path unknown mode '%s' (If.Condition.Mode)", s);
+               free(s);
                return -EINVAL;
        }
+       if (s != mode)
+               free(s);
 
+       if (uc_mgr->conf_format < 7) {
+               s = (char *)path;
+       } else {
+               err = uc_mgr_get_substituted_value(uc_mgr, &s, path);
+               if (err < 0)
+                       return err;
+       }
 #ifdef HAVE_EACCESS
-       if (eaccess(path, amode))
+       err = eaccess(s, amode);
 #else
-       if (access(path, amode))
+       err = access(s, amode);
 #endif
-               return 0;
-
-       return 1;
+       if (s != path)
+               free(s);
+       return err ? 0 : 1;
 }
 
 static int if_eval(snd_use_case_mgr_t *uc_mgr, snd_config_t *eval)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.11/src/ucm/ucm_confdoc.h 
new/alsa-lib-1.2.12/src/ucm/ucm_confdoc.h
--- old/alsa-lib-1.2.11/src/ucm/ucm_confdoc.h   2024-01-29 17:16:07.000000000 
+0100
+++ new/alsa-lib-1.2.12/src/ucm/ucm_confdoc.h   2024-06-10 11:18:34.000000000 
+0200
@@ -63,7 +63,7 @@
 # Example master file for blah sound card
 # By Joe Blogs <[email protected]>
 
-Syntax 6
+Syntax 7
 
 # Use Case name for user interface
 Comment "Nice Abstracted Soundcard"
@@ -376,7 +376,9 @@
 ------------------:|---------------------|--------------------
 1                  | Define              | No
 2                  | Include             | Yes
-3                  | If                  | Yes
+3                  | Variant             | Yes
+4                  | Macro               | Yes
+5                  | If                  | Yes
 
 
 ### Substitutions
@@ -489,7 +491,8 @@
 The arguments in the macro are refered as the variables with the double
 underscore name prefix (like *__variable*). The configuration block in
 the DefineMacro subtree is always evaluated (including arguments and variables)
-at the time of the instantiation.
+at the time of the instantiation. Argument string substitutions
+(for multiple macro call levels) were added in *Syntax* version *7*.
 
 The macros can be instantiated (expanded) using:
 
@@ -563,6 +566,15 @@
 String               | string
 Regex                | regex expression (extended posix, ignore case)
 
+#### Path is present (Type Path)
+
+Field                | Description
+---------------------|-----------------------
+Path                 | path (filename)
+Mode                 | exist,read,write,exec
+
+Note: Substitution for Path and Mode fields were added in *Syntax* version *7*.
+
 #### ALSA control element exists (Type ControlExists)
 
 Field                | Description
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.11/src/ucm/ucm_local.h 
new/alsa-lib-1.2.12/src/ucm/ucm_local.h
--- old/alsa-lib-1.2.11/src/ucm/ucm_local.h     2024-01-29 17:16:07.000000000 
+0100
+++ new/alsa-lib-1.2.12/src/ucm/ucm_local.h     2024-06-10 11:18:34.000000000 
+0200
@@ -40,7 +40,7 @@
 #include <pthread.h>
 #include "use-case.h"
 
-#define SYNTAX_VERSION_MAX     6
+#define SYNTAX_VERSION_MAX     7
 
 #define MAX_CARD_SHORT_NAME    32
 #define MAX_CARD_LONG_NAME     80
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.11/test/latency.c 
new/alsa-lib-1.2.12/test/latency.c
--- old/alsa-lib-1.2.11/test/latency.c  2024-01-29 17:16:07.000000000 +0100
+++ new/alsa-lib-1.2.12/test/latency.c  2024-06-10 11:18:34.000000000 +0200
@@ -260,11 +260,11 @@
                return -1;
       __set_it:
        if ((err = setparams_bufsize(phandle, p_params, pt_params, *bufsize, 
"playback")) < 0) {
-               printf("Unable to set sw parameters for playback stream: %s\n", 
snd_strerror(err));
+               printf("Unable to set hw parameters for playback stream: %s\n", 
snd_strerror(err));
                exit(0);
        }
        if ((err = setparams_bufsize(chandle, c_params, ct_params, *bufsize, 
"capture")) < 0) {
-               printf("Unable to set sw parameters for playback stream: %s\n", 
snd_strerror(err));
+               printf("Unable to set hw parameters for capture stream: %s\n", 
snd_strerror(err));
                exit(0);
        }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alsa-lib-1.2.11/version new/alsa-lib-1.2.12/version
--- old/alsa-lib-1.2.11/version 2024-01-29 17:18:00.000000000 +0100
+++ new/alsa-lib-1.2.12/version 2024-06-10 11:21:01.000000000 +0200
@@ -1 +1 @@
-1.2.11
+1.2.12

Reply via email to