# The following macro were stolen from initscripts spec file: # The restart part in the real _post_service doesn't work with netfs and isn't needed # for other scripts %define _mypost_service() if [ $1 = 1 ]; then /sbin/chkconfig --add %{1}; fi; %define initlvl_chg() if [[ -f /etc/rc3.d/S%{2}%{1} ]] && [[ -f /etc/rc5.d/S%{2}%{1} ]] && egrep -q 'chkconfig: [0-9]+ %{3}' /etc/init.d/%{1}; then chkconfig --add %{1} || : ; fi; \ %{nil} Summary: The sound scripts Name: sound-scripts Version: 0.56 Release: %mkrel 1 License: GPL Url: http://www.mandrivalinux.com/cgi-bin/cvsweb.cgi/soft/sound-scripts/ Group: System/Base Source0: %name-%version.tar.bz2 BuildRoot: %_tmppath/%name-root BuildArch: noarch Requires: procps >= 2.0.7-8mdk, module-init-tools, aumix-text Requires(Pre): chkconfig >= 1.3.8-3mdk, coreutils, grep, rpm-helper Conflicts: initscripts <= 7.06-50mdk Conflicts: alsa-utils <= 1.0.14-1.rc4 Conflicts: udev < 0.50-5mdk Conflicts: harddrake < 10.4.191-1mdv2008.0 %description The sound-scripts package contains the basic system scripts used: - to setup default sound mixer on first boot - save sound mixer level on shutdown - restore sound mixer on bootstrapping %prep %setup -q %build make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/etc %makeinstall_std # there's no interesting string that is already gprintified export DONT_GPRINTIFY=1 %post %_mypost_service sound %_mypost_service alsa # only needed on upgrade if [ $1 != 0 ]; then # Handle boot sequence changes on upgrade %initlvl_chg sound 71 18 %initlvl_chg alsa 70 17 fi %preun %_preun_service sound %_preun_service alsa %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc ChangeLog %_bindir/reset_sound /bin/reset_sound %_sbindir/alsa.agent /sbin/alsa.agent %config(noreplace) /etc/rc.d/rc.alsa_default %config(noreplace) /etc/sysconfig/alsa /etc/rc.d/init.d/* %config(noreplace) %attr(0644,root,root) /%{_sysconfdir}/udev/rules.d/* %config(noreplace) /etc/modprobe.d/snd-usb-audio %config(noreplace) /etc/modprobe.d/snd-oss %_datadir/alsa/ %changelog * Fri Oct 24 2008 Adam Williamson <awilliamson@mandriva.com> 0.56-1mdv2009.0 + Revision: 296982 - mute Analog Loopback by default (#44703) * Mon Sep 22 2008 Frederic Crozat <fcrozat@mandriva.com> 0.55-1mdv2009.0 + Revision: 286670 - Release 0.55 : - don't try to unload modules at shutdown / reboot - use modprobe.d file to load oss compat modules, not alsa service - remove useless sleep at shutdown for alsa - remove call to deprecated alsactl command * Mon Sep 15 2008 Thierry Vignaud <tvignaud@mandriva.com> 0.54-1mdv2009.0 + Revision: 284867 - alsa initscript: o adapt to latest udev (#43828) * Wed Jun 18 2008 Thierry Vignaud <tvignaud@mandriva.com> 0.53-2mdv2009.0 + Revision: 225450 - rebuild * Fri Apr 04 2008 Olivier Blin <oblin@mandriva.com> 0.53-1mdv2008.1 + Revision: 192313 - 0.53 - fix loading snd-usb-audio (#34613) * Thu Apr 03 2008 Thierry Vignaud <tvignaud@mandriva.com> 0.52-1mdv2008.1 + Revision: 192025 - alsa initscript: o fix matching snd-usb-audio devices (#36466) * Tue Mar 25 2008 Thierry Vignaud <tvignaud@mandriva.com> 0.51-1mdv2008.1 + Revision: 190089 - alsa initscript: o load snd-usb-audio for devices of "audio" Class and of subclass 3 too (#39376) * Fri Mar 14 2008 Thierry Vignaud <tvignaud@mandriva.com> 0.50-3mdv2008.1 + Revision: 187935 - remove requires on /usr/bin/tr (part of coreutils) * Wed Mar 12 2008 Thierry Vignaud <tvignaud@mandriva.com> 0.50-2mdv2008.1 + Revision: 187112 - enable to restore sound level after stoping the service (Christophe Gaubert, #38038) * Wed Mar 05 2008 Oden Eriksson <oeriksson@mandriva.com> 0.49-2mdv2008.1 + Revision: 179513 - rebuild + Olivier Blin <oblin@mandriva.com> - restore BuildRoot + Thierry Vignaud <tvignaud@mandriva.com> - kill re-definition of %%buildroot on Pixel's request * Wed Sep 12 2007 Olivier Blin <oblin@mandriva.com> 0.49-1mdv2008.0 + Revision: 84588 - add /etc/modprobe.d/snd-usb-audio to prevent snd-usb-audio loading when alsa service is not started * Tue Sep 04 2007 Thierry Vignaud <tvignaud@mandriva.com> 0.48-1mdv2008.0 + Revision: 79373 - load OSS compat modules if they'ven't be loaded through /etc/modprobe.conf * Mon Sep 03 2007 Thierry Vignaud <tvignaud@mandriva.com> 0.47-1mdv2008.0 + Revision: 78501 - restore mixer even if we already load OSS compat modules through /etc/modprobe.conf (ie if draksound was used in order to reconfigure the sound card) (#29071) * Fri Aug 31 2007 Thierry Vignaud <tvignaud@mandriva.com> 0.46-1mdv2008.0 + Revision: 76981 - call udevsettle so that services waiting for alsa service to complete see devices created (#20761) - fix loading OSS compat modules on restart (#21246) - fix some test due to [_-] changes in module names - do load the OSS compat modules & restore sound level even if udev already load the module through PCI coldplug (#32994) * Thu May 03 2007 Thierry Vignaud <tvignaud@mandriva.com> 0.44-2mdv2008.0 + Revision: 21813 - adjust file list - bump release - bump require on alsa-utils because of /usr/sbin -> /sbin move - run reset_sound and alsactl from root fs rather than /usr (#30368) - Import sound-scripts * Tue Sep 19 2006 Olivier Blin <oblin@mandriva.com> 0.43-1mdv2007.0 - reenable snd-usb-audio at service start only, not during stop (#12731) * Thu May 11 2006 Thierry Vignaud <tvignaud@mandriva.com> 0.42-1mdk - on startup, generate /etc/asound.names if needed * Thu Apr 13 2006 Thierry Vignaud <tvignaud@mandriva.com> 0.41-1mdk - alsa service: o fix perms on resuming after suspending (#21925) o silent stop (J.A. Magallon) - reset_sound: o fix playing sound on Hercules Gamesurround Fortissimo 4 (#21173) o try fixing playing sound on SB Audigy 2 (#18735) * Sat Jan 28 2006 Thierry Vignaud <tvignaud@mandriva.com> 0.40-1mdk - fix restoring mixer (#20873) * Tue Jan 17 2006 Thierry Vignaud <tvignaud@mandriva.com> 0.39-1mdk - fix restoring mixer when not using udev (#20636) * Mon Jan 9 2006 Olivier Blin <oblin@mandriva.com> 0.38-1mdk - convert parallel init to LSB - the sound service should start the alsa service * Mon Jan 2 2006 Olivier Blin <oblin@mandriva.com> 0.37-1mdk - add parallel init support * Thu Dec 15 2005 Thierry Vignaud <tvignaud@mandriva.com> 0.36-1mdk - adapt to new udev (#20175) * Fri Sep 16 2005 Thierry Vignaud <tvignaud@mandriva.com> 0.35-1mdk - use new aumix-text instead of aumix * Thu Sep 15 2005 Thierry Vignaud <tvignaud@mandriva.com> 0.34-1mdk - fix recording on Via FX41/VT8233 && ATI IXP400 (#14571) * Sun Sep 11 2005 Thierry Vignaud <tvignaud@mandriva.com> 0.33-1mdk - requires aumix (#18397) * Fri Sep 9 2005 Thierry Vignaud <tvignaud@mandriva.com> 0.32-1mdk - supress harmless error message (#18394) * Wed Sep 7 2005 Thierry Vignaud <tvignaud@mandriva.com> 0.31-1mdk - alsa service: unblacklist audio too (#12731) * Tue Sep 6 2005 Thierry Vignaud <tvignaud@mandriva.com> 0.30-1mdk - fix sound on Creative Labs EMU10K2: most users use analog HPs rather than digital ones (#18235) * Fri Aug 19 2005 Thierry Vignaud <tvignaud@mandriva.com> 0.29-1mdk - alsa service: o ensure we don't accumulates empty lines in /etc/hotplug/blacklist o use the new way to disable blacklisting modules (#12731) * Thu Aug 11 2005 Flavio Bruno Leitner <flavio@mandriva.com> 0.28-2mdk - changed requires from modutils to module-init-tools * Mon Aug 8 2005 Thierry Vignaud <tvignaud@mandriva.com> 0.28-1mdk - fix saving sound level * Mon Aug 08 2005 Thierry Vignaud <tvignaud@mandriva.com> 0.27-1mdk - move from dev.d to event handler only answering to proper events * Thu Jul 7 2005 Thierry Vignaud <tvignaud@mandriva.com> 0.26-1mdk - enable "External Amplifier" (fix sound on new laptops, #16582) * Wed Mar 30 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.25-1mdk - fix sound on SB Audigy LS * Fri Mar 25 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.24-1mdk - fix alsa mixer restoring on boot (#14967) * Tue Mar 8 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.23-1mdk - move udev event handler (really fixing multiple cards support - #13103) * Mon Mar 7 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.22-1mdk - fix multiple card support (#13103) - fix reseting sound volume on udev update * Fri Mar 4 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.21-1mdk - really fix #13911 * Mon Feb 28 2005 <tv@vador.mandrakesoft.com> 0.20-1mdk - filter out error messages when USB subsystem is not availlable (#13977) - fix distortion on SBLive Value with stereo analogue speakers (#13911) - fix low sound on some laptops with internal HPs * Fri Feb 11 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.19-1mdk - better support for partially statically compiled ALSA * Fri Feb 11 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.18-1mdk - typo fix (#13504), thus really fixing #12731 * Wed Feb 9 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.17-1mdk - alsa service: better check to know whether ALSA drivers are loaded or not (fix broken sound startup when a webcam is plugged, #12731) - fix alsa mixer restore when not using udev * Tue Feb 1 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.16-1mdk - fix no PID of programs using alsa shown when stopping alsa (#13102) - handle multiple sound cards (#13103) * Wed Jan 19 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.15-1mdk - alsa_default.pl: o fix broken blacklisting (broken since 0.09-1mdk) o fix sound on i845 with ALSA-1.0.8+ o remute blacklisted entries if manually unmuted by the user - udev event handler: save sound level on ALSA shutdown and on udev shutdown (eg: gently handle udev update so that the mixer doesn't suddendly got reseted to boot's defaults because the user hasn't save them) * Wed Jan 12 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.14-1mdk - fix alsactl path (#12986) * Tue Jan 11 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.13-1mdk - smooth startup when using udev (ALSA levels are now restored asynchronously) - display FAILED if restoring mixer levels failed - factorize ALSA mixer restoring into /etc/dev.d/snd/controlC0/alsa.dev * Tue Jan 4 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.12-1mdk - wait_for_sysfs is dead * Sun Dec 5 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.11-1mdk - use wait_for_sysfs in order to speed up starting time * Fri Dec 3 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.10-1mdk - fix udev check after switching from udev-030 to udev-046 (#12553) * Thu Nov 4 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.09-1mdk - alsa_default.pl: o fix too fast sound on "Terratec Aureon 5.1 Sky" (#12100) o documment each blacklisted mixer element o generalize SB Live fix so that it works on Audigy too (both EMU10K and EMU10K2) (#7938) - reset_sound: make it work for non root users too * Tue Nov 2 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.08-1mdk - be more robust when parsing asound.state (thus fixing support for the Turtle Beach Santa Cruz soundcard, which uses the Cirrus Logic CS4297A driver (#12151)) * Fri Oct 1 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.07-1mdk - alsa service: load snd audio if needed (because snd-usb-audio is now blacklisted on early boot and reenable USB sound audio hotplugging (for later (un-)plugging) (#8004) - fix loud sound on cmpci cards * Fri Sep 10 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.06-1mdk - enforce proper package ordering when updating from mdk10.0 + updates - workaround udev slowly creating /dev/ nodes on module load (Luca Berra) - when mixer elements were altered (aka on kernel switches), run reset_sound like we do on first boot * Thu Sep 9 2004 Frederic Lepied <flepied@mandrakesoft.com> 0.05-1mdk - noarch - prereq rpm-helper - use alsactl -F restore to be more safe * Fri Jun 4 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.04-1mdk - add reset_sound in order to reinitialize sound level to the first boot one * Fri Jun 4 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.03-1mdk - fix larsen on laptops with ALI chipsets * Fri May 28 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.02-1mdk - fix larsen on some DELL notebooks (with i8xx chipsets) * Wed Mar 24 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.01-1mdk - new package, splited from initscripts