[pulseaudio-commits] 3 commits - src/modules src/pulse src/pulsecore

Arun Raghavan arun at kemper.freedesktop.org
Wed Aug 17 10:38:46 PDT 2011


 src/modules/alsa/alsa-sink.c  |    4 ++--
 src/pulse/def.h               |   10 ++--------
 src/pulsecore/sink-input.c    |    2 +-
 src/pulsecore/source-output.c |    2 +-
 4 files changed, 6 insertions(+), 12 deletions(-)

New commits:
commit adbdb6259becab57fff893671e58fff5786420db
Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date:   Wed Aug 17 14:58:23 2011 +0530

    formats: Use correct API to check for passthrough streams

diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index 22de3bc..4cd51d7 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -321,7 +321,7 @@ int pa_sink_input_new(
     pa_return_val_if_fail(pa_channel_map_compatible(&data->channel_map, &data->sample_spec), -PA_ERR_INVALID);
 
     /* Don't restore (or save) stream volume for passthrough streams */
-    if (!pa_format_info_is_pcm(data->format)) {
+    if (!pa_sink_input_new_data_is_passthrough(data)) {
         data->volume_is_set = FALSE;
         data->volume_factor_is_set = FALSE;
     }
diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c
index cd2e126..d99bafe 100644
--- a/src/pulsecore/source-output.c
+++ b/src/pulsecore/source-output.c
@@ -299,7 +299,7 @@ int pa_source_output_new(
     pa_return_val_if_fail(pa_channel_map_compatible(&data->channel_map, &data->sample_spec), -PA_ERR_INVALID);
 
     /* Don't restore (or save) stream volume for passthrough streams */
-    if (!pa_format_info_is_pcm(data->format)) {
+    if (!pa_source_output_new_data_is_passthrough(data)) {
         data->volume_is_set = FALSE;
         data->volume_factor_is_set = FALSE;
     }

commit dde09c7fac33de99f77fb90076bd4b45896d1dc5
Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date:   Wed Aug 17 13:33:50 2011 +0530

    alsa: Don't always suspend/unsuspend on sink-input removal
    
    If the sink was already suspended, this avoids and assert when calling
    suspend() again, and prevents an unnecessary unsuspend.

diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index eec38d8..2bf19c6 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -1106,12 +1106,12 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
                 break;
 
             /* .. we do */
-            if ((r = suspend(u)) < 0)
+            if (PA_SINK_IS_OPENED(u->sink->thread_info.state) && ((r = suspend(u)) < 0))
                 return r;
 
             u->sink->sample_spec.rate = u->old_rate;
 
-            if ((r = unsuspend(u)) < 0)
+            if (PA_SINK_IS_OPENED(u->sink->thread_info.state) && ((r = unsuspend(u)) < 0))
                 return r;
 
             break;

commit 2677911e927bab177a29bbf214c8a44660179ed8
Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date:   Wed Aug 17 09:00:47 2011 +0530

    source: Remove the PA_SOURCE_PASSTHROUGH flag
    
    This isn't actually used anywhere, and PA_SINK_PASSTHROUGH was also
    removed.

diff --git a/src/pulse/def.h b/src/pulse/def.h
index 96aea19..d14ebca 100644
--- a/src/pulse/def.h
+++ b/src/pulse/def.h
@@ -857,12 +857,7 @@ typedef enum pa_source_flags {
     /**< This source is in flat volume mode, i.e. always the maximum of
      * the volume of all connected outputs. \since 1.0 */
 
-    PA_SOURCE_PASSTHROUGH = 0x0100U,
-    /**< This sink has support for passthrough mode. The data will be left
-     * as is and not reformatted, resampled, mixed.
-     * \since 1.0 */
-
-    PA_SOURCE_SYNC_VOLUME = 0x0200U,
+    PA_SOURCE_SYNC_VOLUME = 0x0100U,
     /**< The HW volume changes are syncronized with SW volume.
      * \since 1.0 */
 
@@ -871,7 +866,7 @@ typedef enum pa_source_flags {
      * The server will filter out these flags anyway, so you should never see
      * these flags in sources. */
 
-    PA_SOURCE_SHARE_VOLUME_WITH_MASTER = 0x0400U,
+    PA_SOURCE_SHARE_VOLUME_WITH_MASTER = 0x0200U,
     /**< This source shares the volume with the master source (used by some filter
      * sources). */
 } pa_source_flags_t;
@@ -885,7 +880,6 @@ typedef enum pa_source_flags {
 #define PA_SOURCE_DECIBEL_VOLUME PA_SOURCE_DECIBEL_VOLUME
 #define PA_SOURCE_DYNAMIC_LATENCY PA_SOURCE_DYNAMIC_LATENCY
 #define PA_SOURCE_FLAT_VOLUME PA_SOURCE_FLAT_VOLUME
-#define PA_SOURCE_PASSTHROUGH PA_SOURCE_PASSTHROUGH
 #define PA_SOURCE_SYNC_VOLUME PA_SOURCE_SYNC_VOLUME
 #define PA_SOURCE_SHARE_VOLUME_WITH_MASTER PA_SOURCE_SHARE_VOLUME_WITH_MASTER
 



More information about the pulseaudio-commits mailing list