Hello community, here is the log from the commit of package alsa for openSUSE:Factory checked in at 2013-03-12 11:01:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/alsa (Old) and /work/SRC/openSUSE:Factory/.alsa.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "alsa", Maintainer is "ti...@suse.com" Changes: -------- --- /work/SRC/openSUSE:Factory/alsa/alsa.changes 2013-02-04 17:56:15.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.alsa.new/alsa.changes 2013-03-12 11:01:22.000000000 +0100 @@ -1,0 +2,9 @@ +Mon Mar 11 11:08:30 CET 2013 - ti...@suse.de + +- More backports of fix patches from upstream: + 0051-Add-sys-types.h-to-include-list.patch + 0052-control-Simplify-using-snd_config_get_bool.patch + 0053-Add-workaround-for-conflicting-IEC958-controls-for-H.patch + 0054-snd_mixer_poll_descriptors_revents-should-loop-over-.patch + +------------------------------------------------------------------- New: ---- 0051-Add-sys-types.h-to-include-list.patch 0052-control-Simplify-using-snd_config_get_bool.patch 0053-Add-workaround-for-conflicting-IEC958-controls-for-H.patch 0054-snd_mixer_poll_descriptors_revents-should-loop-over-.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ alsa.spec ++++++ --- /var/tmp/diff_new_pack.1odTPH/_old 2013-03-12 11:03:07.000000000 +0100 +++ /var/tmp/diff_new_pack.1odTPH/_new 2013-03-12 11:03:07.000000000 +0100 @@ -102,6 +102,10 @@ Patch48: 0048-snd_device_name_hint-do-not-change-the-global-error-.patch Patch49: 0049-snd_device_name_hint-do-not-use-global-snd_config.patch Patch50: 0050-conf-Fix-a-memory-access-violation-resulting-from-im.patch +Patch51: 0051-Add-sys-types.h-to-include-list.patch +Patch52: 0052-control-Simplify-using-snd_config_get_bool.patch +Patch53: 0053-Add-workaround-for-conflicting-IEC958-controls-for-H.patch +Patch54: 0054-snd_mixer_poll_descriptors_revents-should-loop-over-.patch # Patch99: alsa-lib-doxygen-avoid-crash-for-11.3.diff Url: http://www.alsa-project.org/ @@ -202,6 +206,10 @@ %patch48 -p1 %patch49 -p1 %patch50 -p1 +%patch51 -p1 +%patch52 -p1 +%patch53 -p1 +%patch54 -p1 %if %suse_version == 1130 %patch99 -p1 %endif ++++++ 0051-Add-sys-types.h-to-include-list.patch ++++++ >From 3e7dc283ed2d3ed2341f0657811c588f4dbcba6d Mon Sep 17 00:00:00 2001 From: David Henningsson <david.hennings...@canonical.com> Date: Tue, 12 Feb 2013 10:06:11 +0100 Subject: [PATCH 51/54] Add sys/types.h to include list This is needed by snd_pcm_format_silence* functions which return u_int*_t. It was discovered while trying to compile ALSA programs with eglibc 2.17. Credits to Richard Shaw, Gary Buhrmaster, Matthieu Baerts and Adam Conrad for this fix. BugLink: https://bugs.launchpad.net/bugs/1109298 BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=885306 Signed-off-by: David Henningsson <david.hennings...@canonical.com> Signed-off-by: Takashi Iwai <ti...@suse.de> --- include/asoundlib-head.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/asoundlib-head.h b/include/asoundlib-head.h index 20c8a68..6edbab0 100644 --- a/include/asoundlib-head.h +++ b/include/asoundlib-head.h @@ -31,6 +31,7 @@ #include <unistd.h> #include <stdio.h> #include <stdlib.h> +#include <sys/types.h> #include <string.h> #include <fcntl.h> #include <assert.h> -- 1.8.1.4 ++++++ 0052-control-Simplify-using-snd_config_get_bool.patch ++++++ >From 8c6da54073b2c966d9a4e137ba4d521eac92816f Mon Sep 17 00:00:00 2001 From: Takashi Iwai <ti...@suse.de> Date: Fri, 12 Oct 2012 12:22:53 +0200 Subject: [PATCH 52/54] control: Simplify using snd_config_get_bool() snd_config_get_bool() was improved to parse also ASCII strings now, so we don't have to open-code the boolean parser in src/control/setup.c any longer. Signed-off-by: Takashi Iwai <ti...@suse.de> --- src/control/setup.c | 37 ++++++------------------------------- 1 file changed, 6 insertions(+), 31 deletions(-) diff --git a/src/control/setup.c b/src/control/setup.c index eecda45..bd3599d 100644 --- a/src/control/setup.c +++ b/src/control/setup.c @@ -400,7 +400,6 @@ static int add_elem(snd_sctl_t *h, snd_config_t *_conf, snd_config_t *private_da { snd_config_t *conf; snd_config_iterator_t i, next; - char *tmp; int iface = SND_CTL_ELEM_IFACE_MIXER; const char *name = NULL; long index = 0; @@ -464,33 +463,17 @@ static int add_elem(snd_sctl_t *h, snd_config_t *_conf, snd_config_t *private_da continue; } if (strcmp(id, "lock") == 0) { - if ((err = snd_config_get_ascii(n, &tmp)) < 0) { - SNDERR("field %s has an invalid type", id); - goto _err; - } - err = snd_config_get_bool_ascii(tmp); - if (err < 0) { - SNDERR("field %s is not a boolean", id); - free(tmp); + err = snd_config_get_bool(n); + if (err < 0) goto _err; - } lock = err; - free(tmp); continue; } if (strcmp(id, "preserve") == 0) { - if ((err = snd_config_get_ascii(n, &tmp)) < 0) { - SNDERR("field %s has an invalid type", id); - goto _err; - } - err = snd_config_get_bool_ascii(tmp); - if (err < 0) { - SNDERR("field %s is not a boolean", id); - free(tmp); + err = snd_config_get_bool(n); + if (err < 0) goto _err; - } preserve = err; - free(tmp); continue; } if (strcmp(id, "value") == 0) { @@ -502,18 +485,10 @@ static int add_elem(snd_sctl_t *h, snd_config_t *_conf, snd_config_t *private_da continue; } if (strcmp(id, "optional") == 0) { - if ((err = snd_config_get_ascii(n, &tmp)) < 0) { - SNDERR("field %s has an invalid type", id); - goto _err; - } - err = snd_config_get_bool_ascii(tmp); - if (err < 0) { - SNDERR("field %s is not a boolean", id); - free(tmp); + err = snd_config_get_bool(n); + if (err < 0) goto _err; - } optional = err; - free(tmp); continue; } SNDERR("Unknown field %s", id); -- 1.8.1.4 ++++++ 0053-Add-workaround-for-conflicting-IEC958-controls-for-H.patch ++++++ >From f5f45589f81c46d4ca4cbbe089441a0f7ac5e197 Mon Sep 17 00:00:00 2001 From: Takashi Iwai <ti...@suse.de> Date: Mon, 11 Feb 2013 12:28:45 +0100 Subject: [PATCH 53/54] Add workaround for conflicting IEC958 controls for HD-audio When both an SPDIF and an HDMI output are present on HD-audio, both try to access IEC958 controls with index=0 although one of them must be wrong. For avoiding this conflict, the recent kernel code (3.9 and 3.8 stable) moves the IEC958 controls of an SPDIF with index=16 once when the conflict happens. In this patch, the corresponding support is added in alsa-lib side. The new "skip_rest" boolean flag is added to the hooked element definition which indicates that the rest of element array will be ignored once when this element is present and evaluated. With this new flag, the HD-audio config takes index=16 primarily, then take index=0 as fallback. Signed-off-by: Takashi Iwai <ti...@suse.de> --- src/conf/cards/HDA-Intel.conf | 16 ++++++++++++++++ src/control/setup.c | 19 ++++++++++++++++--- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/src/conf/cards/HDA-Intel.conf b/src/conf/cards/HDA-Intel.conf index d4f2667..3957c12 100644 --- a/src/conf/cards/HDA-Intel.conf +++ b/src/conf/cards/HDA-Intel.conf @@ -113,6 +113,22 @@ HDA-Intel.pcm.iec958.0 { hook_args [ { name "IEC958 Playback Default" + index 16 + optional true + lock true + preserve true + value [ $AES0 $AES1 $AES2 $AES3 ] + } + { + name "IEC958 Playback Switch" + index 16 + optional true + value true + # if this element is present, skip the rest + skip_rest true + } + { + name "IEC958 Playback Default" lock true preserve true value [ $AES0 $AES1 $AES2 $AES3 ] diff --git a/src/control/setup.c b/src/control/setup.c index bd3599d..f23bf2c 100644 --- a/src/control/setup.c +++ b/src/control/setup.c @@ -396,7 +396,7 @@ static int snd_config_get_ctl_elem_value(snd_config_t *conf, return 0; } -static int add_elem(snd_sctl_t *h, snd_config_t *_conf, snd_config_t *private_data) +static int add_elem(snd_sctl_t *h, snd_config_t *_conf, snd_config_t *private_data, int *quit) { snd_config_t *conf; snd_config_iterator_t i, next; @@ -408,6 +408,7 @@ static int add_elem(snd_sctl_t *h, snd_config_t *_conf, snd_config_t *private_da int lock = 0; int preserve = 0; int optional = 0; + int skip_rest = 0; snd_config_t *value = NULL, *mask = NULL; snd_sctl_elem_t *elem = NULL; int err; @@ -491,6 +492,13 @@ static int add_elem(snd_sctl_t *h, snd_config_t *_conf, snd_config_t *private_da optional = err; continue; } + if (strcmp(id, "skip_rest") == 0) { + err = snd_config_get_bool(n); + if (err < 0) + goto _err; + skip_rest = err; + continue; + } SNDERR("Unknown field %s", id); return -EINVAL; } @@ -539,6 +547,9 @@ static int add_elem(snd_sctl_t *h, snd_config_t *_conf, snd_config_t *private_da if (! optional) SNDERR("Cannot obtain info for CTL elem (%s,'%s',%li,%li,%li): %s", snd_ctl_elem_iface_name(iface), name, index, device, subdevice, snd_strerror(err)); goto _err; + } else { + if (skip_rest) + *quit = 1; } snd_ctl_elem_value_set_id(elem->val, elem->id); snd_ctl_elem_value_set_id(elem->old, elem->id); @@ -594,7 +605,7 @@ int snd_sctl_build(snd_sctl_t **sctl, snd_ctl_t *handle, snd_config_t *conf, snd { snd_sctl_t *h; snd_config_iterator_t i, next; - int err; + int err, quit = 0; assert(sctl); assert(handle); @@ -614,11 +625,13 @@ int snd_sctl_build(snd_sctl_t **sctl, snd_ctl_t *handle, snd_config_t *conf, snd INIT_LIST_HEAD(&h->elems); snd_config_for_each(i, next, conf) { snd_config_t *n = snd_config_iterator_entry(i); - err = add_elem(h, n, private_data); + err = add_elem(h, n, private_data, &quit); if (err < 0) { free_elems(h); return err; } + if (quit) + break; } *sctl = h; return 0; -- 1.8.1.4 ++++++ 0054-snd_mixer_poll_descriptors_revents-should-loop-over-.patch ++++++ >From 28493d9d693b1387ed38a849b2d256b34baba2b4 Mon Sep 17 00:00:00 2001 From: Sander Jansen <s.jan...@gmail.com> Date: Mon, 25 Feb 2013 10:41:40 -0600 Subject: [PATCH 54/54] snd_mixer_poll_descriptors_revents should loop over pollfd Signed-off-by: Sander Jansen <s.jan...@gmail.com> Signed-off-by: Takashi Iwai <ti...@suse.de> --- src/mixer/mixer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mixer/mixer.c b/src/mixer/mixer.c index 85d843f..8deceac 100644 --- a/src/mixer/mixer.c +++ b/src/mixer/mixer.c @@ -743,7 +743,7 @@ int snd_mixer_poll_descriptors_revents(snd_mixer_t *mixer, struct pollfd *pfds, if (nfds == 0) return -EINVAL; res = 0; - for (idx = 0; idx < nfds; idx++) + for (idx = 0; idx < nfds; idx++, pfds++) res |= pfds->revents & (POLLIN|POLLERR|POLLNVAL); *revents = res; return 0; -- 1.8.1.4 -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org