add upstream patch to fix HDMI support broken on older hardware [release 1.2.7-2mamba;Sat Jun 11 2022]
This commit is contained in:
parent
a97ea3cf9c
commit
169a2fb309
55
libalsa-1.2.7-upstream-fix-eld-decoding-older-hardware.patch
Normal file
55
libalsa-1.2.7-upstream-fix-eld-decoding-older-hardware.patch
Normal file
@ -0,0 +1,55 @@
|
||||
From 89ee61914756a6f8bcafbad7fb1eca674b0a012f Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Mon, 6 Jun 2022 12:11:24 +0200
|
||||
Subject: [PATCH] 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 <bero@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 <perex@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 1e161eb1..9be9605f 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;
|
||||
}
|
11
libalsa.spec
11
libalsa.spec
@ -1,5 +1,5 @@
|
||||
Name: libalsa
|
||||
Version: 1.2.6.1
|
||||
Version: 1.2.7
|
||||
Release: 2mamba
|
||||
Summary: Library for the Advanced Linux Sound Architecture (ALSA)
|
||||
Group: System/Kernel and Hardware
|
||||
@ -15,6 +15,7 @@ Patch0: %{name}-1.0.23-thread_safe_locale.patch
|
||||
Patch1: %{name}-1.0.25-hctl_remove_a_useless_assert.patch
|
||||
Patch2: libalsa-1.0.27-use-__inline__-for-exported-headers.patch
|
||||
Patch3: libalsa-1.1.7-audacity-2.3.0.patch
|
||||
Patch4: libalsa-1.2.7-upstream-fix-eld-decoding-older-hardware.patch
|
||||
License: GPL
|
||||
## AUTOBUILDREQ-BEGIN
|
||||
BuildRequires: glibc-devel
|
||||
@ -53,6 +54,8 @@ This is the development package for the libraries.
|
||||
|
||||
%prep
|
||||
%setup -q -n alsa-lib-%{version}
|
||||
%patch4 -p1 -b .upstream-fix-eld-decoding-older-hardware
|
||||
|
||||
autoreconf -f -i
|
||||
|
||||
%build
|
||||
@ -116,6 +119,12 @@ cp -a lib32/%{_prefix}/lib %{buildroot}%{_prefix}/
|
||||
%doc ChangeLog MEMORY-LEAK NOTES TODO
|
||||
|
||||
%changelog
|
||||
* Sat Jun 11 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 1.2.7-2mamba
|
||||
- add upstream patch to fix HDMI support broken on older hardware
|
||||
|
||||
* Thu Jun 02 2022 Automatic Build System <autodist@mambasoft.it> 1.2.7-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Sat Apr 02 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 1.2.6.1-2mamba
|
||||
- require alsa-ucm-conf
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user