summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/alsa/alsa-sink.c9
-rw-r--r--src/modules/alsa/alsa-source.c9
2 files changed, 14 insertions, 4 deletions
diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index ea5188c9..65f12c21 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -1465,8 +1465,13 @@ static int sink_set_port_cb(pa_sink *s, pa_device_port *p) {
if (s->set_mute)
s->set_mute(s);
- if (s->set_volume)
- s->set_volume(s);
+ if (s->flags & PA_SINK_DEFERRED_VOLUME) {
+ if (s->write_volume)
+ s->write_volume(s);
+ } else {
+ if (s->set_volume)
+ s->set_volume(s);
+ }
return 0;
}
diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c
index 2680302c..ab7335d8 100644
--- a/src/modules/alsa/alsa-source.c
+++ b/src/modules/alsa/alsa-source.c
@@ -1368,8 +1368,13 @@ static int source_set_port_cb(pa_source *s, pa_device_port *p) {
if (s->set_mute)
s->set_mute(s);
- if (s->set_volume)
- s->set_volume(s);
+ if (s->flags & PA_SOURCE_DEFERRED_VOLUME) {
+ if (s->write_volume)
+ s->write_volume(s);
+ } else {
+ if (s->set_volume)
+ s->set_volume(s);
+ }
return 0;
}