alsa-utils/0015-alsactl-Fix-REMOVE-event-handling-in-monitor-command.patch
Takashi Iwai f84c139643 Accepting request 208681 from home:tiwai:branches:multimedia:libs
- Backport upstream fixes: a few fixes for chmap support, alsaconf
  updates, a new monitor command for alsactl, etc:
  0006-amixer-fix-indentation-when-printing-container-TLV-c.patch
  0007-alsaloop-pcmjob.c-use-portable-way-to-initialize-rec.patch
  0008-speaker-test-Fix-chmapped-channel-selection-without-.patch
  0009-speaker-test-Always-show-chmap-channel-names-if-avai.patch
  0010-speaker-test-Show-out-of-chmap-channels-as-Unknown.patch
  0011-alsaconf-support-newer-m-i-t-and-kmod.patch
  0012-alsaconf-update-gentoo-to-use-modprobe.d-method-as-e.patch
  0013-configure-detect-udevdir-via-pkg-config-fallback-to-.patch
  0014-alsactl-Add-monitor-command.patch
  0015-alsactl-Fix-REMOVE-event-handling-in-monitor-command.patch
  0016-alsactl-monitor-all-cards-as-default.patch

OBS-URL: https://build.opensuse.org/request/show/208681
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa-utils?expand=0&rev=94
2013-11-27 13:18:04 +00:00

41 lines
1.1 KiB
Diff

From bb3293c76e6a1a130196ccb86e78aea3322ed735 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Tue, 26 Nov 2013 13:59:19 +0100
Subject: [PATCH] alsactl: Fix REMOVE event handling in monitor command
SND_CTL_EVENT_MASK_REMOVE has to be checked at first and ignore the
rest if it matches. Suggested by Clemens.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
alsactl/monitor.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/alsactl/monitor.c b/alsactl/monitor.c
index 12d24504264b..1c0246849c62 100644
--- a/alsactl/monitor.c
+++ b/alsactl/monitor.c
@@ -58,6 +58,10 @@ int monitor(const char *name)
snd_ctl_event_elem_get_index(event));
mask = snd_ctl_event_elem_get_mask(event);
+ if (mask == SND_CTL_EVENT_MASK_REMOVE) {
+ printf(" REMOVE\n");
+ continue;
+ }
if (mask & SND_CTL_EVENT_MASK_VALUE)
printf(" VALUE");
if (mask & SND_CTL_EVENT_MASK_INFO)
@@ -66,8 +70,6 @@ int monitor(const char *name)
printf(" ADD");
if (mask & SND_CTL_EVENT_MASK_TLV)
printf(" TLV");
- if (mask == SND_CTL_EVENT_MASK_REMOVE)
- printf(" REMOVE");
printf("\n");
}
snd_ctl_close(ctl);
--
1.8.4.3