[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.19-209-g056930c
Lennart Poettering
gitmailer-noreply at 0pointer.de
Thu Oct 29 21:15:10 PDT 2009
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 a82c6b0cd5fa075b5a750e6416b7a7f0cd2508c7 (commit)
- Log -----------------------------------------------------------------
056930c svolume: fix MMX error
8a49514 sink: simplify silence checks
aa8ce5b daemon: don't crash if pa_realpath() fails
-----------------------------------------------------------------------
Summary of changes:
src/daemon/main.c | 23 +++++++++++++----------
src/pulsecore/sink.c | 22 ++++++++++------------
src/pulsecore/svolume_mmx.c | 7 ++++++-
3 files changed, 29 insertions(+), 23 deletions(-)
-----------------------------------------------------------------------
commit aa8ce5bb9b159abb2ffb0f43996340566fc2e9c6
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Oct 30 05:08:48 2009 +0100
daemon: don't crash if pa_realpath() fails
diff --git a/src/daemon/main.c b/src/daemon/main.c
index 9e5647a..576fc3e 100644
--- a/src/daemon/main.c
+++ b/src/daemon/main.c
@@ -425,21 +425,24 @@ int main(int argc, char *argv[]) {
pa_set_env("LD_BIND_NOW", "1");
- canonical_rp = pa_realpath(PA_BINARY);
+ if (!(canonical_rp = pa_realpath(PA_BINARY))) {
- if ((rp = pa_readlink("/proc/self/exe"))) {
+ if ((rp = pa_readlink("/proc/self/exe"))) {
- if (pa_streq(rp, canonical_rp))
- pa_assert_se(execv(rp, argv) == 0);
- else
- pa_log_warn("/proc/self/exe does not point to %s, cannot self execute. Are you playing games?", canonical_rp);
+ if (pa_streq(rp, canonical_rp))
+ pa_assert_se(execv(rp, argv) == 0);
+ else
+ pa_log_warn("/proc/self/exe does not point to %s, cannot self execute. Are you playing games?", canonical_rp);
- pa_xfree(rp);
+ pa_xfree(rp);
- } else
- pa_log_warn("Couldn't read /proc/self/exe, cannot self execute. Running in a chroot()?");
+ } else
+ pa_log_warn("Couldn't read /proc/self/exe, cannot self execute. Running in a chroot()?");
- pa_xfree(canonical_rp);
+ pa_xfree(canonical_rp);
+
+ } else
+ pa_log_warn("Couldn't canonicalize binary path, cannot self execute.");
}
#endif
commit 8a49514f74cacd523117aabcd4514543db63a4ed
Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date: Thu Oct 29 12:47:42 2009 +0100
sink: simplify silence checks
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index 221b569..971436d 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -926,18 +926,16 @@ void pa_sink_render(pa_sink*s, size_t length, pa_memchunk *result) {
pa_sw_cvolume_multiply(&volume, &s->thread_info.soft_volume, &info[0].volume);
- if (s->thread_info.soft_muted || !pa_cvolume_is_norm(&volume)) {
- if (s->thread_info.soft_muted || pa_cvolume_is_muted(&volume)) {
- pa_memblock_unref(result->memblock);
- pa_silence_memchunk_get(&s->core->silence_cache,
- s->core->mempool,
- result,
- &s->sample_spec,
- result->length);
- } else {
- pa_memchunk_make_writable(result, 0);
- pa_volume_memchunk(result, &s->sample_spec, &volume);
- }
+ if (s->thread_info.soft_muted || pa_cvolume_is_muted(&volume)) {
+ pa_memblock_unref(result->memblock);
+ pa_silence_memchunk_get(&s->core->silence_cache,
+ s->core->mempool,
+ result,
+ &s->sample_spec,
+ result->length);
+ } else if (!pa_cvolume_is_norm(&volume)) {
+ pa_memchunk_make_writable(result, 0);
+ pa_volume_memchunk(result, &s->sample_spec, &volume);
}
} else {
void *ptr;
commit 056930cbcde117036cdb707ed3e111b7833724ea
Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date: Thu Oct 29 14:49:52 2009 +0100
svolume: fix MMX error
We need to sign extend the lower part of the multiplication before adding it to
the higher part. Makes -1 * 0xffff work again.
diff --git a/src/pulsecore/svolume_mmx.c b/src/pulsecore/svolume_mmx.c
index 5bf72ed..a011789 100644
--- a/src/pulsecore/svolume_mmx.c
+++ b/src/pulsecore/svolume_mmx.c
@@ -62,7 +62,9 @@
" movq "#s", %%mm5 \n\t" \
" pmulhw "#v", "#s" \n\t" /* .. | 0 | vl*p0 | */ \
" paddw %%mm4, "#s" \n\t" /* .. | 0 | vl*p0 | + sign correct */ \
+ " pslld $16, "#s" \n\t" /* .. | vl*p0 | 0 | */ \
" psrld $16, "#v" \n\t" /* .. | 0 | vh | */ \
+ " psrad $16, "#s" \n\t" /* .. | vl*p0 | sign extend */ \
" pmaddwd %%mm5, "#v" \n\t" /* .. | p0 * vh | */ \
" paddd "#s", "#v" \n\t" /* .. | p0 * v0 | */ \
" packssdw "#v", "#v" \n\t" /* .. | p1*v1 | p0*v0 | */
@@ -257,11 +259,14 @@ static void run_test (void) {
printf ("checking MMX %zd\n", sizeof (samples));
pa_random (samples, sizeof (samples));
+ /* for (i = 0; i < SAMPLES; i++)
+ samples[i] = -1; */
memcpy (samples_ref, samples, sizeof (samples));
memcpy (samples_orig, samples, sizeof (samples));
for (i = 0; i < CHANNELS; i++)
volumes[i] = rand() >> 1;
+ /* volumes[i] = 0x0000ffff; */
for (padding = 0; padding < PADDING; padding++, i++)
volumes[i] = volumes[padding];
@@ -269,7 +274,7 @@ static void run_test (void) {
pa_volume_s16ne_mmx (samples, volumes, CHANNELS, sizeof (samples));
for (i = 0; i < SAMPLES; i++) {
if (samples[i] != samples_ref[i]) {
- printf ("%d: %04x != %04x (%04x * %04x)\n", i, samples[i], samples_ref[i],
+ printf ("%d: %04x != %04x (%04x * %08x)\n", i, samples[i], samples_ref[i],
samples_orig[i], volumes[i % CHANNELS]);
}
}
--
hooks/post-receive
PulseAudio Sound Server
More information about the pulseaudio-commits
mailing list