[alsa-devel] issues with pulse plugin

Takashi Iwai tiwai at suse.de
Mon Nov 12 08:55:27 CET 2007


At Thu, 8 Nov 2007 17:21:20 -0500 (EST),
Mike Gorse wrote:
> 
> I have run into what is basically another instance of bug 3470 
> (pulse_hw_params asserting because the stream is already initialized). 
> The application that I am working with is calling snd_pcm_hw_params each 
> time it plays a sample.  The following patch makes things work for me 
> (actually the app still doesn't work because it uses poll() in a way that 
> is incompatible with the pulse plugin, but that is a separate issue, and I 
> don't know if it should be considered a bug in the plugin.)
> 
> --- pulse/pcm_pulse.c.orig	2007-11-08 15:13:12.000000000 -0500
> +++ pulse/pcm_pulse.c	2007-11-08 15:13:12.000000000 -0500
> @@ -497,7 +497,7 @@
>       assert(pcm->p);
> 
>       //Resolving bugtrack ID 0003470
> -    if(!(base && snd_pcm_state(base) == SND_PCM_STATE_PREPARED))
> +    if(!(base && (snd_pcm_state(base) == SND_PCM_STATE_PREPARED || snd_pcm_state(base) == SND_PCM_STATE_SETUP)))
>       	assert(!pcm->stream);
> 
>       pa_threaded_mainloop_lock(pcm->p->mainloop);
> 
> --

I fixed it on HG tree now.

> 
> I couldn't add this to the bug because it was marked as resolved.

Can't you reopen (as feedback)?

> Any comments?  Or is the app behaving in a way that is counter to the 
> specification?
> 
> Also, I'm still encountering bug 2601 (a separate assert failure that 
> happens if period_size == 0) even with the patch to pcm_ioplug.c.  I think 
> that PERIOD_TIME and PERIODS need to be constrained; I added a couple of 
> comments to the bug.

Hm, does it happen with the latest HG tree, too?


Takashi


More information about the Alsa-devel mailing list