[pulseaudio-commits] 2 commits - src/pulsecore

David Henningsson diwic at kemper.freedesktop.org
Fri Aug 29 06:35:50 PDT 2014


 src/pulsecore/resampler.h |    2 --
 src/pulsecore/sink.c      |    4 +++-
 src/pulsecore/source.c    |    4 +++-
 3 files changed, 6 insertions(+), 4 deletions(-)

New commits:
commit f611b9b7aa96341dce55f0036a50230f8cc28c24
Author: David Henningsson <david.henningsson at canonical.com>
Date:   Fri Aug 29 15:00:24 2014 +0200

    resampler: Remove duplicate forward declaration of pa_resampler
    
    This duplicated line also caused a compiler warning on some compilers.
    
    Signed-off-by: David Henningsson <david.henningsson at canonical.com>

diff --git a/src/pulsecore/resampler.h b/src/pulsecore/resampler.h
index e3463a2..5a84cf0 100644
--- a/src/pulsecore/resampler.h
+++ b/src/pulsecore/resampler.h
@@ -32,8 +32,6 @@
 typedef struct pa_resampler pa_resampler;
 typedef struct pa_resampler_impl pa_resampler_impl;
 
-typedef struct pa_resampler pa_resampler;
-
 struct pa_resampler_impl {
     void (*free)(pa_resampler *r);
     void (*update_rates)(pa_resampler *r);

commit 5dba418160223e90746235f495bab5b79d74e97b
Author: David Henningsson <david.henningsson at canonical.com>
Date:   Tue Aug 26 13:44:02 2014 +0200

    sink/source: Fix restore of volume on devices without hw volume
    
    Module-device-restore sets reference_volume, but soft_volume remains at
    zero dB, so if a device only has soft_volume (i e no hw volume controls),
    its volume was not restored correctly.
    
    Reported-by: Richardo Salveti de Araujo <ricardo.salveti at canonical.com>
    Signed-off-by: David Henningsson <david.henningsson at canonical.com>

diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index 274fe83..a8a865b 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -613,8 +613,10 @@ void pa_sink_put(pa_sink* s) {
      * the sink implementor to set this flag as needed.
      *
      * Note: This flag can also change over the life time of the sink. */
-    if (!(s->flags & PA_SINK_HW_VOLUME_CTRL) && !(s->flags & PA_SINK_SHARE_VOLUME_WITH_MASTER))
+    if (!(s->flags & PA_SINK_HW_VOLUME_CTRL) && !(s->flags & PA_SINK_SHARE_VOLUME_WITH_MASTER)) {
         pa_sink_enable_decibel_volume(s, true);
+        s->soft_volume = s->reference_volume;
+    }
 
     /* If the sink implementor support DB volumes by itself, we should always
      * try and enable flat volumes too */
diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c
index aabe7ad..6d32666 100644
--- a/src/pulsecore/source.c
+++ b/src/pulsecore/source.c
@@ -564,8 +564,10 @@ void pa_source_put(pa_source *s) {
      * the source implementor to set this flag as needed.
      *
      * Note: This flag can also change over the life time of the source. */
-    if (!(s->flags & PA_SOURCE_HW_VOLUME_CTRL) && !(s->flags & PA_SOURCE_SHARE_VOLUME_WITH_MASTER))
+    if (!(s->flags & PA_SOURCE_HW_VOLUME_CTRL) && !(s->flags & PA_SOURCE_SHARE_VOLUME_WITH_MASTER)) {
         pa_source_enable_decibel_volume(s, true);
+        s->soft_volume = s->reference_volume;
+    }
 
     /* If the source implementor support DB volumes by itself, we should always
      * try and enable flat volumes too */



More information about the pulseaudio-commits mailing list