[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.11-122-g5cc2187
Lennart Poettering
gitmailer-noreply at 0pointer.de
Mon Aug 18 10:56:01 PDT 2008
This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.
The master branch has been updated
from b8ba2de7ddfea2b0fa53dc7e8614d16b16ec1915 (commit)
- Log -----------------------------------------------------------------
5cc2187... add some code to make invalid valgrind warnings go away
c6b1888... bump release
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 6 +++++-
src/modules/module-alsa-sink.c | 17 +++++++++++++++++
src/modules/module-alsa-source.c | 17 +++++++++++++++++
src/pulsecore/memblock.c | 14 +++++++++++++-
4 files changed, 52 insertions(+), 2 deletions(-)
-----------------------------------------------------------------------
commit c6b18880bec79d5731619c148a8931ee18972bc3
Author: Lennart Poettering <lennart at poettering.net>
Date: Mon Aug 18 17:57:44 2008 +0200
bump release
diff --git a/configure.ac b/configure.ac
index 25a86a8..f0f71df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,7 +24,7 @@ AC_PREREQ(2.60)
m4_define(PA_MAJOR, [0])
m4_define(PA_MINOR, [9])
-m4_define(PA_MICRO, [11])
+m4_define(PA_MICRO, [12])
AC_INIT([pulseaudio], PA_MAJOR.PA_MINOR.PA_MICRO,[mzchyfrnhqvb (at) 0pointer (dot) net])
AC_CONFIG_SRCDIR([src/daemon/main.c])
commit 5cc2187bec5923e13fb3958d57a5243aaa57b982
Author: Lennart Poettering <lennart at poettering.net>
Date: Mon Aug 18 19:55:55 2008 +0200
add some code to make invalid valgrind warnings go away
diff --git a/configure.ac b/configure.ac
index f0f71df..6560635 100644
--- a/configure.ac
+++ b/configure.ac
@@ -490,6 +490,10 @@ if test "x${with_caps}" != "xno"; then
fi])
fi
+#### Valgrind (optional) ####
+
+AC_CHECK_HEADERS([valgrind/memcheck.h])
+
#### pkg-config ####
# Check for pkg-config manually first, as if its not installed the
diff --git a/src/modules/module-alsa-sink.c b/src/modules/module-alsa-sink.c
index 255896c..8980ba2 100644
--- a/src/modules/module-alsa-sink.c
+++ b/src/modules/module-alsa-sink.c
@@ -28,6 +28,10 @@
#include <asoundlib.h>
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+#include <valgrind/memcheck.h>
+#endif
+
#include <pulse/xmalloc.h>
#include <pulse/util.h>
#include <pulse/timeval.h>
@@ -766,6 +770,10 @@ static int sink_get_volume_cb(pa_sink *s) {
if ((err = snd_mixer_selem_get_playback_dB(u->mixer_elem, u->mixer_map[i], &alsa_vol)) < 0)
goto fail;
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+ VALGRIND_MAKE_MEM_DEFINED(&alsa_vol, sizeof(alsa_vol));
+#endif
+
r.values[i] = pa_sw_volume_from_dB((double) alsa_vol / 100.0);
} else {
@@ -784,6 +792,10 @@ static int sink_get_volume_cb(pa_sink *s) {
if ((err = snd_mixer_selem_get_playback_dB(u->mixer_elem, SND_MIXER_SCHN_MONO, &alsa_vol)) < 0)
goto fail;
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+ VALGRIND_MAKE_MEM_DEFINED(&alsa_vol, sizeof(alsa_vol));
+#endif
+
pa_cvolume_set(&r, s->sample_spec.channels, pa_sw_volume_from_dB((double) alsa_vol / 100.0));
}
@@ -1435,6 +1447,11 @@ int pa__init(pa_module*m) {
if (snd_mixer_selem_get_playback_dB_range(u->mixer_elem, &u->hw_dB_min, &u->hw_dB_max) < 0)
pa_log_info("Mixer doesn't support dB information.");
else {
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+ VALGRIND_MAKE_MEM_DEFINED(&u->hw_dB_min, sizeof(u->hw_dB_min));
+ VALGRIND_MAKE_MEM_DEFINED(&u->hw_dB_max, sizeof(u->hw_dB_max));
+#endif
+
pa_log_info("Volume ranges from %0.2f dB to %0.2f dB.", u->hw_dB_min/100.0, u->hw_dB_max/100.0);
pa_assert(u->hw_dB_min < u->hw_dB_max);
u->hw_dB_supported = TRUE;
diff --git a/src/modules/module-alsa-source.c b/src/modules/module-alsa-source.c
index 0e4efad..9cf5aaf 100644
--- a/src/modules/module-alsa-source.c
+++ b/src/modules/module-alsa-source.c
@@ -28,6 +28,10 @@
#include <asoundlib.h>
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+#include <valgrind/memcheck.h>
+#endif
+
#include <pulse/xmalloc.h>
#include <pulse/util.h>
#include <pulse/timeval.h>
@@ -710,6 +714,10 @@ static int source_get_volume_cb(pa_source *s) {
if ((err = snd_mixer_selem_get_capture_dB(u->mixer_elem, u->mixer_map[i], &alsa_vol)) < 0)
goto fail;
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+ VALGRIND_MAKE_MEM_DEFINED(&alsa_vol, sizeof(alsa_vol));
+#endif
+
r.values[i] = pa_sw_volume_from_dB((double) alsa_vol / 100.0);
} else {
@@ -728,6 +736,10 @@ static int source_get_volume_cb(pa_source *s) {
if ((err = snd_mixer_selem_get_capture_dB(u->mixer_elem, SND_MIXER_SCHN_MONO, &alsa_vol)) < 0)
goto fail;
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+ VALGRIND_MAKE_MEM_DEFINED(&alsa_vol, sizeof(alsa_vol));
+#endif
+
pa_cvolume_set(&r, s->sample_spec.channels, pa_sw_volume_from_dB((double) alsa_vol / 100.0));
}
@@ -1255,6 +1267,11 @@ int pa__init(pa_module*m) {
if (snd_mixer_selem_get_capture_dB_range(u->mixer_elem, &u->hw_dB_min, &u->hw_dB_max) < 0)
pa_log_info("Mixer doesn't support dB information.");
else {
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+ VALGRIND_MAKE_MEM_DEFINED(&u->hw_dB_min, sizeof(u->hw_dB_min));
+ VALGRIND_MAKE_MEM_DEFINED(&u->hw_dB_max, sizeof(u->hw_dB_max));
+#endif
+
pa_log_info("Volume ranges from %0.2f dB to %0.2f dB.", u->hw_dB_min/100.0, u->hw_dB_max/100.0);
pa_assert(u->hw_dB_min < u->hw_dB_max);
u->hw_dB_supported = TRUE;
diff --git a/src/pulsecore/memblock.c b/src/pulsecore/memblock.c
index b43113d..47909cd 100644
--- a/src/pulsecore/memblock.c
+++ b/src/pulsecore/memblock.c
@@ -31,6 +31,10 @@
#include <signal.h>
#include <errno.h>
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+#include <valgrind/memcheck.h>
+#endif
+
#include <pulse/xmalloc.h>
#include <pulse/def.h>
@@ -257,6 +261,10 @@ static struct mempool_slot* mempool_allocate_slot(pa_mempool *p) {
}
}
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+ VALGRIND_MALLOCLIKE_BLOCK(slot, p->block_size, 0, 0);
+#endif
+
return slot;
}
@@ -519,7 +527,7 @@ static void memblock_free(pa_memblock *b) {
case PA_MEMBLOCK_POOL_EXTERNAL:
case PA_MEMBLOCK_POOL: {
struct mempool_slot *slot;
- int call_free;
+ pa_bool_t call_free;
slot = mempool_slot_by_ptr(b->pool, pa_atomic_ptr_load(&b->data));
pa_assert(slot);
@@ -532,6 +540,10 @@ static void memblock_free(pa_memblock *b) {
while (pa_flist_push(b->pool->free_slots, slot) < 0)
;
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+ VALGRIND_FREELIKE_BLOCK(slot, b->pool->block_size);
+#endif
+
if (call_free)
if (pa_flist_push(PA_STATIC_FLIST_GET(unused_memblocks), b) < 0)
pa_xfree(b);
--
hooks/post-receive
PulseAudio Sound Server
More information about the pulseaudio-commits
mailing list