[pulseaudio-commits] 6 commits - libpulse-mainloop-glib.pc.in libpulse.pc.in libpulse-simple.pc.in man/pulse-cli-syntax.5.xml.in src/modules src/pulsecore

Arun Raghavan arun at kemper.freedesktop.org
Mon Jul 16 22:56:53 PDT 2012


 libpulse-mainloop-glib.pc.in                    |    2 +-
 libpulse-simple.pc.in                           |    2 +-
 libpulse.pc.in                                  |    2 +-
 man/pulse-cli-syntax.5.xml.in                   |    5 +++++
 src/modules/bluetooth/module-bluetooth-policy.c |    2 +-
 src/pulsecore/cli-text.c                        |    6 ++++--
 src/pulsecore/core-util.c                       |    8 ++++----
 src/pulsecore/sample-util.h                     |    2 +-
 src/pulsecore/svolume_arm.c                     |    2 +-
 src/pulsecore/svolume_c.c                       |   24 ++++++++++++------------
 src/pulsecore/svolume_mmx.c                     |    4 ++--
 src/pulsecore/svolume_orc.c                     |    2 +-
 src/pulsecore/svolume_sse.c                     |    4 ++--
 13 files changed, 36 insertions(+), 29 deletions(-)

New commits:
commit 503de445a6c148f82f6c0b7159377559eaa5fc56
Author: Peter Meerwald <p.meerwald at bct-electronic.com>
Date:   Mon Jul 9 18:01:32 2012 +0200

    core: Set volumes const in pa_do_volume_func_t
    
    volumes do not change, the samples get scaled
    
    Signed-off-by: Peter Meerwald <p.meerwald at bct-electronic.com>

diff --git a/src/pulsecore/sample-util.h b/src/pulsecore/sample-util.h
index cf79d43..a6b4600 100644
--- a/src/pulsecore/sample-util.h
+++ b/src/pulsecore/sample-util.h
@@ -88,7 +88,7 @@ void pa_memchunk_dump_to_file(pa_memchunk *c, const char *fn);
 
 void pa_memchunk_sine(pa_memchunk *c, pa_mempool *pool, unsigned rate, unsigned freq);
 
-typedef void (*pa_do_volume_func_t) (void *samples, void *volumes, unsigned channels, unsigned length);
+typedef void (*pa_do_volume_func_t) (void *samples, const void *volumes, unsigned channels, unsigned length);
 
 pa_do_volume_func_t pa_get_volume_func(pa_sample_format_t f);
 void pa_set_volume_func(pa_sample_format_t f, pa_do_volume_func_t func);
diff --git a/src/pulsecore/svolume_arm.c b/src/pulsecore/svolume_arm.c
index f938e57..79ed830 100644
--- a/src/pulsecore/svolume_arm.c
+++ b/src/pulsecore/svolume_arm.c
@@ -40,7 +40,7 @@
     " addcs r0, %1                  \n\t" \
     " movcs r6, r0                  \n\t"
 
-static void pa_volume_s16ne_arm(int16_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
+static void pa_volume_s16ne_arm(int16_t *samples, const int32_t *volumes, unsigned channels, unsigned length) {
     int32_t *ve;
 
     /* Channels must be at least 4, and always a multiple of the original number.
diff --git a/src/pulsecore/svolume_c.c b/src/pulsecore/svolume_c.c
index 272e7a7..13ac667 100644
--- a/src/pulsecore/svolume_c.c
+++ b/src/pulsecore/svolume_c.c
@@ -31,7 +31,7 @@
 
 #include "sample-util.h"
 
-static void pa_volume_u8_c(uint8_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
+static void pa_volume_u8_c(uint8_t *samples, const int32_t *volumes, unsigned channels, unsigned length) {
     unsigned channel;
 
     for (channel = 0; length; length--) {
@@ -50,7 +50,7 @@ static void pa_volume_u8_c(uint8_t *samples, int32_t *volumes, unsigned channels
     }
 }
 
-static void pa_volume_alaw_c(uint8_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
+static void pa_volume_alaw_c(uint8_t *samples, const int32_t *volumes, unsigned channels, unsigned length) {
     unsigned channel;
 
     for (channel = 0; length; length--) {
@@ -69,7 +69,7 @@ static void pa_volume_alaw_c(uint8_t *samples, int32_t *volumes, unsigned channe
     }
 }
 
-static void pa_volume_ulaw_c(uint8_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
+static void pa_volume_ulaw_c(uint8_t *samples, const int32_t *volumes, unsigned channels, unsigned length) {
     unsigned channel;
 
     for (channel = 0; length; length--) {
@@ -88,7 +88,7 @@ static void pa_volume_ulaw_c(uint8_t *samples, int32_t *volumes, unsigned channe
     }
 }
 
-static void pa_volume_s16ne_c(int16_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
+static void pa_volume_s16ne_c(int16_t *samples, const int32_t *volumes, unsigned channels, unsigned length) {
     unsigned channel;
 
     length /= sizeof(int16_t);
@@ -115,7 +115,7 @@ static void pa_volume_s16ne_c(int16_t *samples, int32_t *volumes, unsigned chann
     }
 }
 
-static void pa_volume_s16re_c(int16_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
+static void pa_volume_s16re_c(int16_t *samples, const int32_t *volumes, unsigned channels, unsigned length) {
     unsigned channel;
 
     length /= sizeof(int16_t);
@@ -136,7 +136,7 @@ static void pa_volume_s16re_c(int16_t *samples, int32_t *volumes, unsigned chann
     }
 }
 
-static void pa_volume_float32ne_c(float *samples, float *volumes, unsigned channels, unsigned length) {
+static void pa_volume_float32ne_c(float *samples, const float *volumes, unsigned channels, unsigned length) {
     unsigned channel;
 
     length /= sizeof(float);
@@ -166,7 +166,7 @@ static void pa_volume_float32re_c(float *samples, float *volumes, unsigned chann
     }
 }
 
-static void pa_volume_s32ne_c(int32_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
+static void pa_volume_s32ne_c(int32_t *samples, const int32_t *volumes, unsigned channels, unsigned length) {
     unsigned channel;
 
     length /= sizeof(int32_t);
@@ -184,7 +184,7 @@ static void pa_volume_s32ne_c(int32_t *samples, int32_t *volumes, unsigned chann
     }
 }
 
-static void pa_volume_s32re_c(int32_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
+static void pa_volume_s32re_c(int32_t *samples, const int32_t *volumes, unsigned channels, unsigned length) {
     unsigned channel;
 
     length /= sizeof(int32_t);
@@ -202,7 +202,7 @@ static void pa_volume_s32re_c(int32_t *samples, int32_t *volumes, unsigned chann
     }
 }
 
-static void pa_volume_s24ne_c(uint8_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
+static void pa_volume_s24ne_c(uint8_t *samples, const int32_t *volumes, unsigned channels, unsigned length) {
     unsigned channel;
     uint8_t *e;
 
@@ -221,7 +221,7 @@ static void pa_volume_s24ne_c(uint8_t *samples, int32_t *volumes, unsigned chann
     }
 }
 
-static void pa_volume_s24re_c(uint8_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
+static void pa_volume_s24re_c(uint8_t *samples, const int32_t *volumes, unsigned channels, unsigned length) {
     unsigned channel;
     uint8_t *e;
 
@@ -240,7 +240,7 @@ static void pa_volume_s24re_c(uint8_t *samples, int32_t *volumes, unsigned chann
     }
 }
 
-static void pa_volume_s24_32ne_c(uint32_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
+static void pa_volume_s24_32ne_c(uint32_t *samples, const int32_t *volumes, unsigned channels, unsigned length) {
     unsigned channel;
 
     length /= sizeof(uint32_t);
@@ -258,7 +258,7 @@ static void pa_volume_s24_32ne_c(uint32_t *samples, int32_t *volumes, unsigned c
     }
 }
 
-static void pa_volume_s24_32re_c(uint32_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
+static void pa_volume_s24_32re_c(uint32_t *samples, const int32_t *volumes, unsigned channels, unsigned length) {
     unsigned channel;
 
     length /= sizeof(uint32_t);
diff --git a/src/pulsecore/svolume_mmx.c b/src/pulsecore/svolume_mmx.c
index f9fc175..c470ffb 100644
--- a/src/pulsecore/svolume_mmx.c
+++ b/src/pulsecore/svolume_mmx.c
@@ -92,7 +92,7 @@
       " por %%mm4, "#s1"             \n\t" /* .. |  l  h |  */ \
       " por %%mm5, "#s2"             \n\t"
 
-static void pa_volume_s16ne_mmx(int16_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
+static void pa_volume_s16ne_mmx(int16_t *samples, const int32_t *volumes, unsigned channels, unsigned length) {
     pa_reg_x86 channel, temp;
 
     /* Channels must be at least 4, and always a multiple of the original number.
@@ -161,7 +161,7 @@ static void pa_volume_s16ne_mmx(int16_t *samples, int32_t *volumes, unsigned cha
     );
 }
 
-static void pa_volume_s16re_mmx(int16_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
+static void pa_volume_s16re_mmx(int16_t *samples, const int32_t *volumes, unsigned channels, unsigned length) {
     pa_reg_x86 channel, temp;
 
     /* Channels must be at least 4, and always a multiple of the original number.
diff --git a/src/pulsecore/svolume_orc.c b/src/pulsecore/svolume_orc.c
index b178bbf..d5bd5f2 100644
--- a/src/pulsecore/svolume_orc.c
+++ b/src/pulsecore/svolume_orc.c
@@ -34,7 +34,7 @@
 pa_do_volume_func_t fallback;
 
 static void
-pa_volume_s16ne_orc(int16_t *samples, int32_t *volumes, unsigned channels, unsigned length)
+pa_volume_s16ne_orc(int16_t *samples, const int32_t *volumes, unsigned channels, unsigned length)
 {
     if (channels == 2) {
         int64_t v = (int64_t)volumes[1] << 32 | volumes[0];
diff --git a/src/pulsecore/svolume_sse.c b/src/pulsecore/svolume_sse.c
index fe08de4..771bf53 100644
--- a/src/pulsecore/svolume_sse.c
+++ b/src/pulsecore/svolume_sse.c
@@ -76,7 +76,7 @@
 
 static int channel_overread_table[8] = {8,8,8,12,8,10,12,14};
 
-static void pa_volume_s16ne_sse2(int16_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
+static void pa_volume_s16ne_sse2(int16_t *samples, const int32_t *volumes, unsigned channels, unsigned length) {
     pa_reg_x86 channel, temp;
 
     /* Channels must be at least 8 and always a multiple of the original number.
@@ -160,7 +160,7 @@ static void pa_volume_s16ne_sse2(int16_t *samples, int32_t *volumes, unsigned ch
     );
 }
 
-static void pa_volume_s16re_sse2(int16_t *samples, int32_t *volumes, unsigned channels, unsigned length) {
+static void pa_volume_s16re_sse2(int16_t *samples, const int32_t *volumes, unsigned channels, unsigned length) {
     pa_reg_x86 channel, temp;
 
     /* Channels must be at least 8 and always a multiple of the original number.

commit 9b80d1d14ad03bc45e7a18d0ee137001ded1e4b3
Author: Deng Zhengrong <dzrongg at gmail.com>
Date:   Tue Jul 10 08:32:54 2012 +0800

    core: add more verbose error info
    
    I'm debugging an issue, and find that it's more useful for users to know which
    directory hasn't been created instead of just knowing error code.

diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index e435cc4..1e40ba0 100644
--- a/src/pulsecore/core-util.c
+++ b/src/pulsecore/core-util.c
@@ -1508,7 +1508,7 @@ char *pa_get_state_dir(void) {
      * dir then this will break. */
 
     if (pa_make_secure_dir(d, 0700U, (uid_t) -1, (gid_t) -1, TRUE) < 0) {
-        pa_log_error("Failed to create secure directory: %s", pa_cstrerror(errno));
+        pa_log_error("Failed to create secure directory (%s): %s", d, pa_cstrerror(errno));
         pa_xfree(d);
         return NULL;
     }
@@ -1650,7 +1650,7 @@ char *pa_get_runtime_dir(void) {
     if (d) {
 
         if (pa_make_secure_dir(d, m, (uid_t) -1, (gid_t) -1, TRUE) < 0) {
-            pa_log_error("Failed to create secure directory: %s", pa_cstrerror(errno));
+            pa_log_error("Failed to create secure directory (%s): %s", d, pa_cstrerror(errno));
             goto fail;
         }
 
@@ -1664,7 +1664,7 @@ char *pa_get_runtime_dir(void) {
 
         if (pa_make_secure_dir(k, m, (uid_t) -1, (gid_t) -1, TRUE) < 0) {
             free(k);
-            pa_log_error("Failed to create secure directory: %s", pa_cstrerror(errno));
+            pa_log_error("Failed to create secure directory (%s): %s", k, pa_cstrerror(errno));
             goto fail;
         }
 
@@ -1677,7 +1677,7 @@ char *pa_get_runtime_dir(void) {
         goto fail;
 
     if (pa_make_secure_dir(d, m, (uid_t) -1, (gid_t) -1, TRUE) < 0) {
-        pa_log_error("Failed to create secure directory: %s", pa_cstrerror(errno));
+        pa_log_error("Failed to create secure directory (%s): %s", d, pa_cstrerror(errno));
         pa_xfree(d);
         goto fail;
     }

commit 1bf1815080c9b64dd1f56e32b997195cc97ecf1e
Author: Deng Zhengrong <dzrongg at gmail.com>
Date:   Wed Jul 11 22:29:45 2012 +0800

    man: document option `set-log-target`

diff --git a/man/pulse-cli-syntax.5.xml.in b/man/pulse-cli-syntax.5.xml.in
index 9bd59d1..703a424 100644
--- a/man/pulse-cli-syntax.5.xml.in
+++ b/man/pulse-cli-syntax.5.xml.in
@@ -263,6 +263,11 @@ USA.
     </option>
 
     <option>
+      <p><opt>set-log-target</opt> <arg>target</arg></p>
+      <optdesc><p>Change the log target (null, auto, syslog, stderr, file:PATH).</p></optdesc>
+    </option>
+
+    <option>
       <p><opt>set-log-time</opt> <arg>boolean</arg></p>
       <optdesc><p>Show timestamps in log messages.</p></optdesc>
     </option>

commit d591d7f37dd6fdc09d7d67bd6ff1cef15e4f40ce
Author: Deng Zhengrong <dzrongg at gmail.com>
Date:   Wed Jul 11 22:42:04 2012 +0800

    bluetooth: add a parenthesis around pa_streq()
    
    I know that pa_streq() is defined with an extra parenthesis, but everytime I
    look at it, it makes me nervous. :D
    
    So it's better to add the parenthesis here.

diff --git a/src/modules/bluetooth/module-bluetooth-policy.c b/src/modules/bluetooth/module-bluetooth-policy.c
index 665185d..7f19447 100644
--- a/src/modules/bluetooth/module-bluetooth-policy.c
+++ b/src/modules/bluetooth/module-bluetooth-policy.c
@@ -65,7 +65,7 @@ static pa_hook_result_t source_put_hook_callback(pa_core *c, pa_source *source,
     if (!s)
         return PA_HOOK_OK;
 
-    if pa_streq(s, "a2dp_source")
+    if (pa_streq(s, "a2dp_source"))
         role = "music";
     else {
         pa_log_debug("Profile %s cannot be selected for loopback", s);

commit b3d210eb83431a35f78bfb80da0b19bc173009ec
Author: Peter Meerwald <p.meerwald at bct-electronic.com>
Date:   Fri Jul 13 09:32:04 2012 +0200

    build: Fix static linking
    
    fixes bug #52038:
    
    gcc -static  x.c `PKG_CONFIG_PATH=/usr/local/lib/pkgconfig pkg-config --static
    --libs libpulse-simple`
    
    /usr/bin/ld: error: cannot find -lpulsecommon-2.98
    pulse/simple.c:373: error: undefined reference to 'pa_log_level_meta'
    pulse/simple.c:374: error: undefined reference to 'pa_log_level_meta'
    
    Signed-off-by: Peter Meerwald <p.meerwald at bct-electronic.com>

diff --git a/libpulse-mainloop-glib.pc.in b/libpulse-mainloop-glib.pc.in
index 72631c9..23d8421 100644
--- a/libpulse-mainloop-glib.pc.in
+++ b/libpulse-mainloop-glib.pc.in
@@ -7,6 +7,6 @@ Name: libpulse-mainloop-glib
 Description: PulseAudio GLib 2.0 Main Loop Wrapper
 Version: @PACKAGE_VERSION@
 Libs: -L${libdir} -lpulse-mainloop-glib @PTHREAD_LIBS@
-Libs.private: -lpulsecommon- at PA_MAJORMINOR@
+Libs.private: -L${libdir}/pulseaudio -lpulsecommon- at PA_MAJORMINOR@
 Cflags: -I${includedir} -D_REENTRANT
 Requires: libpulse glib-2.0
diff --git a/libpulse-simple.pc.in b/libpulse-simple.pc.in
index ce96976..dc855fd 100644
--- a/libpulse-simple.pc.in
+++ b/libpulse-simple.pc.in
@@ -7,6 +7,6 @@ Name: libpulse-simple
 Description: PulseAudio Simplified Synchronous Client Interface
 Version: @PACKAGE_VERSION@
 Libs: -L${libdir} -lpulse-simple @PTHREAD_LIBS@
-Libs.private: -lpulsecommon- at PA_MAJORMINOR@
+Libs.private: -L${libdir}/pulseaudio -lpulsecommon- at PA_MAJORMINOR@
 Cflags: -I${includedir} -D_REENTRANT
 Requires: libpulse
diff --git a/libpulse.pc.in b/libpulse.pc.in
index b437255..23d888b 100644
--- a/libpulse.pc.in
+++ b/libpulse.pc.in
@@ -8,5 +8,5 @@ Name: libpulse
 Description: PulseAudio Client Interface
 Version: @PACKAGE_VERSION@
 Libs: -L${libdir} -lpulse @PTHREAD_LIBS@
-Libs.private: -lpulsecommon- at PA_MAJORMINOR@
+Libs.private: -L${libdir}/pulseaudio -lpulsecommon- at PA_MAJORMINOR@
 Cflags: -I${includedir} -D_REENTRANT

commit ccf909ebf08c9e6e90fdb2edccbaf473ff7d83de
Author: Frédéric Dalleau <frederic.dalleau at linux.intel.com>
Date:   Fri Jul 13 17:38:23 2012 +0200

    pacmd: Display inputs and outputs PASSTHROUGH flag

diff --git a/src/pulsecore/cli-text.c b/src/pulsecore/cli-text.c
index e651919..0df17e5 100644
--- a/src/pulsecore/cli-text.c
+++ b/src/pulsecore/cli-text.c
@@ -512,7 +512,7 @@ char *pa_source_output_list_to_string(pa_core *c) {
             s,
             "    index: %u\n"
             "\tdriver: <%s>\n"
-            "\tflags: %s%s%s%s%s%s%s%s%s%s%s\n"
+            "\tflags: %s%s%s%s%s%s%s%s%s%s%s%s\n"
             "\tstate: %s\n"
             "\tsource: %u <%s>\n"
             "\tvolume: %s\n"
@@ -535,6 +535,7 @@ char *pa_source_output_list_to_string(pa_core *c) {
             o->flags & PA_SOURCE_OUTPUT_DONT_INHIBIT_AUTO_SUSPEND ? "DONT_INHIBIT_AUTO_SUSPEND " : "",
             o->flags & PA_SOURCE_OUTPUT_NO_CREATE_ON_SUSPEND ? "NO_CREATE_ON_SUSPEND " : "",
             o->flags & PA_SOURCE_OUTPUT_KILL_ON_SUSPEND ? "KILL_ON_SUSPEND " : "",
+            o->flags & PA_SOURCE_OUTPUT_PASSTHROUGH ? "PASSTHROUGH " : "",
             state_table[pa_source_output_get_state(o)],
             o->source->index, o->source->name,
             volume_str,
@@ -610,7 +611,7 @@ char *pa_sink_input_list_to_string(pa_core *c) {
             s,
             "    index: %u\n"
             "\tdriver: <%s>\n"
-            "\tflags: %s%s%s%s%s%s%s%s%s%s%s\n"
+            "\tflags: %s%s%s%s%s%s%s%s%s%s%s%s\n"
             "\tstate: %s\n"
             "\tsink: %u <%s>\n"
             "\tvolume: %s\n"
@@ -633,6 +634,7 @@ char *pa_sink_input_list_to_string(pa_core *c) {
             i->flags & PA_SINK_INPUT_DONT_INHIBIT_AUTO_SUSPEND ? "DONT_INHIBIT_AUTO_SUSPEND " : "",
             i->flags & PA_SINK_INPUT_NO_CREATE_ON_SUSPEND ? "NO_CREATE_SUSPEND " : "",
             i->flags & PA_SINK_INPUT_KILL_ON_SUSPEND ? "KILL_ON_SUSPEND " : "",
+            i->flags & PA_SINK_INPUT_PASSTHROUGH ? "PASSTHROUGH " : "",
             state_table[pa_sink_input_get_state(i)],
             i->sink->index, i->sink->name,
             volume_str,



More information about the pulseaudio-commits mailing list