[pulseaudio-tickets] [Bug 45643] padsp wrapper is racy at startup
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sat Feb 11 07:51:18 PST 2012
https://bugs.freedesktop.org/show_bug.cgi?id=45643
--- Comment #3 from Sergei Trofimovich <slyfox at inbox.ru> 2012-02-11 07:51:18 PST ---
(In reply to comment #2)
> This looks a bit odd. fd_info_new(), which is called from dsp_open(), only returns when the context is READY.
Right. Let's consider the following code:
dsp_open calls:
fd_info_new()
...
i->io_event = api->io_new(api, i->thread_fd, i->io_flags, io_event_cb, i);
Before any IO occurs the state s READY, and it's seen in trace, but later.
When io occurs 'io_event_cb' is triggered (callback called asynchronously,
right?)
Let's looks at where it does there:
io_event_cb:
// no idea what it does, but looks like it unblocks clients
pa_threaded_mainloop_signal(i->mainloop, 0);
// and then starts actual stream initialization
if (flags & PA_IO_EVENT_INPUT) {
if (!i->play_stream) {
if (create_playback_stream(i) < 0)
create_playback_stream:
// stream _DROPS_ initialization state down to: PA_STREAM_UNCONNECTED and then to PA_STREAM_CREATING
i->play_stream = pa_stream_new(i->context, stream_name(), &i->sample_spec, NULL);
pa_stream_set_state_callback(i->play_stream, stream_state_cb, i);
pa_stream_set_write_callback(i->play_stream, stream_request_cb, i);
pa_stream_set_latency_update_callback(i->play_stream, stream_latency_update_cb, i);
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the pulseaudio-bugs
mailing list