--- /dev/null
+ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", \
+ RUN+="/sbin/alsactl -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf --initfile=/lib/alsa/init/00main restore /dev/$name"
+ACTION=="remove", SUBSYSTEM=="sound", KERNEL=="controlC*", \
+ RUN+="/sbin/alsactl -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf store /dev/$name"
Summary(uk.UTF-8): Утиліти командного рядка для ALSA project
Name: alsa-utils
Version: 1.0.20
-Release: 3
+Release: 4
# some apps GPL v2, some GPL v2+
License: GPL v2
Group: Applications/Sound
# Source0-md5: 6837e673ef19da96d8bd2f9e18cd9574
Source1: alsasound.init
Source2: alsa-oss-pcm
+Source3: alsa-udev.rules
+Source4: alsactl.conf
URL: http://www.alsa-project.org/
Patch0: %{name}-fast_sampling.patch
Patch1: %{name}-modprobe.patch
Requires: which
Suggests: gpm
Obsoletes: alsaconf
+Obsoletes: alsa-udev
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
%{__automake}
CFLAGS="%{rpmcflags} -I/usr/include/ncurses"
CXXFLAGS="%{rpmcxxflags} -fno-rtti -fno-exceptions"
-%configure
+# we need alsactl for udev as early as possible
+%configure \
+ --sbindir=/sbin
%{__make}
%install
install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/alsasound
install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/alsa-oss-pcm
+install -D %{SOURCE3} $RPM_BUILD_ROOT/etc/udev/rules.d/90-alsa.rules
+install -D %{SOURCE4} $RPM_BUILD_ROOT/etc/alsa/alsactl.conf
+
+install -d $RPM_BUILD_ROOT/lib/alsa
+mv $RPM_BUILD_ROOT%{_datadir}/alsa/init $RPM_BUILD_ROOT/lib/alsa
+
+ln -s /lib/alsa/init $RPM_BUILD_ROOT%{_datadir}/alsa/init
+install -d $RPM_BUILD_ROOT%{_sbindir}
+ln -s /sbin/alsactl $RPM_BUILD_ROOT%{_sbindir}/alsactl
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/arecord.1
echo ".so aplay.1" > $RPM_BUILD_ROOT%{_mandir}/man1/arecord.1
%files -f alsa-utils.lang
%defattr(644,root,root,755)
%doc README ChangeLog
+%attr(755,root,root) /sbin/*
%attr(755,root,root) %{_bindir}/*
%attr(755,root,root) %{_sbindir}/*
+%{_sysconfdir}/alsa/alsactl.conf
+%{_sysconfdir}/udev/rules.d/90-alsa.rules
+%dir /lib/alsa
+/lib/alsa/init
%{_datadir}/alsa/init
%{_datadir}/alsa/speaker-test
%{_datadir}/sounds/alsa
# alsasound This shell script takes care of starting and stopping \
# ALSA sound driver.
#
-# This script requires /usr/sbin/alsactl program from alsa-utils package.
-#
# Copyright (c) by Jaroslav Kysela <perex@jcu.cz>
#
# This program is free software; you can redistribute it and/or modify
/sbin/modprobe $line
ok
done
-
- # restore driver settings
- #
- if [ -x /usr/sbin/alsactl ]; then
- if [ -f /etc/asound.state ]; then
- if [ "$(kernelver)" -lt "002006012" ]; then
- for i in 1 2 3 4; do
- [ -a /dev/snd/controlC0 ] && break
- sleep 1
- done
- fi
- /usr/sbin/alsactl restore
- fi
- else
- show "ERROR: alsactl not found"; fail
- fi
}
detect_stop()
driver_stop()
{
- #
- # store driver settings
- #
- if [ -x /usr/sbin/alsactl ]; then
- /usr/sbin/alsactl store
- else
- show '!!!alsactl not found!!!'; fail
- fi
#
# remove all sound modules
#