From c563463c89c9ee37014ba3f5b0f22df16d5b8ae0 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 3 Sep 2008 18:18:48 +0200 Subject: Adjust buffering metrics to match what PA internally uses Follow more closely the buffering metrics PA uses internally. This avoids clamping of the metricsin PA internally. --- pulse/pcm_pulse.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pulse') diff --git a/pulse/pcm_pulse.c b/pulse/pcm_pulse.c index fb73c82..6d7403c 100644 --- a/pulse/pcm_pulse.c +++ b/pulse/pcm_pulse.c @@ -631,9 +631,9 @@ static int pulse_hw_params(snd_pcm_ioplug_t * io, pcm->ss.channels = io->channels; pcm->buffer_attr.maxlength = - io->buffer_size * pcm->frame_size; + 4 * 1024 * 1024; pcm->buffer_attr.tlength = - pcm->buffer_attr.maxlength; + io->buffer_size * pcm->frame_size; pcm->buffer_attr.prebuf = (io->buffer_size - io->period_size) * pcm->frame_size; pcm->buffer_attr.minreq = io->period_size * pcm->frame_size; @@ -757,13 +757,13 @@ static int pulse_hw_constraint(snd_pcm_pulse_t * pcm) err = snd_pcm_ioplug_set_param_minmax(io, SND_PCM_IOPLUG_HW_PERIOD_BYTES, - 256, 2 * 1024 * 1024); + 128, 2 * 1024 * 1024); if (err < 0) return err; err = snd_pcm_ioplug_set_param_minmax(io, SND_PCM_IOPLUG_HW_PERIODS, - 2, 1024); + 3, 1024); if (err < 0) return err; return 0; -- cgit