SHA256
1
0
forked from pool/alsa-utils
alsa-utils/0019-alsa-restore.rules-refer-to-correct-attr.patch
Takashi Iwai fc5e344afa Accepting request 220463 from home:tiwai:branches:multimedia:libs
- Backport minor fix patches for alsactl and aplay from upstream:
  0017-alsactl-Fix-the-va_list-initialization-in-cerror_-an.patch
  0018-aplay-fix-pcm_read-return-value.patch
  0019-alsa-restore.rules-refer-to-correct-attr.patch
  0020-aplay-fix-timespec-to-msec-conversion.patch

OBS-URL: https://build.opensuse.org/request/show/220463
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa-utils?expand=0&rev=96
2014-01-31 11:56:56 +00:00

36 lines
1.3 KiB
Diff

From ef0e588c76fbad4112193d311e51a60d18b44282 Mon Sep 17 00:00:00 2001
From: Dave Reisner <dreisner@archlinux.org>
Date: Sun, 12 Jan 2014 11:15:52 -0500
Subject: [PATCH] alsa-restore.rules: refer to correct attr
$attr{number} in the RUN rule is an empty expansion. This makes sense,
because the path doesn't exist -- i.e., it refers to the path:
/sys/devices/pci0000:00/foo/bar/sound/card0/controlC0/number
Instead, refer to $attr{device/number}, which does exist.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
alsactl/90-alsa-restore.rules.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/alsactl/90-alsa-restore.rules.in b/alsactl/90-alsa-restore.rules.in
index 88e12e0656d2..c68119d05839 100644
--- a/alsactl/90-alsa-restore.rules.in
+++ b/alsactl/90-alsa-restore.rules.in
@@ -2,7 +2,7 @@ ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS!="card*", GOTO="
GOTO="alsa_restore_end"
LABEL="alsa_restore_go"
-TEST!="@daemonswitch@", RUN+="@sbindir@/alsactl restore $attr{number}"
-TEST=="@daemonswitch@", RUN+="@sbindir@/alsactl nrestore $attr{number}"
+TEST!="@daemonswitch@", RUN+="@sbindir@/alsactl restore $attr{device/number}"
+TEST=="@daemonswitch@", RUN+="@sbindir@/alsactl nrestore $attr{device/number}"
LABEL="alsa_restore_end"
--
1.8.4.5