- Fix header inclusions for implicit dependnecies (bsc#1233682)
0002-configure-Make-sequencer-dependent-on-rawmidi.patch 0003-seq-include-UMP-headers.patch OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=335
This commit is contained in:
commit
5e408a848a
25
.gitattributes
vendored
Normal file
25
.gitattributes
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
## Specific LFS patterns
|
||||
test.wav filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
42
0001-src-Versions.in.in-Update-_tempo_base-name.patch
Normal file
42
0001-src-Versions.in.in-Update-_tempo_base-name.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From 76edab4e595bd5f3f4c636cccc8d7976d3c519d6 Mon Sep 17 00:00:00 2001
|
||||
From: Nicholas Vinson <nvinson234@gmail.com>
|
||||
Date: Thu, 14 Nov 2024 07:49:53 -0500
|
||||
Subject: [PATCH] src/Versions.in.in: Update *_tempo_base name
|
||||
|
||||
Change @SYMBOL_PREFIX@snd_has_tempo_base to
|
||||
@SYMBOL_PREFIX@snd_has_queue_tempo_base.
|
||||
|
||||
Starting with version 1.2.13, alsa-lib fails to link with ld.lld-19 due
|
||||
to "version script assignment of 'ALSA_1.2.13' to symbol
|
||||
'snd_seq_has_tempo_base' failed: symbol not defined".
|
||||
|
||||
Per commit 769d1db1b0a213a39c7e59c0d1d724e7f45b1ac3 the correct name for
|
||||
the symbol is @SYMBOL_PREFIX@snd_has_queue_tempo_base; therefore, update
|
||||
src/Vesions.in.in to match.
|
||||
|
||||
Fixes bug #420
|
||||
Fixes Gentoo bug 943399 (https://bugs.gentoo.org/943399)
|
||||
|
||||
Closes: https://github.com/alsa-project/alsa-lib/pull/421
|
||||
Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
src/Versions.in.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/Versions.in.in b/src/Versions.in.in
|
||||
index 350ec3d86ad6..7ad6a6333f83 100644
|
||||
--- a/src/Versions.in.in
|
||||
+++ b/src/Versions.in.in
|
||||
@@ -212,7 +212,7 @@ ALSA_1.2.13 {
|
||||
@SYMBOL_PREFIX@snd_seq_create_ump_block;
|
||||
@SYMBOL_PREFIX@snd_seq_queue_tempo_get_tempo_base;
|
||||
@SYMBOL_PREFIX@snd_seq_queue_tempo_set_tempo_base;
|
||||
- @SYMBOL_PREFIX@snd_seq_has_tempo_base;
|
||||
+ @SYMBOL_PREFIX@snd_seq_has_queue_tempo_base;
|
||||
@SYMBOL_PREFIX@snd_seq_port_info_get_ump_is_midi1;
|
||||
@SYMBOL_PREFIX@snd_seq_port_info_set_ump_is_midi1;
|
||||
#endif
|
||||
--
|
||||
2.43.0
|
||||
|
34
0002-configure-Make-sequencer-dependent-on-rawmidi.patch
Normal file
34
0002-configure-Make-sequencer-dependent-on-rawmidi.patch
Normal file
@ -0,0 +1,34 @@
|
||||
From 6880219ad4ba55ae8a94a34b7a987b3369f7c96f Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Date: Sun, 24 Nov 2024 09:32:29 +0100
|
||||
Subject: [PATCH] configure: Make sequencer dependent on rawmidi
|
||||
|
||||
The sequencer feature requires rawmidi implicitly, and it became more
|
||||
obvious with UMP support. Add the dependency check to configure
|
||||
script.
|
||||
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
configure.ac | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 1cd22a5984d7..69aeb978af0d 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -483,6 +483,12 @@ fi
|
||||
AC_SUBST(PYTHON_LIBS)
|
||||
AC_SUBST(PYTHON_INCLUDES)
|
||||
|
||||
+if test "$build_rawmidi" != "yes"; then
|
||||
+ if test "$build_seq" = "yes"; then
|
||||
+ AC_ERROR([Cannot enable sequencer without rawmidi])
|
||||
+ fi
|
||||
+fi
|
||||
+
|
||||
AM_CONDITIONAL([BUILD_MIXER], [test x$build_mixer = xyes])
|
||||
AM_CONDITIONAL([BUILD_PCM], [test x$build_pcm = xyes])
|
||||
AM_CONDITIONAL([BUILD_RAWMIDI], [test x$build_rawmidi = xyes])
|
||||
--
|
||||
2.43.0
|
||||
|
61
0003-seq-include-UMP-headers.patch
Normal file
61
0003-seq-include-UMP-headers.patch
Normal file
@ -0,0 +1,61 @@
|
||||
From 07cee0ba05179a56764c35975d5822420d4f31f9 Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Date: Sun, 24 Nov 2024 09:33:16 +0100
|
||||
Subject: [PATCH] seq: include UMP headers
|
||||
|
||||
Some applications seem including alsa/seqmid.h individually, and this
|
||||
got broken with the update of alsa-lib because now we have
|
||||
dependencies to UMP stuff. Include the necessary UMP headers
|
||||
internally. Also, add the inclusion of rawmidi.h in ump.h for similar
|
||||
reasons.
|
||||
|
||||
Link: https://bugzilla.suse.com/show_bug.cgi?id=1233682
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
include/seq.h | 2 ++
|
||||
include/seq_event.h | 2 ++
|
||||
include/ump.h | 2 ++
|
||||
3 files changed, 6 insertions(+)
|
||||
|
||||
diff --git a/include/seq.h b/include/seq.h
|
||||
index 2eee95a643b4..5082ad0ad82b 100644
|
||||
--- a/include/seq.h
|
||||
+++ b/include/seq.h
|
||||
@@ -29,6 +29,8 @@
|
||||
#ifndef __ALSA_SEQ_H
|
||||
#define __ALSA_SEQ_H
|
||||
|
||||
+#include "ump.h"
|
||||
+
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
diff --git a/include/seq_event.h b/include/seq_event.h
|
||||
index 9ca384ee4a0a..0b59202f6e62 100644
|
||||
--- a/include/seq_event.h
|
||||
+++ b/include/seq_event.h
|
||||
@@ -28,6 +28,8 @@
|
||||
#ifndef __ALSA_SEQ_EVENT_H
|
||||
#define __ALSA_SEQ_EVENT_H
|
||||
|
||||
+#include "ump_msg.h"
|
||||
+
|
||||
/**
|
||||
* \defgroup SeqEvents Sequencer Event Definitions
|
||||
* Sequencer Event Definitions
|
||||
diff --git a/include/ump.h b/include/ump.h
|
||||
index 1043d237c68f..06c86a5e8ba3 100644
|
||||
--- a/include/ump.h
|
||||
+++ b/include/ump.h
|
||||
@@ -9,6 +9,8 @@
|
||||
#ifndef __ALSA_UMP_H
|
||||
#define __ALSA_UMP_H
|
||||
|
||||
+#include "rawmidi.h"
|
||||
+
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
--
|
||||
2.43.0
|
||||
|
9
40-alsa.rules
Normal file
9
40-alsa.rules
Normal file
@ -0,0 +1,9 @@
|
||||
SUBSYSTEM=="sound", GROUP="audio"
|
||||
SUBSYSTEM=="snd", GROUP="audio"
|
||||
KERNEL=="controlC[0-9]*", NAME="snd/%k"
|
||||
KERNEL=="hwC[D0-9]*", NAME="snd/%k"
|
||||
KERNEL=="pcmC[D0-9cp]*", NAME="snd/%k"
|
||||
KERNEL=="midiC[D0-9]*", NAME="snd/%k"
|
||||
KERNEL=="timer", NAME="snd/%k"
|
||||
KERNEL=="seq", NAME="snd/%k"
|
||||
SUBSYSTEM=="sound", KERNEL=="controlC?", RUN+="/usr/sbin/alsa-init %n"
|
4
README.testwav
Normal file
4
README.testwav
Normal file
@ -0,0 +1,4 @@
|
||||
test.wav is copyright (c) 2001 by Matthias Nagorni <mana@suse.de>
|
||||
The file can be distributed under GPL.
|
||||
|
||||
The tune ist based on BWV 29 by J.S. Bach.
|
23
all_notes_off
Normal file
23
all_notes_off
Normal file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Send an "all notes off" event to all channels of all
|
||||
# MIDI-Devices configured in the System
|
||||
#
|
||||
# Written by Matthias Nagorni, (c) 2001 SuSE GmbH Nuremberg
|
||||
# (c) 2014 SUSE Linux Products GmbH
|
||||
#
|
||||
for d in /dev/snd/midiC?D?; do
|
||||
echo Sending "all notes off" to MIDI device $d
|
||||
cat /usr/lib/all_notes_off.bin > $d
|
||||
done
|
||||
if [ -x /usr/bin/pmidi ]; then
|
||||
echo Can execute pmidi. Fine.
|
||||
plist=$(pmidi -l)
|
||||
for p in $plist; do
|
||||
p1=${p%:0}
|
||||
if [ "$p1" != "$p" ] && [ $p1 -gt 16 ]; then
|
||||
echo Sending "all notes off" to MIDI port $p
|
||||
pmidi -p $p -d 0 /usr/lib/all_notes_off.mid
|
||||
fi
|
||||
done
|
||||
fi
|
BIN
all_notes_off.bin
Normal file
BIN
all_notes_off.bin
Normal file
Binary file not shown.
BIN
all_notes_off.mid
Normal file
BIN
all_notes_off.mid
Normal file
Binary file not shown.
12
alsa-init.sh
Normal file
12
alsa-init.sh
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
# alsa-init card#
|
||||
|
||||
/usr/bin/set_default_volume -f $1 >/dev/null 2>&1
|
||||
test -s /var/lib/alsa/asound.state && /usr/sbin/alsactl -F restore $1 >/dev/null 2>&1
|
||||
# increase buffer-preallocation size (for PA)
|
||||
if [ -f /proc/asound/card$1/pcm0p/sub0/prealloc_max ]; then
|
||||
[ $(cat /proc/asound/card$1/pcm0p/sub0/prealloc_max) -le 1024 ] ||
|
||||
echo 1024 > /proc/asound/card$1/pcm0p/sub0/prealloc
|
||||
fi
|
||||
|
||||
exit 0
|
BIN
alsa-lib-1.2.12.tar.bz2
(Stored with Git LFS)
Normal file
BIN
alsa-lib-1.2.12.tar.bz2
(Stored with Git LFS)
Normal file
Binary file not shown.
16
alsa-lib-1.2.12.tar.bz2.sig
Normal file
16
alsa-lib-1.2.12.tar.bz2.sig
Normal file
@ -0,0 +1,16 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCAAdFiEE8E31BzesGohMSz1xg4BZbablnJEFAmZm7lAACgkQg4BZbabl
|
||||
nJEJtQ//So1c+bHwtmG/bMSFXnS8+fYf0DyjTydzonQGwCErHLfmOCLKRxlptR5Y
|
||||
erlDU7JSZIz0N5fI8CN8u/tFwA1asib36krpC8hfLu2euhiyJOHIeyYNXxxJCqhO
|
||||
gcDUhNKr9PnuBiaELB4yHuo7GulM1AroEVMR+BOD2w9D7vdxsny18VPW0lz0bFNb
|
||||
5ghrHFIN8Sd/9NwV3rrzk4/1G1ZDd1FkEM5VfVGO+dK43YCkRKQM+HPOVOvWkhfa
|
||||
23OODknLQtk3WJNE7j0TIg/BcbcaAa0AKx7n5GacsZ/yQRTjq/wT+DuKcfC/Mweg
|
||||
ST9YircBSx+GGE63VVAuAVRAkUrvu1imJVLKW8ugFu16X07gXMB6kVLyWQjf1aFZ
|
||||
4Tj6l8JOIHYcEtJmzaVbrvUx+5jJoDoN2m+dKOXbFeSWkshX/Yr0KnTeK1DqF93f
|
||||
f2PGxeDVQd1W+wMQUXqonJI6HtEUV71rubpvtvCzc41C4C9ZJ951Z1BtVIymLnXj
|
||||
pv3v92r/TkeC/5W/YeE3rRTvIAjJWGuL9o/plWNJxSvqy7j2rG7SS04iBGY7TVKq
|
||||
pKXs81Uc0PRBYOH79Xsw1c47yQf2gsRdK3+LuvlGfsQeOENfAl5pJOpYygCSYiU3
|
||||
7Dv5qx0CeoQ0dfMcriK2QGYw3quLPXR7Oh9+ZvhRtSNhV55d8kk=
|
||||
=/HYf
|
||||
-----END PGP SIGNATURE-----
|
BIN
alsa-lib-1.2.13.tar.bz2
(Stored with Git LFS)
Normal file
BIN
alsa-lib-1.2.13.tar.bz2
(Stored with Git LFS)
Normal file
Binary file not shown.
16
alsa-lib-1.2.13.tar.bz2.sig
Normal file
16
alsa-lib-1.2.13.tar.bz2.sig
Normal file
@ -0,0 +1,16 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCAAdFiEE8E31BzesGohMSz1xg4BZbablnJEFAmczJNIACgkQg4BZbabl
|
||||
nJFCVA/9EJJOFZFzR35c7YshkqcTffWnnekEymRYb7m8USpzI8wDlmjOEPg16/9n
|
||||
MQ+JOPG5PU3ClrwDuUTuZaBso+yOjzSvw1jKwRZaHBCPVBzkOguskWM/R0ffMGhE
|
||||
igObqCQ7h2dhtKDZ+QKGd7NVcrVN6zn9/weM8qOy4NukoJ1m38PLUHo5O3PuFyn9
|
||||
mrIuhUn7QEepSdTuYU6atUyiXWloxfIE8X1ZKe6/feqizWPySZLu4KlgpJ9NxRq4
|
||||
6XwulrtN44azL1xLrjjR3Q4VRpVw+501U7TxNRvTRfBDvbYCiAh39lIt5kWTCY/K
|
||||
LwhxgaqYvecTbMxE5BnCDUIQqdZERZgfqE/UQb70VBYgsOw3SLQ4yvnwP0Pwv3/E
|
||||
w8Byz816r5LxRjh11UZF2A33Btj19gR9nTpcN+9VArFksQP9K7wJ/fG0kd3gUTIw
|
||||
/jD7kkKyH+xVpklWpPPvVkacuyGQyve2eU8R8wI+dD0tj36iiIv14tsgLljXY2Ic
|
||||
6eFfL++Zs3uFfb9gEZqbobe0/XN/uVf4X1OHjpWqb4u65IEQvE7Lk9sZer3WaY+v
|
||||
ZOvNJU+FUB4/Sf2x4jOlQdrVdzGskPxB1CkBIzH1y/h8SyK6o2lnWLF1gKRSpo/m
|
||||
y8I0cFuiqFO5LxmnTTIHDb+fNnt9l6KAoJ7Ptp10JEDqdToQaE8=
|
||||
=fk/E
|
||||
-----END PGP SIGNATURE-----
|
12
alsa-lib-ignore-non-accessible-ALSA_CONFIG_PATH.patch
Normal file
12
alsa-lib-ignore-non-accessible-ALSA_CONFIG_PATH.patch
Normal file
@ -0,0 +1,12 @@
|
||||
--- a/src/conf.c
|
||||
+++ b/src/conf.c
|
||||
@@ -3904,6 +3904,9 @@ int snd_config_update_r(snd_config_t **_top, snd_config_update_t **_update, cons
|
||||
configs = cfgs;
|
||||
if (!configs) {
|
||||
configs = getenv(ALSA_CONFIG_PATH_VAR);
|
||||
+ /* ignore the non-accessible override */
|
||||
+ if (configs && access(configs, R_OK) < 0)
|
||||
+ configs = NULL;
|
||||
if (!configs || !*configs) {
|
||||
const char *topdir = snd_config_topdir();
|
||||
char *s = alloca(strlen(topdir) +
|
6319
alsa.changes
Normal file
6319
alsa.changes
Normal file
File diff suppressed because it is too large
Load Diff
29
alsa.keyring
Normal file
29
alsa.keyring
Normal file
@ -0,0 +1,29 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQINBF+PBUIBEACQ0eLhY6zJkZCztI3Zj7GiEkGyDYXFr10wMn2BmAxXEOhvGs5C
|
||||
XtZYokNnYnojU2ehb14pdQiIYVm7YwjNjPhFmc6DnSJ74tlDtzI0ZfZYgU8B3/AU
|
||||
hHCIe7NeH+uqaS4hQ4gQF3HB19GNQ21keQPtm/cZzNvkAwWQ6wxiIas/odQGt6sg
|
||||
TULub4gXQw42iCW0jNeliNgeOc/4/2qtznN+Ss5G+Hs+EBh0kFCG4+5RcpgtKmYO
|
||||
LEy+8qI/UmlgOeT+47eTXm4LjxHfRuKcbvSExfICUB5XLD2ZmeZbFyP48jkDvB7w
|
||||
A4jNfImtlRfTvoviNlOl08Pk3aJoPR8IZIGw+EQCf3ChXTziadqOg37SAy4yGJ14
|
||||
BjirKgBNO4zB+lkLOAknsVKJOKRt3w54MevCuj0GGbfSyErZAeHvliXrfBa1ACLu
|
||||
c2ynRDR/5j0FA3vPzRsHyOGFC4F34W5BhkXCuJBG2o2VDv/zANzjg/hw+0IbmH3G
|
||||
kYn73EDIaz5giKJolE32WaWkz39DwuuoUaLLyfxyiN+c0p2/XQFCrOSqHNUMfI5z
|
||||
Ll62nL1XruF6u9ApLKRv/uDJN7tLgds83rteYJP7/5/JSYCPB8PcUkmhB8OoVdpr
|
||||
tYI8C/6Y6KREm3Jk4AdkySIFnPXZQCkiOR2qOmAuaQPeesjsrSkUtJYZcwARAQAB
|
||||
tEVBTFNBIFJlbGVhc2UgVGVhbSAoUGFja2FnZSBTaWduaW5nIEtleSB2MSkgPHJl
|
||||
bGVhc2VAYWxzYS1wcm9qZWN0Lm9yZz6JAk4EEwEIADgWIQTwTfUHN6waiExLPXGD
|
||||
gFltpuWckQUCX48FQgIbAwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRCDgFlt
|
||||
puWckRhVD/45DNoD79lHBJEu0Wv93OSlPZDUKR+BnkkdEDgDEhTvk+Bin/EWdb3g
|
||||
Unc+rEczgAqjqblLH7ndBtFZPNGiQ2nu8eAdN0TrOFQx7bFg4Do7KXNUUqdPUETC
|
||||
AgkozF3ucsgOcBbv6LwwDfdQDFjkg7CuNGy8CRcLSO5dLK7domq3RxF5mKl1dkOv
|
||||
4brfw6ssn+pja/jkgM9BKt80ycIDiJtVRuXMBJD19ZB8EzQO9OQBdAPERSG8BwLX
|
||||
LemTLAZqNd0mixVbn50qCQil64UOkOd5DHVBBokxgtlJEcDujqWaCUYSygSiP2ke
|
||||
44ArDr7hRwG5KhhbFOigXo3nBYnKyiuWs0jpnrTQD9+uTxcetyBpJ6BW/i/Fy2a9
|
||||
NBFNhbDI07rCMXM25cLP8qbI5i6nTSDlkpLP40At9yUVYt8gIO6ZpGpO04/lAhT1
|
||||
NxtbZkKMo1nphMHU/MDSusoHyLxUXpppdbXTdMgsuFrXae3gcFDowQbLZqb6ZAJ5
|
||||
opX4sDBIdoHDBsI6wCGTV7AAWB8RXWW0RTYMkyIxqixiiB2N2jaau4yHfqv9QWOY
|
||||
oPcx6ySKqGN0HV50PeRis5eeq7kHIdRrVIOBd0tPIqCKIvyJZk1QXReKvvE84Km2
|
||||
dYPusBlhhF7/4WVovlE6HFwyLSOyb32m4qf5dV35op07ew8i4DHpkQ==
|
||||
=n4lM
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
334
alsa.spec
Normal file
334
alsa.spec
Normal file
@ -0,0 +1,334 @@
|
||||
#
|
||||
# spec file for package alsa
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define build_from_git 0
|
||||
%define do_autoreconf 1
|
||||
|
||||
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
||||
%if ! %{defined _fillupdir}
|
||||
%define _fillupdir /var/adm/fillup-templates
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version} < 1200
|
||||
%define _udevrulesdir /lib/udev/rules.d/
|
||||
%endif
|
||||
|
||||
%ifarch %ix86 x86_64 %arm aarch64 ppc64le riscv64
|
||||
%define enable_topology 1
|
||||
%else
|
||||
%define enable_topology 0
|
||||
%endif
|
||||
|
||||
Name: alsa
|
||||
Version: 1.2.13
|
||||
Release: 0
|
||||
Summary: Advanced Linux Sound Architecture
|
||||
License: LGPL-2.1-or-later
|
||||
Group: System/Libraries
|
||||
URL: https://www.alsa-project.org
|
||||
%if 0%{?build_from_git}
|
||||
Source: alsa-lib-%{version}.tar.bz2
|
||||
%else
|
||||
Source: https://www.alsa-project.org/files/pub/lib/alsa-lib-%{version}.tar.bz2
|
||||
Source1: https://www.alsa-project.org/files/pub/lib/alsa-lib-%{version}.tar.bz2.sig
|
||||
%endif
|
||||
Source2: baselibs.conf
|
||||
Source8: 40-alsa.rules
|
||||
Source11: alsasound
|
||||
Source12: sysconfig.sound
|
||||
Source13: joystick
|
||||
Source14: sysconfig.joystick
|
||||
Source16: set_default_volume
|
||||
Source17: test.wav
|
||||
Source21: README.testwav
|
||||
Source30: all_notes_off
|
||||
Source31: all_notes_off.bin
|
||||
Source32: all_notes_off.mid
|
||||
Source34: alsa-init.sh
|
||||
# from https://www.alsa-project.org/files/pub/gpg-release-key-v1.txt
|
||||
Source35: alsa.keyring
|
||||
# upstream fixes
|
||||
Patch1: 0001-src-Versions.in.in-Update-_tempo_base-name.patch
|
||||
Patch2: 0002-configure-Make-sequencer-dependent-on-rawmidi.patch
|
||||
Patch3: 0003-seq-include-UMP-headers.patch
|
||||
# rest suse fixes
|
||||
Patch101: alsa-lib-ignore-non-accessible-ALSA_CONFIG_PATH.patch
|
||||
BuildRequires: doxygen
|
||||
%if 0%{?do_autoreconf} || 0%{?build_from_git}
|
||||
BuildRequires: libtool
|
||||
%endif
|
||||
BuildRequires: pkgconfig
|
||||
Requires: alsa-ucm-conf
|
||||
Requires: alsa-utils
|
||||
Requires(post): %fillup_prereq
|
||||
Recommends: alsa-oss
|
||||
Recommends: alsa-plugins
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if 0%{?suse_version} <= 1310
|
||||
Requires(post): %insserv_prereq
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1200
|
||||
BuildRequires: pkgconfig(udev)
|
||||
%else
|
||||
BuildRequires: udev
|
||||
%endif
|
||||
|
||||
%description
|
||||
ALSA stands for Advanced Linux Sound Architecture. It supports many
|
||||
PCI, ISA PnP and USB sound cards.
|
||||
|
||||
This package contains the ALSA init scripts to start the sound system
|
||||
on your Linux box. To set it up, run yast2 or alsaconf.
|
||||
|
||||
%package devel
|
||||
Summary: Header files for ALSA development
|
||||
License: LGPL-2.1-or-later
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: glibc-devel
|
||||
Requires: libasound2 = %{version}
|
||||
Obsoletes: alsadev < %{version}
|
||||
Provides: alsa-lib-devel = %{version}
|
||||
Provides: alsadev = %{version}
|
||||
|
||||
%description devel
|
||||
This package contains all necessary include files and libraries needed
|
||||
to develop applications that require ALSA.
|
||||
|
||||
%if %enable_topology
|
||||
%package topology-devel
|
||||
Summary: Header files for ALSA topology development
|
||||
License: LGPL-2.1-or-later
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: alsa-devel = %{version}
|
||||
Requires: libatopology2 = %{version}
|
||||
|
||||
%description topology-devel
|
||||
This package contains all necessary include files and libraries needed
|
||||
to develop applications that require ALSA topology.
|
||||
%endif
|
||||
|
||||
%package docs
|
||||
Summary: Additional Package Documentation for ALSA
|
||||
License: GPL-2.0-or-later
|
||||
Group: Documentation/Other
|
||||
%if 0%{?suse_version} > 1110
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
|
||||
%description docs
|
||||
This package contains optional documentation provided in addition to
|
||||
this package's base documentation.
|
||||
|
||||
%package -n libasound2
|
||||
Summary: Advanced Linux Sound Architecture Library
|
||||
License: LGPL-2.1-or-later
|
||||
Group: System/Libraries
|
||||
Provides: alsa-lib
|
||||
|
||||
%description -n libasound2
|
||||
This package contains the library for ALSA, Advanced Linux Sound
|
||||
Architecture.
|
||||
|
||||
%if %enable_topology
|
||||
%package -n libatopology2
|
||||
Summary: ALSA Topology Library
|
||||
License: LGPL-2.1-or-later
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n libatopology2
|
||||
This package contains the library for ALSA topology support.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n alsa-lib-%{version}
|
||||
|
||||
%build
|
||||
# disable LTO; otherwise some apps confused with versioned symbols (boo#1149461)
|
||||
%define _lto_cflags %{nil}
|
||||
export AUTOMAKE_JOBS="%{?_smp_mflags}"
|
||||
# build alsa-lib
|
||||
%if 0%{?do_autoreconf} || 0%{?build_from_git}
|
||||
autoreconf -fi
|
||||
%endif
|
||||
%configure \
|
||||
--disable-static \
|
||||
--enable-symbolic-functions \
|
||||
--disable-aload \
|
||||
--disable-alisp \
|
||||
%if !%enable_topology
|
||||
--disable-topology \
|
||||
%endif
|
||||
--disable-python
|
||||
make V=1 %{?_smp_mflags}
|
||||
# run doxygen
|
||||
make -C doc doc %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
# install shared library
|
||||
%make_install
|
||||
# clean up unneeded files
|
||||
rm -f %{buildroot}%{_libdir}/*.*a
|
||||
# rm -f %%{buildroot}%%{_libdir}/alsa-lib/smixer/*.*a
|
||||
rm -f %{buildroot}%{_bindir}/aserver
|
||||
%if !%enable_topology
|
||||
rm -f %{buildroot}%{_libdir}/pkgconfig/alsa-topology.pc
|
||||
%endif
|
||||
#
|
||||
# install helper scripts
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
mkdir -p %{buildroot}%{_sbindir}
|
||||
install -c -m 0755 %{SOURCE16} %{buildroot}%{_bindir}
|
||||
install -c -m 0755 %{SOURCE34} %{buildroot}%{_sbindir}/alsa-init
|
||||
%if 0%{?suse_version} < 1140
|
||||
sed -i -e 's@%{_localstatedir}/lib/alsa/asound.state@%{_sysconfdir}/asound.state@g' %{buildroot}%{_bindir}/set_default_volume
|
||||
sed -i -e 's@%{_localstatedir}/lib/alsa/asound.state@%{_sysconfdir}/asound.state@g' %{buildroot}%{_sbindir}/alsa-init
|
||||
%endif
|
||||
# install test wave file
|
||||
mkdir -p %{buildroot}%{_datadir}/sounds/alsa
|
||||
install -c -m 0644 %{SOURCE17} %{buildroot}%{_datadir}/sounds/alsa/test.wav
|
||||
# install all_notes_off stuff
|
||||
install -c -m 0755 %{SOURCE30} %{buildroot}%{_bindir}
|
||||
mkdir -p %{buildroot}%{_prefix}/lib
|
||||
install -c -m 0644 %{SOURCE31} %{buildroot}%{_prefix}/lib
|
||||
install -c -m 0644 %{SOURCE32} %{buildroot}%{_prefix}/lib
|
||||
%if 0%{?suse_version} <= 1310
|
||||
#
|
||||
# install init scripts
|
||||
#
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/init.d
|
||||
install -c -m 0755 %{SOURCE11} %{buildroot}%{_sysconfdir}/init.d
|
||||
install -c -m 0755 %{SOURCE13} %{buildroot}%{_sysconfdir}/init.d
|
||||
%if 0%{?suse_version} < 1140
|
||||
sed -i -e 's@%{_localstatedir}/lib/alsa/asound.state@%{_sysconfdir}/asound.state@g' %{buildroot}%{_initddir}/alsasound
|
||||
%endif
|
||||
rm -f %{buildroot}%{_sbindir}/rcalsasound
|
||||
ln -s ../..%{_initddir}/alsasound %{buildroot}%{_sbindir}/rcalsasound
|
||||
rm -f %{buildroot}%{_sbindir}/rcjoystick
|
||||
ln -s ../..%{_initddir}/joystick %{buildroot}%{_sbindir}/rcjoystick
|
||||
%endif
|
||||
#
|
||||
# udev rules
|
||||
#
|
||||
%if 0%{?suse_version} < 1140
|
||||
mkdir -p %{buildroot}%{_udevrulesdir}
|
||||
install -c -m 0644 %{SOURCE8} %{buildroot}%{_udevrulesdir}
|
||||
%endif
|
||||
#
|
||||
# install template to update rc.config and sysconfig files:
|
||||
# (updating the actual files is done in the %% post-script)
|
||||
#
|
||||
mkdir -p -m 755 %{buildroot}%{_fillupdir}
|
||||
mkdir -p -m 755 %{buildroot}%{_sysconfdir}/sysconfig
|
||||
install -m 644 %{_sourcedir}/sysconfig.sound %{buildroot}%{_fillupdir}
|
||||
%if 0%{?suse_version} <= 1310
|
||||
install -m 644 %{_sourcedir}/sysconfig.joystick %{buildroot}%{_fillupdir}
|
||||
%endif
|
||||
#
|
||||
# documents
|
||||
#
|
||||
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||
cp %{_sourcedir}/README* %{buildroot}%{_docdir}/%{name}
|
||||
%if 0%{?suse_version} < 1200
|
||||
cp COPYING %{buildroot}%{_docdir}/%{name}
|
||||
%endif
|
||||
mkdir -p %{buildroot}%{_docdir}/%{name}/alsa-lib
|
||||
cp ChangeLog TODO MEMORY-LEAK NOTES %{buildroot}%{_docdir}/%{name}/alsa-lib
|
||||
cp doc/asoundrc.txt %{buildroot}%{_docdir}/%{name}/alsa-lib
|
||||
|
||||
%post
|
||||
%if 0%{?suse_version} > 1310
|
||||
%{fillup_only -n sound}
|
||||
%else
|
||||
%{fillup_and_insserv -ny sound alsasound}
|
||||
%{fillup_and_insserv -n joystick joystick}
|
||||
%endif
|
||||
exit 0
|
||||
|
||||
%if 0%{?suse_version} <= 1310
|
||||
%preun
|
||||
%stop_on_removal alsasound joystick
|
||||
exit 0
|
||||
|
||||
%postun
|
||||
%restart_on_update alsasound joystick
|
||||
%insserv_cleanup
|
||||
exit 0
|
||||
%endif
|
||||
|
||||
%post -n libasound2 -p /sbin/ldconfig
|
||||
%postun -n libasound2 -p /sbin/ldconfig
|
||||
|
||||
%if %enable_topology
|
||||
%post -n libatopology2 -p /sbin/ldconfig
|
||||
%postun -n libatopology2 -p /sbin/ldconfig
|
||||
%endif
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
%doc %{_docdir}/%{name}
|
||||
%if 0%{?suse_version} >= 1200
|
||||
%license COPYING
|
||||
%endif
|
||||
%if 0%{?suse_version} <= 1310
|
||||
%{_initddir}/*
|
||||
%endif
|
||||
%{_sbindir}/*
|
||||
%{_bindir}/*
|
||||
%{_prefix}/lib/all_notes_off.*
|
||||
%{_datadir}/sounds/alsa
|
||||
%{_fillupdir}/*
|
||||
%if 0%{?suse_version} < 1140
|
||||
%{_udevrulesdir}*
|
||||
%endif
|
||||
|
||||
%files devel
|
||||
%defattr(-, root, root)
|
||||
%{_libdir}/libasound.so
|
||||
%{_includedir}/sys/*
|
||||
%{_includedir}/alsa
|
||||
%if %enable_topology
|
||||
%exclude %{_includedir}/alsa/topology.h
|
||||
%endif
|
||||
%{_includedir}/asoundlib.h
|
||||
%{_datadir}/aclocal/*.m4
|
||||
%{_libdir}/pkgconfig/alsa.pc
|
||||
|
||||
%if %enable_topology
|
||||
%files topology-devel
|
||||
%defattr(-, root, root)
|
||||
%{_libdir}/libatopology.so
|
||||
%{_includedir}/alsa/topology.h
|
||||
%{_libdir}/pkgconfig/alsa-topology.pc
|
||||
%endif
|
||||
|
||||
%files docs
|
||||
%defattr(-, root, root)
|
||||
%doc doc/doxygen/html/*
|
||||
|
||||
%files -n libasound2
|
||||
%defattr(-, root, root)
|
||||
%{_libdir}/libasound.so.*
|
||||
%{_datadir}/alsa
|
||||
|
||||
%if %enable_topology
|
||||
%files -n libatopology2
|
||||
%defattr(-, root, root)
|
||||
%{_libdir}/libatopology.so.*
|
||||
%endif
|
||||
|
||||
%changelog
|
214
alsasound
Normal file
214
alsasound
Normal file
@ -0,0 +1,214 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# alsasound This shell script takes care of starting and stopping
|
||||
# the ALSA sound driver.
|
||||
#
|
||||
# This script requires /usr/sbin/alsactl program from alsa-utils package.
|
||||
#
|
||||
# Copyright (c) by Jaroslav Kysela <perex@suse.cz>
|
||||
#
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
#
|
||||
# For RedHat 5.0+:
|
||||
# chkconfig: 2345 87 14
|
||||
# description: ALSA driver
|
||||
#
|
||||
# modified to visually fit into SuSE 6.0+ by Philipp Thomas <pthomas@suse.de>
|
||||
# further improvements by Bernd Kaindl, Olaf Hering and Takashi Iwai.
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: alsasound
|
||||
# Required-Start: $local_fs
|
||||
# Should-Start: $remote_fs resmgr
|
||||
# Required-Stop: $local_fs
|
||||
# Should-Stop: $remote_fs resmgr
|
||||
# Default-Start: 2 3 5
|
||||
# Default-Stop:
|
||||
# Short-Description: Set up ALSA sound system
|
||||
# Description: Loading ALSA drivers and store/restore the current setting
|
||||
### END INIT INFO
|
||||
|
||||
. /etc/rc.status
|
||||
. /etc/sysconfig/sound
|
||||
|
||||
# Shell functions sourced from /etc/rc.status:
|
||||
# rc_check check and set local and overall rc status
|
||||
# rc_status check and set local and overall rc status
|
||||
# rc_status -v ditto but be verbose in local rc status
|
||||
# rc_status -v -r ditto and clear the local rc status
|
||||
# rc_failed set local and overall rc status to failed
|
||||
# rc_reset clear local rc status (overall remains)
|
||||
# rc_exit exit appropriate to overall rc status
|
||||
|
||||
# First reset status of this service
|
||||
rc_reset
|
||||
|
||||
alsactl=/usr/sbin/alsactl
|
||||
asoundcfg=/var/lib/alsa/asound.state
|
||||
aconnect=/usr/bin/aconnect
|
||||
|
||||
get_drivers() {
|
||||
/sbin/modprobe -c | \
|
||||
grep -E "^[[:space:]]*alias[[:space:]]+snd-card-[[:digit:]]" | sort -u | \
|
||||
while read a b card; do
|
||||
echo $card
|
||||
done
|
||||
}
|
||||
|
||||
#
|
||||
# insert all sound modules
|
||||
#
|
||||
load_modules() {
|
||||
module_loaded=0
|
||||
c=""
|
||||
drivers=`get_drivers`
|
||||
for i in $drivers; do
|
||||
if [ $i != off ]; then
|
||||
if [ x$c = x ]; then
|
||||
echo -n ": "
|
||||
c=1
|
||||
fi
|
||||
echo -n " ${i##snd-}"
|
||||
/sbin/modprobe $i && module_loaded=1
|
||||
fi
|
||||
done
|
||||
rc_status -v -r
|
||||
test $module_loaded -eq 0 && return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
#
|
||||
# rest of start action
|
||||
#
|
||||
|
||||
# manual load and force to store the status
|
||||
start_all() {
|
||||
echo -n "Starting sound driver"
|
||||
load_modules
|
||||
rc_status -r
|
||||
}
|
||||
|
||||
do_kill() {
|
||||
fuser $* /dev/admmidi* /dev/adsp* /dev/amidi* /dev/audio* /dev/dmfm* \
|
||||
/dev/dmmidi* /dev/dsp* /dev/dspW* /dev/midi* /dev/mixer* /dev/music \
|
||||
/dev/patmgr* /dev/sequencer* /dev/sndstat >/dev/null 2>&1
|
||||
if [ -d /dev/snd ]; then
|
||||
fuser $* /dev/snd/* >/dev/null 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
terminate() {
|
||||
#
|
||||
# Kill processes holding open sound devices
|
||||
#
|
||||
do_kill -TERM -k
|
||||
sleep 1
|
||||
do_kill -k
|
||||
|
||||
#
|
||||
# remove all sequencer connections if any
|
||||
#
|
||||
if [ -f /proc/asound/seq/clients -a -x $aconnect ]; then
|
||||
$aconnect --removeall
|
||||
fi
|
||||
}
|
||||
|
||||
# mute master to avoid clicks at unload/shutdown
|
||||
mute_system() {
|
||||
/usr/bin/amixer set Master mute >/dev/null 2>&1
|
||||
}
|
||||
|
||||
#
|
||||
# remove all sound modules
|
||||
#
|
||||
unload_modules() {
|
||||
mute_system
|
||||
mod=$(grep -m1 -E '^(snd[^ ]*|ac97_bus) [0-9]+ 0' /proc/modules)
|
||||
while [ -n "$mod" ]; do
|
||||
mod=${mod%% *}
|
||||
/sbin/modprobe -r $mod
|
||||
mod=$(grep -m1 -E '^(snd[^ ]*|ac97_bus) [0-9]+ 0' /proc/modules)
|
||||
done
|
||||
rc_failed 0
|
||||
}
|
||||
|
||||
unload_all() {
|
||||
echo -n "Shutting down sound driver"
|
||||
terminate
|
||||
unload_modules
|
||||
rc_status -v
|
||||
}
|
||||
|
||||
stop_all() {
|
||||
if [ -d /proc/asound ]; then
|
||||
$alsactl -g -f $asoundcfg store
|
||||
unload_all
|
||||
fi
|
||||
}
|
||||
|
||||
# See how we were called.
|
||||
case "$1" in
|
||||
start)
|
||||
if test "$PREVLEVEL" = "N" -a -d /proc/asound ; then
|
||||
# re-run alsactl when /var is a seprate partition (bnc#700781)
|
||||
case $asoundcfg in
|
||||
/var/*)
|
||||
grep -q " /var " /proc/mounts && \
|
||||
$alsactl -F -f $asoundcfg restore >/dev/null 2>&1
|
||||
;;
|
||||
esac
|
||||
else
|
||||
start_all
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
if [ "$RUNLEVEL" = "6" -o "$RUNLEVEL" = "0" ]; then
|
||||
if [ -d /proc/asound ]; then
|
||||
$alsactl -f $asoundcfg store
|
||||
# kill pulseaudio before muting the system (bnc#499445)
|
||||
if killall -q -TERM pulseaudio; then
|
||||
usleep 200
|
||||
fi
|
||||
mute_system
|
||||
fi
|
||||
else
|
||||
stop_all
|
||||
fi
|
||||
;;
|
||||
unload)
|
||||
test -d /proc/asound && unload_all
|
||||
;;
|
||||
reload|restart)
|
||||
stop_all
|
||||
start_all
|
||||
;;
|
||||
status)
|
||||
if [ -d /proc/asound ]; then
|
||||
echo -n "ALSA sound driver loaded."
|
||||
rc_status -v
|
||||
else
|
||||
echo -n "ALSA sound driver not loaded."
|
||||
rc_status -u
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload|unload|status}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
rc_exit
|
10
baselibs.conf
Normal file
10
baselibs.conf
Normal file
@ -0,0 +1,10 @@
|
||||
libasound2
|
||||
obsoletes "alsa-<targettype>"
|
||||
provides "alsa-<targettype>"
|
||||
recommends "alsa-oss-<targettype>"
|
||||
alsa-devel
|
||||
requires -alsa-<targettype>
|
||||
requires "libasound2-<targettype> = <version>"
|
||||
libatopology2
|
||||
alsa-topology-devel
|
||||
requires "libatopology2-<targettype> = <version>"
|
113
joystick
Normal file
113
joystick
Normal file
@ -0,0 +1,113 @@
|
||||
#! /bin/bash
|
||||
# Copyright (c) 2002 SuSE Linux AG Nuernberg, Germany.
|
||||
# (c) 2014 SUSE Linux Products GmbH
|
||||
#
|
||||
# Author: Takashi Iwai <tiwai@suse.de>, 2001
|
||||
#
|
||||
# /etc/init.d/joystick
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: joystick
|
||||
# Required-Start: alsasound
|
||||
# Required-Stop: alsasound
|
||||
# Default-Start: 2 3 5
|
||||
# Default-Stop:
|
||||
# Short-Description: Set up analog joysticks
|
||||
# Description: Loading joystick drivers
|
||||
### END INIT INFO
|
||||
|
||||
. /etc/rc.status
|
||||
. /etc/sysconfig/joystick
|
||||
|
||||
alsactl=/usr/sbin/alsactl
|
||||
if [ -x /sbin/lsmod ]; then
|
||||
lsmod=/sbin/lsmod
|
||||
else
|
||||
lsmod=/bin/lsmod
|
||||
fi
|
||||
|
||||
# load joystick drivers
|
||||
function start () {
|
||||
# first load joydev module
|
||||
if [ -z "${JOYSTICK_MODULE_0}${JOYSTICK_MODULE_1}${JOYSTICK_MODULE_2}${JOYSTICK_MODULE_3}" ]; then
|
||||
rc_failed 5
|
||||
return
|
||||
fi
|
||||
|
||||
/sbin/modprobe joydev
|
||||
for js in 0 1 2 3; do
|
||||
# load gameport module
|
||||
eval jsmod=\$GAMEPORT_MODULE_$js
|
||||
if [ -n "$jsmod" -a "$jsmod" != off ]; then
|
||||
/sbin/modprobe $jsmod >/dev/null 2>&1
|
||||
fi
|
||||
# load joystick module
|
||||
eval jsdev=\$JOYSTICK_MODULE_$js
|
||||
eval jsdev_opts=\$JOYSTICK_MODULE_OPTION_$js
|
||||
if [ -n "$jsdev" -a "$jsdev" != off ]; then
|
||||
/sbin/modprobe $jsdev $jsdev_opts >/dev/null 2>&1
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
function stop () {
|
||||
for js in 0 1 2 3; do
|
||||
# remove gameport module
|
||||
eval jsmod=\$GAMEPORT_MODULE_$js
|
||||
if [ -n "$jsmod" -a "$jsmod" != off ]; then
|
||||
/sbin/modprobe -r $jsmod
|
||||
fi
|
||||
# remove joystick module
|
||||
eval jsdev=\$JOYSTICK_MODULE_$js
|
||||
if [ -n "$jsdev" -a "$jsdev" != off ]; then
|
||||
/sbin/modprobe -r $jsdev
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# See how we were called.
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting joystick driver"
|
||||
start
|
||||
rc_status -v
|
||||
;;
|
||||
stop)
|
||||
# Stop daemons.
|
||||
echo -n "Stopping joystick driver"
|
||||
stop
|
||||
rc_status -v
|
||||
;;
|
||||
try-restart)
|
||||
$0 status >/dev/null && $0 restart
|
||||
rc_status
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
rc_status
|
||||
;;
|
||||
force-reload)
|
||||
$0 stop && $0 start
|
||||
rc_status
|
||||
;;
|
||||
reload)
|
||||
rc_failed 3
|
||||
rc_status -v
|
||||
;;
|
||||
status)
|
||||
if $lsmod | grep -q joydev; then
|
||||
echo -n "Joystick driver loaded."
|
||||
rc_status -v
|
||||
else
|
||||
echo -n "Joystick driver not loaded."
|
||||
rc_status -u
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|try-restart|restart|force-reload|reload|status}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
rc_exit
|
99
set_default_volume
Normal file
99
set_default_volume
Normal file
@ -0,0 +1,99 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# set default volumes for playback on ALSA
|
||||
#
|
||||
# set_default_mixer [-f] [card#]
|
||||
#
|
||||
# written by Takashi Iwai <tiwai@suse.de>
|
||||
#
|
||||
|
||||
forced=
|
||||
if [ x$1 = x-f ]; then
|
||||
forced=yes
|
||||
shift
|
||||
fi
|
||||
|
||||
if [ -f /var/lib/alsa/asound.state -a -z "$forced" ]; then
|
||||
/usr/sbin/alsactl restore >/dev/null 2>&1
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
case "$1" in
|
||||
[0-9]*)
|
||||
card="-D hw:$1";;
|
||||
*)
|
||||
card="-D $1";;
|
||||
esac
|
||||
fi
|
||||
|
||||
if amixer $card | grep -q "'Master"; then
|
||||
slavevolp="100%"
|
||||
slavevoldb="0dB"
|
||||
else
|
||||
slavevolp="75%"
|
||||
slavevoldb="-12dB"
|
||||
fi
|
||||
|
||||
amixer -q -s $card <<EOF
|
||||
set Master 75% unmute
|
||||
set Master -12dB
|
||||
set 'Master Mono' 75% unmute
|
||||
set 'Master Mono' -12dB
|
||||
set Front $slavevolp unmute
|
||||
set Front $slavevoldb
|
||||
set PCM $slavevolp unmute
|
||||
set PCM $slavevoldb
|
||||
set Synth $slavevolp unmute
|
||||
set Synth $slavevoldb
|
||||
set Speaker $slavevolp unmute
|
||||
set Speaker $slavevoldb
|
||||
set CD $slavevolp unmute
|
||||
set CD $slavevoldb
|
||||
# mute mic
|
||||
set Mic 0% mute
|
||||
# ESS 1969 chipset has 2 PCM channels
|
||||
set PCM,1 90% unmute
|
||||
set PCM,1 0dB
|
||||
# Trident/YMFPCI/emu10k1
|
||||
set Wave 100% unmute
|
||||
set Music 100% unmute
|
||||
set AC97 100% unmute
|
||||
# CS4237B chipset:
|
||||
set 'Master Digital' 75% unmute
|
||||
# Envy24 chips with analog outs
|
||||
set DAC 90% unmute
|
||||
set DAC -12dB
|
||||
set DAC,0 90% unmute
|
||||
set DAC,0 -12dB
|
||||
set DAC,1 90% unmute
|
||||
set DAC,1 -12dB
|
||||
# some notebooks use headphone instead of master
|
||||
set Headphone $slavevolp unmute
|
||||
set Headphone $slavevoldb
|
||||
set Playback 100% unmute
|
||||
# turn off digital switches
|
||||
set "SB Live Analog/Digital Output Jack" off
|
||||
set "Audigy Analog/Digital Output Jack" off
|
||||
# VIA82xx
|
||||
set "VIX DXS" 100%
|
||||
set "VIX DXS",1 100%
|
||||
set "VIX DXS",2 100%
|
||||
set "VIX DXS",3 100%
|
||||
# capture
|
||||
set Capture 12dB cap
|
||||
EOF
|
||||
|
||||
# run platform-defined scripts (if any)
|
||||
for i in /etc/alsa.d/volume/*; do
|
||||
if [ -x "$i" ]; then
|
||||
case "$i" in
|
||||
*~|*.bak|*.rpm*)
|
||||
;;
|
||||
/etc/alsa.d/volume/[0-9]*)
|
||||
"$i" "$@"
|
||||
esac
|
||||
fi
|
||||
done
|
||||
|
||||
exit 0
|
35
sysconfig.joystick
Normal file
35
sysconfig.joystick
Normal file
@ -0,0 +1,35 @@
|
||||
## Path: Hardware/Joystick
|
||||
## Description: Joystick cofigurations
|
||||
## Type: string
|
||||
## Default: ""
|
||||
## ServiceRestart: joystick
|
||||
#
|
||||
# Gameport module names
|
||||
# (typically "ns558" for legacy gameport support)
|
||||
#
|
||||
GAMEPORT_MODULE_0=""
|
||||
GAMEPORT_MODULE_1=""
|
||||
GAMEPORT_MODULE_2=""
|
||||
GAMEPORT_MODULE_3=""
|
||||
|
||||
## Type: string
|
||||
## Default: ""
|
||||
#
|
||||
# Joystick module names
|
||||
# (typically "analog")
|
||||
#
|
||||
JOYSTICK_MODULE_0=""
|
||||
JOYSTICK_MODULE_1=""
|
||||
JOYSTICK_MODULE_2=""
|
||||
JOYSTICK_MODULE_3=""
|
||||
|
||||
## Type: string
|
||||
## Default: ""
|
||||
#
|
||||
# Joystick module options
|
||||
# (e.g. "js=gameport" for analog)
|
||||
#
|
||||
JOYSTICK_MODULE_OPTION_0=""
|
||||
JOYSTICK_MODULE_OPTION_1=""
|
||||
JOYSTICK_MODULE_OPTION_2=""
|
||||
JOYSTICK_MODULE_OPTION_3=""
|
40
sysconfig.sound
Normal file
40
sysconfig.sound
Normal file
@ -0,0 +1,40 @@
|
||||
## Path: Hardware/Soundcard
|
||||
## Description: Additional options for the sound system.
|
||||
## Type: yesno
|
||||
## Default: no
|
||||
## ServiceReload: alsasound
|
||||
#
|
||||
# Load ALSA sequencer modules at boot-up? (yes/no)
|
||||
# Sequencer modules are necessary only for handling MIDI devices.
|
||||
# If you don't need MIDI, leave here no.
|
||||
#
|
||||
LOAD_SEQUENCER="no"
|
||||
|
||||
## Type: string
|
||||
## Default: ""
|
||||
#
|
||||
# The file name of SoundFont file to be loaded at boot
|
||||
# If you need to load a specific SoundFont file for SB AWE32, SB Live!
|
||||
# and Audigy series, set the file name (or path) of the file here.
|
||||
#
|
||||
SOUNDFONT_FILES=""
|
||||
|
||||
## Type: yesno
|
||||
## Default: no
|
||||
#
|
||||
# Load OSS-emulation modules at boot-up? (yes/no)
|
||||
# OSS-emulation modules are needed if you use OSS applications
|
||||
# with ALSA drivers. This option specifies whether these modules are
|
||||
# loaded at boot-time.
|
||||
#
|
||||
LOAD_OSS_EMUL_MODULES="no"
|
||||
|
||||
## Type: yesno
|
||||
## Default: no
|
||||
#
|
||||
# Load OSS-sequencer emulation module at boot-up? (yes/no)
|
||||
# OSS-sequencer emulation module is needed If you use old /dev/sequencer
|
||||
# or /dev/music. The default is "no" since there are little
|
||||
# applications using these interfaces.
|
||||
#
|
||||
LOAD_OSS_SEQ_MODULE="no"
|
Loading…
x
Reference in New Issue
Block a user