alsa: remove snd_pcm_prepare() call, it is not needed

set_hw_params already called _prepare for us and calling it twice
might cause trouble in some drivers.

See #580
This commit is contained in:
Wim Taymans 2021-01-15 16:12:42 +01:00
parent 482f96a644
commit 376436fc2c

View file

@ -1432,12 +1432,6 @@ int spa_alsa_start(struct state *state)
if (SPA_UNLIKELY(spa_log_level_enabled(state->log, SPA_LOG_LEVEL_DEBUG)))
snd_pcm_dump(state->hndl, state->output);
if ((err = snd_pcm_prepare(state->hndl)) < 0) {
spa_log_error(state->log, NAME" %p: snd_pcm_prepare error: %s", state,
snd_strerror(err));
return err;
}
state->source.func = alsa_on_timeout_event;
state->source.data = state;
state->source.fd = state->timerfd;