* Re: Asynchronous notification in ALSA - I/O Plugin - Pulseaudio
2008-05-19 9:38 ` Asynchronous notification in ALSA - I/O Plugin - Pulseaudio Juha Erkkilä
@ 2008-05-19 17:53 ` Pacho Ramos
2008-05-20 11:07 ` Takashi Iwai
2008-05-21 22:24 ` Lennart Poettering
2 siblings, 0 replies; 10+ messages in thread
From: Pacho Ramos @ 2008-05-19 17:53 UTC (permalink / raw)
To: General PulseAudio Discussion; +Cc: alsa-devel, Alexander Indenbaum
Have you tried with flashplayer 10 beta?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Asynchronous notification in ALSA - I/O Plugin - Pulseaudio
2008-05-19 9:38 ` Asynchronous notification in ALSA - I/O Plugin - Pulseaudio Juha Erkkilä
2008-05-19 17:53 ` Pacho Ramos
@ 2008-05-20 11:07 ` Takashi Iwai
2008-05-21 6:46 ` Juha Erkkilä
2008-05-21 22:24 ` Lennart Poettering
2 siblings, 1 reply; 10+ messages in thread
From: Takashi Iwai @ 2008-05-20 11:07 UTC (permalink / raw)
To: Juha Erkkilä; +Cc: pulseaudio-discuss, alsa-devel, Alexander Indenbaum
At Mon, 19 May 2008 12:38:39 +0300 (EEST),
Juha Erkkilä wrote:
>
> I'm trying to get Abode Flash Player working properly on a thin client,
> with sound, using Pulseaudio as a sound server. I'm using ALSA
> version 1.10.15 and Pulseaudio version 0.9.10 on Ubuntu Hardy, with
> Pulseaudio server running as a system-wide daemon on the thin client.
> I already outlined the issues on Pulseaudio mailing list on this post:
> https://tango.0pointer.de/pipermail/pulseaudio-discuss/2008-May/001793.html,
> see also Lennart Poettering's answer:
> https://tango.0pointer.de/pipermail/pulseaudio-discuss/2008-May/001796.html.
>
> I feel the proper solution would involve writing support for
> asynchronous notification into ALSA library and I/O-plugin layer.
> Currently, Pulse I/O-plugin does not work in the Flash case, because
> Flash requires the asynchronous API. On the other hand, Pulse requires
> the I/O-plugin layer to work. See the posts by Alexander Indenbaum,
> http://mailman.alsa-project.org/pipermail/alsa-devel/2008-April/007033.html,
> and Takashi Iwai,
> http://mailman.alsa-project.org/pipermail/alsa-devel/2008-April/007335.html,
> on this subject.
>
> I tried to tackle this issue, and did get the signal handling code to
> call the Flash audio callback, but I'm new to both ALSA and Pulseaudio,
> and it appears there are some issues with it I don't fully understand.
> Thus I'm asking: are there any other people who have been looking into
> this, or anyone who can tell whether this is a sane thing to do or not,
> will it require some nasty hack, or can help with some pointers to
> relevant information?
>
> I'm hoping that implementing the asynchronous API on I/O-plugin layer
> would not only fix Flash audio, but might help some other programs too
> to achieve network transparent audio.
Yeah, the async support is a big missing piece in ioplug. I didn't
think it be so important until someone told me that flash player uses
it. Sigh.
I have experimental patches to add async support to ioplug. With a
quick test using jack plugin, it seems working somehow. Will post
them alsa-devel now.
thanks,
Takashi
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Asynchronous notification in ALSA - I/O Plugin - Pulseaudio
2008-05-20 11:07 ` Takashi Iwai
@ 2008-05-21 6:46 ` Juha Erkkilä
2008-05-21 10:47 ` Takashi Iwai
0 siblings, 1 reply; 10+ messages in thread
From: Juha Erkkilä @ 2008-05-21 6:46 UTC (permalink / raw)
To: alsa-devel, Takashi Iwai; +Cc: pulseaudio-discuss, Alexander Indenbaum
----- "Takashi Iwai" <tiwai@suse.de> kirjoitti:
> Yeah, the async support is a big missing piece in ioplug. I didn't
> think it be so important until someone told me that flash player uses
> it. Sigh.
It turns out Flash version 10 beta no longer uses the asynchronous API,
so using it is an option.
> I have experimental patches to add async support to ioplug. With a
> quick test using jack plugin, it seems working somehow. Will post
> them alsa-devel now.
Thank you! I tested these with Firefox + Flash 9 + Pulseaudio, and while
sound output works, quitting any Flash application will freeze firefox.
Juha
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Asynchronous notification in ALSA - I/O Plugin - Pulseaudio
2008-05-21 6:46 ` Juha Erkkilä
@ 2008-05-21 10:47 ` Takashi Iwai
2008-05-21 22:29 ` [alsa-devel] " Lennart Poettering
0 siblings, 1 reply; 10+ messages in thread
From: Takashi Iwai @ 2008-05-21 10:47 UTC (permalink / raw)
To: Juha Erkkilä; +Cc: pulseaudio-discuss, alsa-devel, Alexander Indenbaum
At Wed, 21 May 2008 09:46:04 +0300 (EEST),
Juha Erkkilä wrote:
>
> ----- "Takashi Iwai" <tiwai@suse.de> kirjoitti:
> > Yeah, the async support is a big missing piece in ioplug. I didn't
> > think it be so important until someone told me that flash player uses
> > it. Sigh.
>
> It turns out Flash version 10 beta no longer uses the asynchronous API,
> so using it is an option.
Ah, that's good to know.
> > I have experimental patches to add async support to ioplug. With a
> > quick test using jack plugin, it seems working somehow. Will post
> > them alsa-devel now.
>
> Thank you! I tested these with Firefox + Flash 9 + Pulseaudio, and while
> sound output works, quitting any Flash application will freeze firefox.
It's a showstopper, then. Could you figure out in which code does it
freeze? My change is just to add async call, so it sounds like that
another hidden bug is hit by my change...
thanks,
Takashi
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [alsa-devel] Asynchronous notification in ALSA - I/O Plugin - Pulseaudio
2008-05-21 10:47 ` Takashi Iwai
@ 2008-05-21 22:29 ` Lennart Poettering
2008-05-22 13:11 ` Colin Guthrie
0 siblings, 1 reply; 10+ messages in thread
From: Lennart Poettering @ 2008-05-21 22:29 UTC (permalink / raw)
To: alsa-devel, pulseaudio-discuss
On Wed, 21.05.08 12:47, Takashi Iwai (tiwai@suse.de) wrote:
> > > I have experimental patches to add async support to ioplug. With a
> > > quick test using jack plugin, it seems working somehow. Will post
> > > them alsa-devel now.
> >
> > Thank you! I tested these with Firefox + Flash 9 + Pulseaudio, and while
> > sound output works, quitting any Flash application will freeze firefox.
>
> It's a showstopper, then. Could you figure out in which code does it
> freeze? My change is just to add async call, so it sounds like that
> another hidden bug is hit by my change...
That freeze is an unfixable race condition that Flash has when
shutting down audio.
See the explanation down on http://pulseaudio.org/ticket/267
Lennart
--
Lennart Poettering Red Hat, Inc.
lennart [at] poettering [dot] net ICQ# 11060553
http://0pointer.net/lennart/ GnuPG 0x1A015CC4
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [alsa-devel] Asynchronous notification in ALSA - I/O Plugin - Pulseaudio
2008-05-21 22:29 ` [alsa-devel] " Lennart Poettering
@ 2008-05-22 13:11 ` Colin Guthrie
2008-05-22 13:59 ` Lennart Poettering
0 siblings, 1 reply; 10+ messages in thread
From: Colin Guthrie @ 2008-05-22 13:11 UTC (permalink / raw)
To: pulseaudio-discuss; +Cc: alsa-devel
Lennart Poettering wrote:
> On Wed, 21.05.08 12:47, Takashi Iwai (tiwai@suse.de) wrote:
>
>>>> I have experimental patches to add async support to ioplug. With a
>>>> quick test using jack plugin, it seems working somehow. Will post
>>>> them alsa-devel now.
>>> Thank you! I tested these with Firefox + Flash 9 + Pulseaudio, and while
>>> sound output works, quitting any Flash application will freeze firefox.
>> It's a showstopper, then. Could you figure out in which code does it
>> freeze? My change is just to add async call, so it sounds like that
>> another hidden bug is hit by my change...
>
> That freeze is an unfixable race condition that Flash has when
> shutting down audio.
>
> See the explanation down on http://pulseaudio.org/ticket/267
I thought the whole point was that by adding async code to ioplug, the
libflashsupport stuff wasn't needed and flash could just use it's native
alsa support + alsa's pulse plugin.... or am I missing the point here?
Col
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [alsa-devel] Asynchronous notification in ALSA - I/O Plugin - Pulseaudio
2008-05-22 13:11 ` Colin Guthrie
@ 2008-05-22 13:59 ` Lennart Poettering
2008-05-23 9:07 ` Colin Guthrie
0 siblings, 1 reply; 10+ messages in thread
From: Lennart Poettering @ 2008-05-22 13:59 UTC (permalink / raw)
To: pulseaudio-discuss, alsa-devel
On Thu, 22.05.08 14:11, Colin Guthrie (gmane@colin.guthr.ie) wrote:
> > That freeze is an unfixable race condition that Flash has when
> > shutting down audio.
> >
> > See the explanation down on http://pulseaudio.org/ticket/267
>
> I thought the whole point was that by adding async code to ioplug, the
> libflashsupport stuff wasn't needed and flash could just use it's native
> alsa support + alsa's pulse plugin.... or am I missing the point here?
The destruction dead lock issue is present both in libflashsupport and
the native ALSA backend. It's just that it is almost never triggered
if a hw device is used.
Adobe released the sources of libflashsupport where you can actually
check this.
Lennart
--
Lennart Poettering Red Hat, Inc.
lennart [at] poettering [dot] net ICQ# 11060553
http://0pointer.net/lennart/ GnuPG 0x1A015CC4
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [alsa-devel] Asynchronous notification in ALSA - I/O Plugin - Pulseaudio
2008-05-22 13:59 ` Lennart Poettering
@ 2008-05-23 9:07 ` Colin Guthrie
0 siblings, 0 replies; 10+ messages in thread
From: Colin Guthrie @ 2008-05-23 9:07 UTC (permalink / raw)
To: pulseaudio-discuss; +Cc: alsa-devel
Lennart Poettering wrote:
> On Thu, 22.05.08 14:11, Colin Guthrie (gmane@colin.guthr.ie) wrote:
>> I thought the whole point was that by adding async code to ioplug, the
>> libflashsupport stuff wasn't needed and flash could just use it's native
>> alsa support + alsa's pulse plugin.... or am I missing the point here?
>
> The destruction dead lock issue is present both in libflashsupport and
> the native ALSA backend. It's just that it is almost never triggered
> if a hw device is used.
Ahhhhhhhhh :)
Col
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [alsa-devel] Asynchronous notification in ALSA - I/O Plugin - Pulseaudio
2008-05-19 9:38 ` Asynchronous notification in ALSA - I/O Plugin - Pulseaudio Juha Erkkilä
2008-05-19 17:53 ` Pacho Ramos
2008-05-20 11:07 ` Takashi Iwai
@ 2008-05-21 22:24 ` Lennart Poettering
2 siblings, 0 replies; 10+ messages in thread
From: Lennart Poettering @ 2008-05-21 22:24 UTC (permalink / raw)
To: alsa-devel, pulseaudio-discuss
On Mon, 19.05.08 12:38, Juha Erkkilä (juha.erkkila@opinsys.fi) wrote:
> I'm trying to get Abode Flash Player working properly on a thin client,
> with sound, using Pulseaudio as a sound server. I'm using ALSA
> version 1.10.15 and Pulseaudio version 0.9.10 on Ubuntu Hardy, with
> Pulseaudio server running as a system-wide daemon on the thin client.
> I already outlined the issues on Pulseaudio mailing list on this post:
> https://tango.0pointer.de/pipermail/pulseaudio-discuss/2008-May/001793.html,
> see also Lennart Poettering's answer:
> https://tango.0pointer.de/pipermail/pulseaudio-discuss/2008-May/001796.html.
>
> I feel the proper solution would involve writing support for
> asynchronous notification into ALSA library and I/O-plugin layer.
I disagree. (See the other mail I just posted)
> Currently, Pulse I/O-plugin does not work in the Flash case, because
> Flash requires the asynchronous API. On the other hand, Pulse requires
> the I/O-plugin layer to work. See the posts by Alexander Indenbaum,
> http://mailman.alsa-project.org/pipermail/alsa-devel/2008-April/007033.html,
> and Takashi Iwai,
> http://mailman.alsa-project.org/pipermail/alsa-devel/2008-April/007335.html,
> on this subject.
>
> I tried to tackle this issue, and did get the signal handling code to
> call the Flash audio callback, but I'm new to both ALSA and Pulseaudio,
> and it appears there are some issues with it I don't fully understand.
> Thus I'm asking: are there any other people who have been looking into
> this, or anyone who can tell whether this is a sane thing to do or not,
> will it require some nasty hack, or can help with some pointers to
> relevant information?
Actually I have been looking into this.
This doesn't really help however, since there's a unfixable race
condition in Flash shutting down audio. It's not going to be much
better than the libflashsupport code I came up with.
Adobe was informed about this. And in Flash 10 they responded to the
criticism. Flash 10 doesn't use alsa async anymore and seems to work
fine on ioplug and thus on PA.
Lennart
--
Lennart Poettering Red Hat, Inc.
lennart [at] poettering [dot] net ICQ# 11060553
http://0pointer.net/lennart/ GnuPG 0x1A015CC4
^ permalink raw reply [flat|nested] 10+ messages in thread