From 0277cdf366ad1f3fd4bc8795c9971c0097967fa4 Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen Date: Wed, 16 May 2018 19:53:23 +0300 Subject: [PATCH] alsa-sink: disable rewinding --- src/modules/alsa/alsa-sink.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c index 827a65081..72fbd858f 100644 --- a/src/modules/alsa/alsa-sink.c +++ b/src/modules/alsa/alsa-sink.c @@ -62,7 +62,7 @@ #define DEFAULT_DEVICE "default" -#define DEFAULT_TSCHED_BUFFER_USEC (2*PA_USEC_PER_SEC) /* 2s -- Overall buffer size */ +#define DEFAULT_TSCHED_BUFFER_USEC (300*PA_USEC_PER_MSEC) /* 300ms -- Overall buffer size */ #define DEFAULT_TSCHED_WATERMARK_USEC (20*PA_USEC_PER_MSEC) /* 20ms -- Fill up when only this much is left in the buffer */ #define TSCHED_WATERMARK_INC_STEP_USEC (10*PA_USEC_PER_MSEC) /* 10ms -- On underrun, increase watermark by this */ @@ -1021,7 +1021,7 @@ static int update_sw_params(struct userdata *u) { pa_sink_set_max_request_within_thread(u->sink, u->hwbuf_size - u->hwbuf_unused); if (pa_alsa_pcm_is_hw(u->pcm_handle)) - pa_sink_set_max_rewind_within_thread(u->sink, u->hwbuf_size); + pa_sink_set_max_rewind_within_thread(u->sink, 0); else { pa_log_info("Disabling rewind_within_thread for device %s", u->device_name); pa_sink_set_max_rewind_within_thread(u->sink, 0); @@ -2378,7 +2378,7 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca pa_sink_set_max_request(u->sink, u->hwbuf_size); if (pa_alsa_pcm_is_hw(u->pcm_handle)) - pa_sink_set_max_rewind(u->sink, u->hwbuf_size); + pa_sink_set_max_rewind(u->sink, 0); else { pa_log_info("Disabling rewind for device %s", u->device_name); pa_sink_set_max_rewind(u->sink, 0); -- 2.17.0