updated to 1.0.27

This commit is contained in:
Jaroslav Kysela 2013-04-12 11:19:29 +02:00
parent 1ddee9ccf3
commit 09e283e543
8 changed files with 79 additions and 18 deletions

1
.gitignore vendored
View File

@ -28,3 +28,4 @@ alsa-utils-1.0.23.tar.bz2
/alsa-utils-1.0.24.1.tar.bz2
/alsa-utils-1.0.25.tar.bz2
/alsa-utils-1.0.26.tar.bz2
/alsa-utils-1.0.27.tar.bz2

View File

@ -1,6 +1,6 @@
#!/bin/bash
SCRIPT_VERSION=0.4.60
SCRIPT_VERSION=0.4.61
CHANGELOG="http://www.alsa-project.org/alsa-info.sh.changelog"
#################################################################################
@ -111,7 +111,7 @@ cleanup() {
withaplay() {
echo "!!Aplay/Arecord output" >> $FILE
echo "!!------------" >> $FILE
echo "!!--------------------" >> $FILE
echo "" >> $FILE
echo "APLAY" >> $FILE
echo "" >> $FILE
@ -149,7 +149,7 @@ withamixer() {
withalsactl() {
echo "!!Alsactl output" >> $FILE
echo "!!-------------" >> $FILE
echo "!!--------------" >> $FILE
echo "" >> $FILE
exe=""
if [ -x /usr/sbin/alsactl ]; then
@ -244,7 +244,7 @@ withsysfs() {
withdmesg() {
echo "!!ALSA/HDA dmesg" >> $FILE
echo "!!------------------" >> $FILE
echo "!!--------------" >> $FILE
echo "" >> $FILE
dmesg | grep -C1 -E 'ALSA|HDA|HDMI|sound|hda.codec|hda.intel' >> $FILE
echo "" >> $FILE
@ -416,6 +416,7 @@ ESDINST=$(which esd 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null)
PAINST=$(which pulseaudio 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null)
ARTSINST=$(which artsd 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null)
JACKINST=$(which jackd 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null)
ROARINST=$(which roard 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null)
DMIDECODE=$(which dmidecode 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null)
#Check for DMI data
@ -424,10 +425,12 @@ if [ -d /sys/class/dmi/id ]; then
DMI_SYSTEM_MANUFACTURER=$(cat /sys/class/dmi/id/sys_vendor 2>/dev/null)
DMI_SYSTEM_PRODUCT_NAME=$(cat /sys/class/dmi/id/product_name 2>/dev/null)
DMI_SYSTEM_PRODUCT_VERSION=$(cat /sys/class/dmi/id/product_version 2>/dev/null)
DMI_SYSTEM_FIRMWARE_VERSION=$(cat /sys/class/dmi/id/bios_version 2>/dev/null)
elif [ -x $DMIDECODE ]; then
DMI_SYSTEM_MANUFACTURER=$($DMIDECODE -s system-manufacturer 2>/dev/null)
DMI_SYSTEM_PRODUCT_NAME=$($DMIDECODE -s system-product-name 2>/dev/null)
DMI_SYSTEM_PRODUCT_VERSION=$($DMIDECODE -s system-version 2>/dev/null)
DMI_SYSTEM_FIRMWARE_VERSION=$($DMIDECODE -s bios-version 2>/dev/null)
fi
cat /proc/asound/modules 2>/dev/null|awk {'print $2'}>$TEMPDIR/alsamodules.tmp
@ -469,6 +472,7 @@ echo "" >> $FILE
echo "Manufacturer: $DMI_SYSTEM_MANUFACTURER" >> $FILE
echo "Product Name: $DMI_SYSTEM_PRODUCT_NAME" >> $FILE
echo "Product Version: $DMI_SYSTEM_PRODUCT_VERSION" >> $FILE
echo "Firmware Version: $DMI_SYSTEM_FIRMWARE_VERSION" >> $FILE
echo "" >> $FILE
echo "" >> $FILE
echo "!!Kernel Information" >> $FILE
@ -526,7 +530,14 @@ echo " Installed - Yes ($JACKINST)" >> $FILE
echo " Running - $JACKRUNNING" >> $FILE
echo "" >> $FILE
fi
if [[ -z "$PAINST" && -z "$ESDINST" && -z "$ARTSINST" && -z "$JACKINST" ]];then
if [[ -n $ROARINST ]];then
[[ `pgrep '^(.*/)?roard$'` ]] && ROARRUNNING="Yes" || ROARRUNNING="No"
echo "RoarAudio:" >> $FILE
echo " Installed - Yes ($ROARINST)" >> $FILE
echo " Running - $ROARRUNNING" >> $FILE
echo "" >> $FILE
fi
if [[ -z "$PAINST" && -z "$ESDINST" && -z "$ARTSINST" && -z "$JACKINST" && -z "$ROARINST" ]];then
echo "No sound servers found." >> $FILE
echo "" >> $FILE
fi
@ -544,7 +555,7 @@ cat $TEMPDIR/lspci.tmp >> $FILE
echo "" >> $FILE
echo "" >> $FILE
echo "!!Advanced information - PCI Vendor/Device/Subsystem ID's" >> $FILE
echo "!!--------------------------------------------------------" >> $FILE
echo "!!-------------------------------------------------------" >> $FILE
echo "" >> $FILE
lspci -vvn |grep -A1 040[1-3] >> $FILE
echo "" >> $FILE
@ -563,7 +574,7 @@ fi
if [ -d "$SYSFS" ]
then
echo "!!Loaded sound module options" >> $FILE
echo "!!--------------------------" >> $FILE
echo "!!---------------------------" >> $FILE
echo "" >> $FILE
for mod in `cat /proc/asound/modules|awk {'print $2'}`;do
echo "!!Module: $mod" >> $FILE
@ -591,7 +602,7 @@ fi
if [ -s "$TEMPDIR/alsa-ac97.tmp" ]
then
echo "!!AC97 Codec information" >> $FILE
echo "!!---------------------------" >> $FILE
echo "!!----------------------" >> $FILE
echo "--startcollapse--" >> $FILE
echo "" >> $FILE
cat $TEMPDIR/alsa-ac97.tmp >> $FILE
@ -605,7 +616,7 @@ fi
if [ -s "$TEMPDIR/alsa-usbmixer.tmp" ]
then
echo "!!USB Mixer information" >> $FILE
echo "!!---------------------------" >> $FILE
echo "!!---------------------" >> $FILE
echo "--startcollapse--" >> $FILE
echo "" >> $FILE
cat $TEMPDIR/alsa-usbmixer.tmp >> $FILE

View File

@ -1,10 +1,17 @@
#
# Note that two different ALSA card state management schemes exist and they
# can be switched using a file exist check - /etc/alsa/state-daemon.conf .
#
[Unit]
Description=Restore Sound Card State
ConditionPathExists=!/etc/alsa/state-daemon.conf
DefaultDependencies=no
After=sysinit.target
After=alsa-state.service
Before=shutdown.target
Conflicts=shutdown.target
[Service]
Type=oneshot
ExecStart=-/sbin/alsactl -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf --initfile=/lib/alsa/init/00main restore
StandardOutput=syslog

17
alsa-state.service Normal file
View File

@ -0,0 +1,17 @@
#
# Note that two different ALSA card state management schemes exist and they
# can be switched using a file exist check - /etc/alsa/state-daemon.conf .
#
[Unit]
Description=Manage Sound Card State (restore and store)
ConditionPathExists=/etc/alsa/state-daemon.conf
DefaultDependencies=no
After=sysinit.target
Before=shutdown.target
Conflicts=shutdown.target
[Service]
Type=simple
ExecStart=-/usr/sbin/alsactl -s -n 19 -c -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf --initfile=/lib/alsa/init/00main rdaemon
ExecStop=-/usr/sbin/alsactl -s rkill save_and_quit

View File

@ -1,8 +1,15 @@
#
# Note that two different ALSA card state management schemes exist and they
# can be switched using a file exist check - /etc/alsa/state-daemon.conf .
#
[Unit]
Description=Store Sound Card State
ConditionPathExists=!/etc/alsa/state-daemon.conf
DefaultDependencies=no
Before=shutdown.target
[Service]
Type=oneshot
ExecStart=/sbin/alsactl -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf store
StandardOutput=syslog

View File

@ -1,10 +1,10 @@
%define baseversion 1.0.26
%define baseversion 1.0.27
#define fixversion .1
Summary: Advanced Linux Sound Architecture (ALSA) utilities
Name: alsa-utils
Version: %{baseversion}%{?fixversion}
Release: 2%{?dist}
Release: 1%{?dist}
License: GPLv2+
Group: Applications/Multimedia
URL: http://www.alsa-project.org/
@ -16,6 +16,7 @@ Source10: alsa.rules
Source11: alsactl.conf
Source20: alsa-restore.service
Source21: alsa-store.service
Source22: alsa-state.service
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: alsa-lib-devel >= %{baseversion}
BuildRequires: libsamplerate-devel
@ -24,7 +25,9 @@ BuildRequires: gettext-devel
BuildRequires: xmlto
BuildRequires: systemd-units >= 39-2
Conflicts: udev <= 179-2
Requires: alsa-lib >= %{baseversion}, systemd-units >= 39-2, dialog
# use latest alsa-lib - the executables in this package requires latest API
# alsa-info.sh script requires the dialog package
Requires: alsa-lib%{?_isa} >= %{baseversion}, systemd-units >= 39-2, dialog
Conflicts: filesystem < 3
%description
@ -51,6 +54,7 @@ install -p -m 644 %{SOURCE10} $RPM_BUILD_ROOT/%{_prefix}/lib/udev/rules.d/90-als
mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
install -p -m 644 %{SOURCE20} $RPM_BUILD_ROOT/%{_unitdir}/alsa-restore.service
install -p -m 644 %{SOURCE21} $RPM_BUILD_ROOT/%{_unitdir}/alsa-store.service
install -p -m 644 %{SOURCE22} $RPM_BUILD_ROOT/%{_unitdir}/alsa-state.service
# Install support utilities
mkdir -p -m755 $RPM_BUILD_ROOT/%{_bindir}
@ -95,6 +99,13 @@ ln -s alsa-info %{buildroot}/usr/bin/alsa-info.sh
%dir %{_prefix}/lib/alsa/init/
%dir /var/lib/alsa/
%pre
if [ ! -r /lib/systemd/system/alsa-state.service ]; then
[ -d /etc/alsa ] || mkdir -m 0755 /etc/alsa
echo "# Remove this file to disable the alsactl daemon mode" > \
/etc/alsa/state-daemon.conf
fi
%post
if [ -s /etc/alsa/asound.state -a ! -s /etc/asound.state ] ; then
mv /etc/alsa/asound.state /etc/asound.state
@ -104,6 +115,10 @@ if [ -s /etc/asound.state -a ! -s /var/lib/alsa/asound.state ] ; then
fi
%changelog
* Fri Apr 12 2013 Jaroslav Kysela <jkysela@redhat.com> - 1.0.27-1
- Updated to 1.0.27, activated the alsactl daemon mode
- Updated alsa-info.sh to 0.4.61
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.26-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

View File

@ -1,4 +1,7 @@
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"
ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS!="card*", GOTO="alsa_restore_go"
LABEL="alsa_restore_go"
TEST!="/etc/alsa/state-daemon.conf", RUN+="/sbin/alsactl -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf --initfile=/lib/alsa/init/00main restore /dev/$name"
TEST=="/etc/alsa/state-daemon.conf", RUN+="/sbin/alsactl -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf --initfile=/lib/alsa/init/00main nrestore /dev/$name"
LABEL="alsa_restore_end"

View File

@ -1 +1 @@
4dcf1017fafc91603af96705c073eca9 alsa-utils-1.0.26.tar.bz2
cbfb21a24f63fb052b3392195639ce48 alsa-utils-1.0.27.tar.bz2