From 295996481a3cfef9fd702efa989a2585b3f94aca Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 15 Mar 2009 15:47:45 +0100 Subject: [PATCH] alsa: Simplify alsa_open(). No need to call snd_pcm_info() as we do not use it anyway. --- alsa_write.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/alsa_write.c b/alsa_write.c index 3a1e76e6..d65cfb4d 100644 --- a/alsa_write.c +++ b/alsa_write.c @@ -62,7 +62,6 @@ static int alsa_open(struct writer_node *w) snd_pcm_sw_params_t *swparams; snd_pcm_uframes_t buffer_size, start_threshold, stop_threshold; int err; - snd_pcm_info_t *info; snd_pcm_uframes_t period_size; struct private_alsa_write_data *pad = para_calloc(sizeof(struct private_alsa_write_data)); @@ -79,13 +78,10 @@ static int alsa_open(struct writer_node *w) pad->channels = conf->channels_arg; PARA_INFO_LOG("%d channel(s), %dHz\n", pad->channels, pad->samplerate); w->private_data = pad; - snd_pcm_info_alloca(&info); err = snd_pcm_open(&pad->handle, conf->device_arg, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK); if (err < 0) return -E_PCM_OPEN; - if ((err = snd_pcm_info(pad->handle, info)) < 0) - return -E_SND_PCM_INFO; snd_pcm_hw_params_alloca(&hwparams); snd_pcm_sw_params_alloca(&swparams); -- 2.39.5