alsa: ignore volume changes from the hw if we are not on the active console

This commit is contained in:
Lennart Poettering 2010-01-13 20:30:36 +01:00 committed by Colin Guthrie
parent ce7bd05ca5
commit c88e4680f0
2 changed files with 6 additions and 0 deletions

View file

@ -1103,6 +1103,9 @@ static int mixer_callback(snd_mixer_elem_t *elem, unsigned int mask) {
if (mask == SND_CTL_EVENT_MASK_REMOVE)
return 0;
if (u->sink->suspend_cause & PA_SUSPEND_SESSION)
return 0;
if (mask & SND_CTL_EVENT_MASK_VALUE) {
pa_sink_get_volume(u->sink, TRUE);
pa_sink_get_mute(u->sink, TRUE);