summaryrefslogtreecommitdiffstats
path: root/pulse
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-08-22 01:13:41 +0200
committerLennart Poettering <lennart@poettering.net>2008-09-03 20:25:37 +0200
commitf27d0bea1d4cc608f49e39d64abd948744e2e25f (patch)
tree43f369b2bce5e71811030b3628e05dd2035159f5 /pulse
parent41e72433edeac26487b00a94b3b493a800d5924c (diff)
Rework hardware parameter selection
Follow more closely the real limits of PulseAudio's API.
Diffstat (limited to 'pulse')
-rw-r--r--pulse/pcm_pulse.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/pulse/pcm_pulse.c b/pulse/pcm_pulse.c
index 7d03420..fb73c82 100644
--- a/pulse/pcm_pulse.c
+++ b/pulse/pcm_pulse.c
@@ -631,8 +631,9 @@ static int pulse_hw_params(snd_pcm_ioplug_t * io,
pcm->ss.channels = io->channels;
pcm->buffer_attr.maxlength =
- (io->buffer_size * 3) / 2 * pcm->frame_size;
- pcm->buffer_attr.tlength = io->buffer_size * pcm->frame_size;
+ io->buffer_size * pcm->frame_size;
+ pcm->buffer_attr.tlength =
+ pcm->buffer_attr.maxlength;
pcm->buffer_attr.prebuf =
(io->buffer_size - io->period_size) * pcm->frame_size;
pcm->buffer_attr.minreq = io->period_size * pcm->frame_size;
@@ -741,9 +742,8 @@ static int pulse_hw_constraint(snd_pcm_pulse_t * pcm)
if (err < 0)
return err;
- /* FIXME: Investigate actual min and max */
err = snd_pcm_ioplug_set_param_minmax(io, SND_PCM_IOPLUG_HW_RATE,
- 8000, 48000);
+ 1, PA_RATE_MAX);
if (err < 0)
return err;
@@ -757,7 +757,7 @@ 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, 1024 * 1024);
+ 256, 2 * 1024 * 1024);
if (err < 0)
return err;