From 2d97e7522e6d075e5784659ce538e9dd194e5eae Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 11 Dec 2004 16:48:45 +0000 Subject: * 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 --- polyp/alsa-util.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'polyp/alsa-util.c') 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); -- cgit