Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package alsa for openSUSE:Factory checked in 
at 2022-06-07 11:44:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/alsa (Old)
 and      /work/SRC/openSUSE:Factory/.alsa.new.1548 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "alsa"

Tue Jun  7 11:44:56 2022 rev:215 rq:980994 version:1.2.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/alsa/alsa.changes        2022-06-03 
14:15:18.609210747 +0200
+++ /work/SRC/openSUSE:Factory/.alsa.new.1548/alsa.changes      2022-06-07 
11:45:02.899223704 +0200
@@ -1,0 +2,7 @@
+Mon Jun  6 10:56:29 UTC 2022 - Takashi Iwai <ti...@suse.com>
+
+- Backport upstream fixes for 32bit inode and ELD parsing:
+  0001-conf-Use-ino64_t-to-save-and-compare-inode-numbers.patch
+  0002-control-eld-fix-the-decoding-for-older-hw.patch
+
+-------------------------------------------------------------------

New:
----
  0001-conf-Use-ino64_t-to-save-and-compare-inode-numbers.patch
  0002-control-eld-fix-the-decoding-for-older-hw.patch

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

Other differences:
------------------
++++++ alsa.spec ++++++
--- /var/tmp/diff_new_pack.uA9dBV/_old  2022-06-07 11:45:04.255225553 +0200
+++ /var/tmp/diff_new_pack.uA9dBV/_new  2022-06-07 11:45:04.263225564 +0200
@@ -53,6 +53,8 @@
 Source31:       all_notes_off.bin
 Source32:       all_notes_off.mid
 Source34:       alsa-init.sh
+Patch1:         0001-conf-Use-ino64_t-to-save-and-compare-inode-numbers.patch
+Patch2:         0002-control-eld-fix-the-decoding-for-older-hw.patch
 # rest suse fixes
 Patch101:       alsa-lib-ignore-non-accessible-ALSA_CONFIG_PATH.patch
 BuildRequires:  doxygen
@@ -141,6 +143,8 @@
 
 %prep
 %setup -q -n alsa-lib-%{version}
+%patch1 -p1
+%patch2 -p1
 %patch101 -p1
 
 %build

++++++ 0001-conf-Use-ino64_t-to-save-and-compare-inode-numbers.patch ++++++
>From 87ff5318e327eb2343f10bd73dce5a32f12db622 Mon Sep 17 00:00:00 2001
From: Simon McVittie <s...@collabora.com>
Date: Wed, 25 May 2022 12:33:42 +0100
Subject: [PATCH 1/2] conf: Use ino64_t to save and compare inode numbers

On 32-bit platforms when not using the large-file-support ABI,
struct stat64 contains ino64_t which is 64-bit, while ino_t is only
32-bit.

snd_config_update_r() checks whether a file has been replaced by saving
the ino member of a struct stat64 and comparing it with a previously-saved
inode number. On 32-bit platforms, assigning the 64-bit member of struct
stat64 to a 32-bit member of struct finfo will truncate it modulo 1<<32,
which could conceivably result in libasound not reloading configuration
when it should (although the inode number space is large enough to make
this failure mode highly unlikely).

Fixes: https://github.com/alsa-project/alsa-lib/pull/231
Signed-off-by: Simon McVittie <s...@collabora.com>
Signed-off-by: Jaroslav Kysela <pe...@perex.cz>
---
 include/local.h | 1 +
 src/conf.c      | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/local.h b/include/local.h
index 51fa4063afa7..268a9ff1200e 100644
--- a/include/local.h
+++ b/include/local.h
@@ -84,6 +84,7 @@
 #define scandir64 scandir
 #define versionsort64 versionsort
 #define alphasort64 alphasort
+#define ino64_t ino_t
 #endif
 
 #define _snd_config_iterator list_head
diff --git a/src/conf.c b/src/conf.c
index 3d2b4a5bc184..a996e5f9f9be 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -3921,7 +3921,7 @@ snd_config_t *snd_config = NULL;
 struct finfo {
        char *name;
        dev_t dev;
-       ino_t ino;
+       ino64_t ino;
        time_t mtime;
 };
 
-- 
2.35.3


++++++ 0002-control-eld-fix-the-decoding-for-older-hw.patch ++++++
>From 89ee61914756a6f8bcafbad7fb1eca674b0a012f Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <pe...@perex.cz>
Date: Mon, 6 Jun 2022 12:11:24 +0200
Subject: [PATCH 2/2] control: eld - fix the decoding for older hw
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

It seems that the monitor name is not always present in the
ELD structure. Add asterisk suffix to notify user about
the monitor present for this case.

Thanks goes to Bernhard Rosenkr??nzer <b...@lindev.ch> for the report.

Fixes: https://github.com/alsa-project/alsa-lib/pull/233
Fixes: https://github.com/alsa-project/alsa-lib/pull/234
Signed-off-by: Jaroslav Kysela <pe...@perex.cz>
---
 src/control/eld.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/src/control/eld.c b/src/control/eld.c
index 1e161eb1d271..9be9605fd091 100644
--- a/src/control/eld.c
+++ b/src/control/eld.c
@@ -74,8 +74,13 @@ int __snd_pcm_info_eld_fixup(snd_pcm_info_t * info)
        if (cinfo.count < 20 || cinfo.count > 256)
                return -EIO;
        l = eld[4] & 0x1f;
-       if (l == 0 || l > 16 || 20 + l > cinfo.count)
-               return -EIO;
+       if (l == 0)
+               /* no monitor name detected */
+               goto __present;
+       if (l > 16 || 20 + l > cinfo.count) {
+               SNDERR("ELD decode failed, using old HDMI output names\n");
+               return 0;
+       }
        s = alloca(l + 1);
        s[l] = '\0';
        /* sanitize */
@@ -90,7 +95,12 @@ int __snd_pcm_info_eld_fixup(snd_pcm_info_t * info)
                        s[l] = c;
                }
        }
-       if (valid > 3)
+       if (valid > 3) {
                snd_strlcpy((char *)info->name, s, sizeof(info->name));
+       } else {
+__present:
+               strncat((char *)info->name, " *", sizeof(info->name) - 1);
+               ((char *)info->name)[sizeof(info->name)-1] = '\0';
+       }
        return 0;
 }
-- 
2.35.3

Reply via email to