diff --git a/42-hd-audio-pm.rules b/42-hd-audio-pm.rules new file mode 100644 index 0000000..e80dbd5 --- /dev/null +++ b/42-hd-audio-pm.rules @@ -0,0 +1,5 @@ +# do not edit this file, it will be overwritten on update +# +# Enable autosuspend for HD-audio devices + +ACTION=="add", SUBSYSTEM=="pci", ATTR{class}=="0x040300", TEST=="power/control", ATTR{power/control}="auto" diff --git a/alsa.changes b/alsa.changes index fb7df12..8d69830 100644 --- a/alsa.changes +++ b/alsa.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Feb 6 11:02:34 CET 2014 - tiwai@suse.de + +- Enable runtime PM for HD-audio devices (FATE#315523); + install 42-hd-audio-pm.rules udev file + ------------------------------------------------------------------- Wed Nov 27 09:45:38 CET 2013 - tiwai@suse.de diff --git a/alsa.spec b/alsa.spec index 98eaf86..d00b343 100644 --- a/alsa.spec +++ b/alsa.spec @@ -1,7 +1,7 @@ # # spec file for package alsa # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,6 +19,9 @@ Name: alsa BuildRequires: doxygen BuildRequires: libtool +%if %suse_version > 1200 +BuildRequires: libudev-devel +%endif BuildRequires: pkg-config %define package_version 1.0.27.2 Requires: alsa-utils @@ -37,6 +40,7 @@ Release: 0 Source: ftp://ftp.alsa-project.org/pub/lib/alsa-lib-%{package_version}.tar.bz2 Source2: baselibs.conf Source8: 40-alsa.rules +Source9: 42-hd-audio-pm.rules Source11: alsasound Source12: sysconfig.sound Source13: joystick @@ -77,6 +81,11 @@ Patch19: 0019-dmix-Don-t-use-assert-and-abort.patch Patch99: alsa-lib-doxygen-avoid-crash-for-11.3.diff Url: http://www.alsa-project.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-build +%if %suse_version > 1200 +%define _udevdir %(pkg-config --variable=udevdir udev) +%else +%define _udevdir /lib/udev +%endif %description ALSA stands for Advanced Linux Sound Architecture. It supports many @@ -209,10 +218,11 @@ ln -s ../../etc/init.d/joystick $RPM_BUILD_ROOT%{_sbindir}/rcjoystick # # udev rules (only for non-systemd) # +mkdir -p $RPM_BUILD_ROOT%{_udevdir}/rules.d %if %suse_version < 1140 -mkdir -p $RPM_BUILD_ROOT/etc/udev/rules.d -install -c -m 0644 %{SOURCE8} $RPM_BUILD_ROOT/etc/udev/rules.d +install -c -m 0644 %{S:8} $RPM_BUILD_ROOT%{_udevdir}/rules.d %endif +install -c -m 0644 %{S:9} $RPM_BUILD_ROOT%{_udevdir}/rules.d # # modprobe config and the module install script for loading OSS-emulation # and sequencer modules automatically @@ -273,9 +283,7 @@ exit 0 /usr/lib/all_notes_off.* %{_datadir}/sounds/alsa /var/adm/fillup-templates/* -%if %suse_version < 1140 -/etc/udev -%endif +%{_udevdir}/rules.d/* %files devel %defattr(-, root, root)