diff options
Diffstat (limited to 'debian/patches/0085-sink-input-don-t-make-volume-relative-to-dest-sink.patch')
-rw-r--r-- | debian/patches/0085-sink-input-don-t-make-volume-relative-to-dest-sink.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/debian/patches/0085-sink-input-don-t-make-volume-relative-to-dest-sink.patch b/debian/patches/0085-sink-input-don-t-make-volume-relative-to-dest-sink.patch new file mode 100644 index 000000000..774e673e7 --- /dev/null +++ b/debian/patches/0085-sink-input-don-t-make-volume-relative-to-dest-sink.patch @@ -0,0 +1,53 @@ +From 76e410a656b8811fee5df7a52fb34265835ed7da Mon Sep 17 00:00:00 2001 +From: =?utf-8?q?Marc-Andr=C3=A9=20Lureau?= <marc-andre.lureau@nokia.com> +Date: Wed, 29 Jul 2009 15:33:19 +0300 +Subject: [PATCH] sink-input: don't make volume relative to dest sink reference volume + +When sink-input is moving to a new sink, PulseAudio keep the relative +volume and multiply with the reference volume of the new sink. But +that will cause volume to change to 100% if the dest sink reference +volume is 100% and the sink-input was single on the original sink. + +User will experience volume at 100% after that, because stream-restore +will remember that this kind of sink-input was 100%. + +For now, let's disable relative * reference volume change when moving +sink-input. +--- + src/pulsecore/sink-input.c | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c +index b13ef0f..2697755 100644 +--- a/src/pulsecore/sink-input.c ++++ b/src/pulsecore/sink-input.c +@@ -1157,11 +1157,13 @@ int pa_sink_input_start_move(pa_sink_input *i) { + if (i->sink->flags & PA_SINK_FLAT_VOLUME) { + pa_cvolume new_volume; + ++#ifndef NOKIA + /* Make the virtual volume relative */ + pa_sink_input_get_relative_volume(i, &i->virtual_volume); + + /* And reset the the relative volume */ + pa_sink_input_set_relative_volume(i, NULL); ++#endif + + /* We might need to update the sink's volume if we are in flat + * volume mode. */ +@@ -1252,10 +1254,12 @@ int pa_sink_input_finish_move(pa_sink_input *i, pa_sink *dest, pa_bool_t save) { + if (i->sink->flags & PA_SINK_FLAT_VOLUME) { + pa_cvolume new_volume; + ++#ifndef NOKIA + /* Make relative volume absolute again */ + pa_cvolume t = dest->reference_volume; + pa_cvolume_remap(&t, &dest->channel_map, &i->channel_map); + pa_sw_cvolume_multiply(&i->virtual_volume, &i->virtual_volume, &t); ++#endif + + /* We might need to update the sink's volume if we are in flat volume mode. */ + pa_sink_update_flat_volume(i->sink, &new_volume); +-- +1.5.6.3 + |