From d177d844c615cbf346459e1c30c87940136720c57bba18d12e1a0abffd936bf0 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 27 May 2013 13:40:57 +0000 Subject: [PATCH] Accepting request 176753 from home:tiwai:branches:multimedia:libs - Backport upstream fixes: 0002-alsactl-init-ca0106-file-was-omitted.patch 0003-alsactl-return-back-the-udevrules_DATA-rule-for-90-a.patch - Add missing ca0106 alsactl init file - Revert the udev file drop in the previous commit OBS-URL: https://build.opensuse.org/request/show/176753 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa-utils?expand=0&rev=81 --- ...alsactl-init-ca0106-file-was-omitted.patch | 36 +++++++++++++++++++ ...ack-the-udevrules_DATA-rule-for-90-a.patch | 28 +++++++++++++++ alsa-utils.changes | 9 +++++ alsa-utils.spec | 17 +++++++++ ca0106 | 31 ++++++++++++++++ 5 files changed, 121 insertions(+) create mode 100644 0002-alsactl-init-ca0106-file-was-omitted.patch create mode 100644 0003-alsactl-return-back-the-udevrules_DATA-rule-for-90-a.patch create mode 100644 ca0106 diff --git a/0002-alsactl-init-ca0106-file-was-omitted.patch b/0002-alsactl-init-ca0106-file-was-omitted.patch new file mode 100644 index 0000000..2e02d8b --- /dev/null +++ b/0002-alsactl-init-ca0106-file-was-omitted.patch @@ -0,0 +1,36 @@ +From 121df3694970d7eded56432c9baa24b8ccd122b1 Mon Sep 17 00:00:00 2001 +From: "Gabriel M. Beddingfield" +Date: Sun, 26 May 2013 15:54:44 -0700 +Subject: [PATCH] alsactl init: ca0106 file was omitted + +The file alsactl/init/00main includes the line: + +CARDINFO{driver}=="CA0106", INCLUDE="ca0106", GOTO="init_end" + +However, the file alsactl/init/ca0106 is not making it into the +release tarballs (nor to user installations). + +This patch adds the ca0106 file to the build. + +Signed-off-by: Gabriel M. Beddingfield +Signed-off-by: Takashi Iwai +--- + alsactl/init/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/alsactl/init/Makefile.am b/alsactl/init/Makefile.am +index 9e2b83d..64dac41 100644 +--- a/alsactl/init/Makefile.am ++++ b/alsactl/init/Makefile.am +@@ -1,7 +1,7 @@ + + init_files = \ + 00main default help info test \ +- hda ++ hda ca0106 + EXTRA_DIST = $(init_files) + alsainitdir = $(datadir)/alsa/init + alsainit_DATA = $(init_files) +-- +1.8.2.3 + diff --git a/0003-alsactl-return-back-the-udevrules_DATA-rule-for-90-a.patch b/0003-alsactl-return-back-the-udevrules_DATA-rule-for-90-a.patch new file mode 100644 index 0000000..b023352 --- /dev/null +++ b/0003-alsactl-return-back-the-udevrules_DATA-rule-for-90-a.patch @@ -0,0 +1,28 @@ +From c0f70a0b8e340d6ee903ff226886bb6f969d46a1 Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Mon, 27 May 2013 09:26:39 +0200 +Subject: [PATCH] alsactl: return back the udevrules_DATA rule for + 90-alsa-restore.rules + +Signed-off-by: Jaroslav Kysela +--- + alsactl/Makefile.am | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am +index c0df981..bac84eb 100644 +--- a/alsactl/Makefile.am ++++ b/alsactl/Makefile.am +@@ -11,6 +11,9 @@ alsactl_SOURCES=alsactl.c state.c lock.c utils.c init_parse.c daemon.c + alsactl_CFLAGS=$(AM_CFLAGS) -D__USE_GNU -DSYS_ASOUNDRC=\"$(ASOUND_STATE_DIR)/asound.state\" -DSYS_PIDFILE=\"$(ALSACTL_PIDFILE_DIR)/alsactl.pid\" + noinst_HEADERS=alsactl.h list.h init_sysdeps.c init_utils_string.c init_utils_run.c init_sysfs.c + ++udevrules_DATA = \ ++ 90-alsa-restore.rules ++ + if HAVE_SYSTEMD + + systemdsystemunit_DATA = \ +-- +1.8.2.3 + diff --git a/alsa-utils.changes b/alsa-utils.changes index 3bb9c59..76fc4d0 100644 --- a/alsa-utils.changes +++ b/alsa-utils.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon May 27 09:42:39 CEST 2013 - tiwai@suse.de + +- Backport upstream fixes: + 0002-alsactl-init-ca0106-file-was-omitted.patch + 0003-alsactl-return-back-the-udevrules_DATA-rule-for-90-a.patch +- Add missing ca0106 alsactl init file +- Revert the udev file drop in the previous commit + ------------------------------------------------------------------- Thu May 23 15:44:23 CEST 2013 - tiwai@suse.de diff --git a/alsa-utils.spec b/alsa-utils.spec index 7fecb05..ef372ff 100644 --- a/alsa-utils.spec +++ b/alsa-utils.spec @@ -28,11 +28,19 @@ BuildRequires: systemd %define use_systemd 0 %define use_varlib 0 %endif +%if %suse_version > 1200 +%define _udevdir %(pkg-config --variable=udevdir udev) +%else +%define _udevdir /lib/udev +%endif Name: alsa-utils BuildRequires: alsa-devel BuildRequires: automake BuildRequires: libsamplerate-devel +%if %suse_version > 1200 +BuildRequires: libudev-devel +%endif BuildRequires: ncurses-devel BuildRequires: pkgconfig BuildRequires: xmlto @@ -48,9 +56,13 @@ Version: 1.0.27.1 Release: 0 Source: ftp://ftp.alsa-project.org/pub/utils/alsa-utils-%{package_version}.tar.bz2 Source1: 01beep.conf +# missing in 1.0.27.1 tarball +Source99: ca0106 # Patch: alsa-utils-git-fixes.diff # upstream fix patches Patch1: 0001-Require-alsa-lib-1.0.27.patch +Patch2: 0002-alsactl-init-ca0106-file-was-omitted.patch +Patch3: 0003-alsactl-return-back-the-udevrules_DATA-rule-for-90-a.patch # Patch99: alsa-utils-gettext-version-removal.diff Url: http://www.alsa-project.org/ @@ -67,6 +79,9 @@ sed -i -e's/EXTRA_DIST= config.rpath /EXTRA_DIST=/' Makefile.am # rm -f po/Makefile* po/*.gmo po/*.pot po/*.header po/stamp-* # patch -p1 %patch1 -p1 +%patch2 -p1 +%patch3 -p1 +cp %{S:99} alsactl/init # %if %suse_version < 1020 %patch99 -p1 @@ -88,6 +103,7 @@ opts="$opts --with-asound-state-dir=/etc" %if %suse_version < 1030 opts="$opts --disable-xmlto" %endif +opts="$opts --with-udev-rules-dir=%{_udevdir}/rules.d" %configure --with-curses=ncursesw $opts make %{?_smp_mflags} @@ -117,6 +133,7 @@ mkdir -p $RPM_BUILD_ROOT/var/lib/alsa %{_sbindir}/* %{_datadir}/sounds/alsa %{_datadir}/alsa +%{_udevdir} %if %use_systemd %{_unitdir}/*.service %{_unitdir}/basic.target.wants/alsa-state.service diff --git a/ca0106 b/ca0106 new file mode 100644 index 0000000..cdad778 --- /dev/null +++ b/ca0106 @@ -0,0 +1,31 @@ +# Configuration for CA0106 driver + +CTL{reset}="mixer" +CTL{name}="Master Playback Volume", CTL{value}="-20dB" +CTL{name}="Master Playback Switch", CTL{value}="on" +CTL{name}="Analog Front Playback Volume", CTL{value}="0dB" +CTL{name}="Analog Front Playback Switch", CTL{value}="on" +CTL{name}="Analog Rear Playback Volume", CTL{value}="0dB" +CTL{name}="Analog Rear Playback Switch", CTL{value}="on" +CTL{name}="Analog Center/LFE Playback Volume", CTL{value}="0dB" +CTL{name}="Analog Center/LFE Playback Switch", CTL{value}="on" +CTL{name}="Analog Side Playback Volume", CTL{value}="0dB" +CTL{name}="Analog Side Playback Switch", CTL{value}="on" +CTL{name}="IEC958 Front Playback Volume", CTL{value}="0dB" +CTL{name}="IEC958 Rear Playback Volume", CTL{value}="0dB" +CTL{name}="IEC958 Center/LFE Playback Volume", CTL{value}="0dB" +# capture +CTL{name}="Analog Source Capture Enum", CTL{value}="Mic" +CTL{name}="Mic Capture Volume", CTL{value}="6dB" +CTL{name}="Shared Mic/Line in Capture Switch", CTL{value}="Mic in" + +# some variants have also AC97 mixer + +CTL{reset}="mixer" +CTL{name}="AC97 Line Capture Volume",PROGRAM!="__ctl_search",GOTO="ac97_end" +CTL{name}="Analog Source Capture Enum", CTL{value}="AC97 in" +CTL{name}="AC97 Mic Capture Switch", "on" +CTL{name}="AC97 Mic Capture Value", "6dB" +LABEL="ac97_end" + +RESULT="true", EXIT="return"