mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-01 22:58:47 -04:00
alsa: ignore volume changes from the hw if we are not on the active console
This commit is contained in:
parent
9b37dce422
commit
540ec7b961
2 changed files with 6 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue