summaryrefslogtreecommitdiffstats
path: root/pulse
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-09-03 18:18:48 +0200
committerLennart Poettering <lennart@poettering.net>2008-09-03 20:25:38 +0200
commitc563463c89c9ee37014ba3f5b0f22df16d5b8ae0 (patch)
tree39252fe43ff0de30887639fc0ab9f29bf7dba2df /pulse
parent060e34d669ecfed6bc45b6012f824d99a8e316ac (diff)
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.
Diffstat (limited to 'pulse')
-rw-r--r--pulse/pcm_pulse.c8
1 files changed, 4 insertions, 4 deletions
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;