summaryrefslogtreecommitdiffstats
path: root/src/modules/alsa/alsa-source.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-01-13 20:30:36 +0100
committerColin Guthrie <cguthrie@mandriva.org>2010-02-09 22:32:28 +0000
commitc88e4680f050a6ac65335b1d8148287cc4566b00 (patch)
tree78cf495894fd3cdf3df85fb61e8af4cd8a0a3186 /src/modules/alsa/alsa-source.c
parentce7bd05ca50c946ea6b3ec9a9dcb9bfd7e90ac5e (diff)
alsa: ignore volume changes from the hw if we are not on the active console
Diffstat (limited to 'src/modules/alsa/alsa-source.c')
-rw-r--r--src/modules/alsa/alsa-source.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c
index 157698e3..f8b583ea 100644
--- a/src/modules/alsa/alsa-source.c
+++ b/src/modules/alsa/alsa-source.c
@@ -1051,6 +1051,9 @@ static int mixer_callback(snd_mixer_elem_t *elem, unsigned int mask) {
if (mask == SND_CTL_EVENT_MASK_REMOVE)
return 0;
+ if (u->source->suspend_cause & PA_SUSPEND_SESSION)
+ return 0;
+
if (mask & SND_CTL_EVENT_MASK_VALUE) {
pa_source_get_volume(u->source, TRUE);
pa_source_get_mute(u->source, TRUE);