diff --git a/0016-alsactl-add-missing-state_unlock-call.patch b/0016-alsactl-add-missing-state_unlock-call.patch new file mode 100644 index 0000000..c4703b7 --- /dev/null +++ b/0016-alsactl-add-missing-state_unlock-call.patch @@ -0,0 +1,25 @@ +From 55d41b7fe364b55851a6038285affe9a32b8b701 Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Wed, 24 Dec 2014 20:15:26 +0100 +Subject: [PATCH] alsactl: add missing state_unlock() call + +--- + alsactl/state.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/alsactl/state.c b/alsactl/state.c +index 0c897034057c..3908ec49b823 100644 +--- a/alsactl/state.c ++++ b/alsactl/state.c +@@ -1678,6 +1678,8 @@ int load_state(const char *file, const char *initfile, const char *cardname, + int card, first = 1; + char cardname1[16]; + ++ if (lock_fd >= 0) ++ state_unlock(lock_fd, file); + error("Cannot open %s for reading: %s", file, snd_strerror(err)); + finalerr = err; + if (cardname) { +-- +2.2.2 + diff --git a/0017-alsactl-init-Change-the-basic-rules-description.patch b/0017-alsactl-init-Change-the-basic-rules-description.patch new file mode 100644 index 0000000..94a4f2e --- /dev/null +++ b/0017-alsactl-init-Change-the-basic-rules-description.patch @@ -0,0 +1,30 @@ +From d522b45508a033e1bfcf40769168deb48d5c878c Mon Sep 17 00:00:00 2001 +From: David Henningsson +Date: Mon, 12 Jan 2015 16:48:37 +0100 +Subject: [PATCH] alsactl/init: Change the "basic rules" description + +We now enable more outputs than just the main speaker, so update +the basic rules to reflect the actual situation. + +Signed-off-by: David Henningsson +Signed-off-by: Takashi Iwai +--- + alsactl/init/default | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/alsactl/init/default b/alsactl/init/default +index 5fb01136cdc5..64f933f1f597 100644 +--- a/alsactl/init/default ++++ b/alsactl/init/default +@@ -3,7 +3,7 @@ + # + # Basic rules are: + # - keep volumes at minimal level, but sound should be hearable +-# - enable just main speakers for playback and main microphone for recording ++# - enable standard outputs for playback and main microphone for recording + # + + # ************************************************************************** +-- +2.2.2 + diff --git a/0018-alsactl-init-Add-Line-Out-to-list-of-outputs-to-init.patch b/0018-alsactl-init-Add-Line-Out-to-list-of-outputs-to-init.patch new file mode 100644 index 0000000..794f170 --- /dev/null +++ b/0018-alsactl-init-Add-Line-Out-to-list-of-outputs-to-init.patch @@ -0,0 +1,35 @@ +From e1745a69fecb191b3575e39b1ec731756381fb5c Mon Sep 17 00:00:00 2001 +From: David Henningsson +Date: Mon, 12 Jan 2015 16:48:38 +0100 +Subject: [PATCH] alsactl/init: Add "Line Out" to list of outputs to initialize + +Signed-off-by: David Henningsson +Signed-off-by: Takashi Iwai +--- + alsactl/init/default | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/alsactl/init/default b/alsactl/init/default +index 64f933f1f597..1c84f3e859e7 100644 +--- a/alsactl/init/default ++++ b/alsactl/init/default +@@ -43,6 +43,16 @@ CTL{name}="Master Digital Playback Switch",CTL{do_search}=="1", \ + CTL{values}="on" + + CTL{reset}="mixer" ++CTL{name}="Line Out Playback Volume",PROGRAM!="__ctl_search",GOTO="" ++# if master volume control is present, turn line out volume to max ++ENV{has_pmaster_vol}=="true",CTL{write}=="0dB",GOTO="" ++ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO="" ++CTL{write}!="$env{pvolume}",CTL{values}="$env{ppercent}" ++LABEL="" ++CTL{name}="Line Out Playback Switch",CTL{do_search}=="1", \ ++ CTL{values}="on" ++ ++CTL{reset}="mixer" + CTL{name}="Front Playback Volume",PROGRAM!="__ctl_search",GOTO="" + # if master volume control is present, turn front volume to max + ENV{has_pmaster_vol}=="true",CTL{write}=="0dB",GOTO="" +-- +2.2.2 + diff --git a/0019-configure-allow-contitional-compilation-of-alsaucm.patch b/0019-configure-allow-contitional-compilation-of-alsaucm.patch new file mode 100644 index 0000000..c6b18e1 --- /dev/null +++ b/0019-configure-allow-contitional-compilation-of-alsaucm.patch @@ -0,0 +1,61 @@ +From 554706585c6d020e5cbb10be1ccb66164eed2c2f Mon Sep 17 00:00:00 2001 +From: Matthieu Crapet +Date: Wed, 14 Jan 2015 15:44:19 +0100 +Subject: [PATCH] configure: allow contitional compilation of alsaucm + +If alsa-lib have been compiled with --disable-ucm, alsaucm can't be built. +Detection is dynamic, no configure command line option is available for now. + +Signed-off-by: Matthieu Crapet +Signed-off-by: Takashi Iwai +--- + Makefile.am | 5 ++++- + configure.ac | 3 +++ + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 248eb11cb53a..5bbe588a8d84 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,6 +1,6 @@ + AM_CPPFLAGS=-I$(top_srcdir)/include + +-SUBDIRS = include alsactl alsaucm utils m4 po alsa-info ++SUBDIRS = include alsactl utils m4 po alsa-info + if ALSAMIXER + SUBDIRS += alsamixer + endif +@@ -22,6 +22,9 @@ endif + if HAVE_SEQ + SUBDIRS += seq + endif ++if HAVE_UCM ++SUBDIRS += alsaucm ++endif + + EXTRA_DIST= TODO gitcompile + AUTOMAKE_OPTIONS=foreign +diff --git a/configure.ac b/configure.ac +index 3c7032b0d346..d953e5ccb73c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -48,6 +48,8 @@ AC_CHECK_HEADERS([alsa/rawmidi.h], [have_rawmidi="yes"], [have_rawmidi="no"], + [#include ]) + AC_CHECK_HEADERS([alsa/seq.h], [have_seq="yes"], [have_seq="no"], + [#include ]) ++AC_CHECK_HEADERS([alsa/use-case.h], [have_ucm="yes"], [have_ucm="no"], ++ [#include ]) + AC_CHECK_HEADERS([samplerate.h], [have_samplerate="yes"], [have_samplerate="no"], + [#include ]) + +@@ -55,6 +57,7 @@ AM_CONDITIONAL(HAVE_PCM, test "$have_pcm" = "yes") + AM_CONDITIONAL(HAVE_MIXER, test "$have_mixer" = "yes") + AM_CONDITIONAL(HAVE_RAWMIDI, test "$have_rawmidi" = "yes") + AM_CONDITIONAL(HAVE_SEQ, test "$have_seq" = "yes") ++AM_CONDITIONAL(HAVE_UCM, test "$have_ucm" = "yes") + AM_CONDITIONAL(HAVE_SAMPLERATE, test "$have_samplerate" = "yes") + + dnl Check for librt +-- +2.2.2 + diff --git a/alsa-utils.changes b/alsa-utils.changes index 079bfeb..78aec09 100644 --- a/alsa-utils.changes +++ b/alsa-utils.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Mon Jan 26 15:52:24 CET 2015 - tiwai@suse.de + +- Backport upstream fixes: fix missing unlock for the error path + in alsactl, more alsactl init entries, alsaucm build fix + 0016-alsactl-add-missing-state_unlock-call.patch + 0017-alsactl-init-Change-the-basic-rules-description.patch + 0018-alsactl-init-Add-Line-Out-to-list-of-outputs-to-init.patch + 0019-configure-allow-contitional-compilation-of-alsaucm.patch + ------------------------------------------------------------------- Fri Dec 5 16:54:03 CET 2014 - tiwai@suse.de diff --git a/alsa-utils.spec b/alsa-utils.spec index a35bb74..5cfd3cb 100644 --- a/alsa-utils.spec +++ b/alsa-utils.spec @@ -1,7 +1,7 @@ # # spec file for package alsa-utils # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -60,6 +60,10 @@ Patch12: 0012-alsactl-coverity-missing_va_end-va_end-was-not-calle.patch Patch13: 0013-Revert-aplay-fix-pcm_read-return-value.patch Patch14: 0014-amixer-Make-dB-case-insensitive-in-set-commands.patch Patch15: 0015-amixer-Parse-the-value-more-strictly.patch +Patch16: 0016-alsactl-add-missing-state_unlock-call.patch +Patch17: 0017-alsactl-init-Change-the-basic-rules-description.patch +Patch18: 0018-alsactl-init-Add-Line-Out-to-list-of-outputs-to-init.patch +Patch19: 0019-configure-allow-contitional-compilation-of-alsaucm.patch # Patch99: alsa-utils-gettext-version-removal.diff BuildRequires: alsa-devel @@ -102,6 +106,10 @@ sed -i -e's/EXTRA_DIST= config.rpath /EXTRA_DIST=/' Makefile.am %patch13 -p1 %patch14 -p1 %patch15 -p1 +%patch16 -p1 +%patch17 -p1 +%patch18 -p1 +%patch19 -p1 # %if 0%{?suse_version} < 1020 %patch99 -p1