[alsa-devel] issues with pulse plugin
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 couldn't add this to the bug because it was marked as resolved.
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.
Thanks,
-- Mike Gorse / AIM:linvortex / http://mgorse.freeshell.org --
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
Hi Takashi,
Can't you reopen (as feedback)?
Oh, perhaps I could; I haven't used Mantis before and didn't look that carefully :(
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?
Yes (at least with the latest hg tree that was accessible via hg-mirror a few minutes ago). I put a patch on the bug that does make things work. Test case attached (adapted from flite mostly)
At Mon, 12 Nov 2007 07:03:17 -0500 (EST), Mike Gorse wrote:
Hi Takashi,
Can't you reopen (as feedback)?
Oh, perhaps I could; I haven't used Mantis before and didn't look that carefully :(
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?
Yes (at least with the latest hg tree that was accessible via hg-mirror a few minutes ago). I put a patch on the bug that does make things work. Test case attached (adapted from flite mostly)
Thanks. The addition of the two missing parameter constraints look sane to me. Now applied to HG tree.
Takashi
participants (2)
-
Mike Gorse
-
Takashi Iwai