summaryrefslogtreecommitdiffstats
path: root/polyp/alsa-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-12-11 16:48:45 +0000
committerLennart Poettering <lennart@poettering.net>2004-12-11 16:48:45 +0000
commit2d97e7522e6d075e5784659ce538e9dd194e5eae (patch)
treeeae801072f8cd1e788fc55f8cd45230419fe4308 /polyp/alsa-util.c
parent73eabece3365c1bb47bf6b009682219c4492fda5 (diff)
* fix alsa initialisation
* add some missing zeroconf files * make module-match shut up a bit git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@318 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/alsa-util.c')
-rw-r--r--polyp/alsa-util.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/polyp/alsa-util.c b/polyp/alsa-util.c
index b6b9ac11..2894c9e8 100644
--- a/polyp/alsa-util.c
+++ b/polyp/alsa-util.c
@@ -29,6 +29,7 @@
#include "alsa-util.h"
#include "sample.h"
#include "xmalloc.h"
+#include "log.h"
/* Set the hardware parameters of the given ALSA device. Returns the
* selected fragment settings in *period and *period_size */
@@ -61,14 +62,12 @@ int pa_alsa_set_hw_params(snd_pcm_t *pcm_handle, const struct pa_sample_spec *ss
if (snd_pcm_prepare(pcm_handle) < 0)
goto finish;
- if (snd_pcm_hw_params_current(pcm_handle, hwparams) < 0)
- goto finish;
-
if (snd_pcm_hw_params_get_buffer_size(hwparams, &buffer_size) < 0 ||
snd_pcm_hw_params_get_period_size(hwparams, period_size, NULL) < 0)
goto finish;
-
- assert(buffer_size > 0 && *period_size > 0);
+
+ assert(buffer_size > 0);
+ assert(*period_size > 0);
*periods = buffer_size / *period_size;
assert(*periods > 0);