From 9883345a35b5a146c917c5df7e15430b2d500190 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 29 Oct 2007 11:07:01 +0100 Subject: Fix unexpected assert with pulse plugin This patch fixes the unexpected assert call at calling snd_pcm_hw_params in PREPARED state. Since multiple hw_params calls are allowed, the pulse plugin shouldn't call assert. Handled in ALSA bug#3470. From: Sean McNamara --- pulse/pcm_pulse.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'pulse') diff --git a/pulse/pcm_pulse.c b/pulse/pcm_pulse.c index 96ef6bc..7d8f59e 100644 --- a/pulse/pcm_pulse.c +++ b/pulse/pcm_pulse.c @@ -490,15 +490,18 @@ finish: static int pulse_hw_params(snd_pcm_ioplug_t *io, snd_pcm_hw_params_t *params) { snd_pcm_pulse_t *pcm = io->private_data; + snd_pcm_t *base = io->pcm; int err = 0; assert(pcm); assert(pcm->p); + //Resolving bugtrack ID 0003470 + if(!(base && snd_pcm_state(base) == SND_PCM_STATE_PREPARED)) + assert(!pcm->stream); + pa_threaded_mainloop_lock(pcm->p->mainloop); - assert(!pcm->stream); - pcm->frame_size = (snd_pcm_format_physical_width(io->format) * io->channels) / 8; switch (io->format) { -- cgit