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 d30d22dfb8640431405b3d0f15455b29e817c167 (commit)
- Log -----------------------------------------------------------------
f97faae alsa: Set the rewind safeguard proportionally to sample spec
-----------------------------------------------------------------------
Summary of changes:
src/modules/alsa/alsa-sink.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
-----------------------------------------------------------------------
commit f97faae006c0acbcd33056008196f3651fe5b0d3
Author: Colin Guthrie <[email protected]>
Date: Sat Sep 4 11:58:05 2010 +0100
alsa: Set the rewind safeguard proportionally to sample spec
Currently when rewinding alsa, a fixed value of 256 bytes is used,
which represents 1.33ms @ 48kHz (2ch, 16bit). This is typically fine
and due to DMA constraints we would not want to rewind less than this.
However with more demanding sample specs, (e.g. 8ch 192kHz 32bit)
256 bytes is likely not sufficient, so calculate what 1.33ms would
be and use which ever value is bigger.
Discussed with David Henningsson and Pierre-Louis Bossart here:
http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/7286
diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index e92c6e5..e62dcc0 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -86,7 +86,8 @@
#define VOLUME_ACCURACY (PA_VOLUME_NORM/100) /* don't require volume
adjustments to be perfectly correct. don't necessarily extend granularity in
software unless the differences get greater than this level */
-#define DEFAULT_REWIND_SAFEGUARD_BYTES (256) /* 1.33ms @48kHz, should work for
most hardware */
+#define DEFAULT_REWIND_SAFEGUARD_BYTES (256U) /* 1.33ms @48kHz, we'll never
rewind less than this */
+#define DEFAULT_REWIND_SAFEGUARD_USEC (1330) /* 1.33ms, depending on
channels/rate/sample we may rewind more than 256 above */
struct userdata {
pa_core *core;
@@ -1740,7 +1741,7 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma,
const char*driver, pa_ca
goto fail;
}
- rewind_safeguard = DEFAULT_REWIND_SAFEGUARD_BYTES;
+ rewind_safeguard = PA_MAX(DEFAULT_REWIND_SAFEGUARD_BYTES,
pa_usec_to_bytes(DEFAULT_REWIND_SAFEGUARD_USEC, &ss));
if (pa_modargs_get_value_u32(ma, "rewind_safeguard", &rewind_safeguard) <
0) {
pa_log("Failed to parse rewind_safeguard argument");
goto fail;
--
hooks/post-receive
PulseAudio Sound Server
_______________________________________________
pulseaudio-commits mailing list
[email protected]
https://tango.0pointer.de/mailman/listinfo/pulseaudio-commits