diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/module-alsa-sink.c | 6 | ||||
-rw-r--r-- | src/modules/module-alsa-source.c | 6 | ||||
-rw-r--r-- | src/modules/module-combine.c | 2 | ||||
-rw-r--r-- | src/modules/module-console-kit.c | 22 | ||||
-rw-r--r-- | src/modules/module-ladspa-sink.c | 4 | ||||
-rw-r--r-- | src/modules/module-remap-sink.c | 4 | ||||
-rw-r--r-- | src/modules/module-sine.c | 2 | ||||
-rw-r--r-- | src/modules/module-x11-xsmp.c | 19 | ||||
-rw-r--r-- | src/modules/rtp/module-rtp-recv.c | 2 |
9 files changed, 44 insertions, 23 deletions
diff --git a/src/modules/module-alsa-sink.c b/src/modules/module-alsa-sink.c index 6fa45e32..3fa0b5db 100644 --- a/src/modules/module-alsa-sink.c +++ b/src/modules/module-alsa-sink.c @@ -287,7 +287,8 @@ static int mmap_write(struct userdata *u, pa_usec_t *sleep_usec, pa_bool_t polle if (polled) pa_log("ALSA woke us up to write new data to the device, but there was actually nothing to write! " - "Most likely this is an ALSA driver bug. Please report this issue to the PulseAudio developers."); + "Most likely this is an ALSA driver bug. Please report this issue to the ALSA developers. " + "We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail_update() returned 0."); break; } @@ -409,7 +410,8 @@ static int unix_write(struct userdata *u, pa_usec_t *sleep_usec, pa_bool_t polle if (polled) pa_log("ALSA woke us up to write new data to the device, but there was actually nothing to write! " - "Most likely this is an ALSA driver bug. Please report this issue to the PulseAudio developers."); + "Most likely this is an ALSA driver bug. Please report this issue to the ALSA developers. " + "We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail_update() returned 0."); break; } diff --git a/src/modules/module-alsa-source.c b/src/modules/module-alsa-source.c index 768c8c19..22e9ebfc 100644 --- a/src/modules/module-alsa-source.c +++ b/src/modules/module-alsa-source.c @@ -274,7 +274,8 @@ static int mmap_read(struct userdata *u, pa_usec_t *sleep_usec, pa_bool_t polled if (polled) pa_log("ALSA woke us up to read new data from the device, but there was actually nothing to read! " - "Most likely this is an ALSA driver bug. Please report this issue to the PulseAudio device."); + "Most likely this is an ALSA driver bug. Please report this issue to the ALSA developers. " + "We were woken up with POLLIN set -- however a subsequent snd_pcm_avail_update() returned 0."); break; } @@ -381,7 +382,8 @@ static int unix_read(struct userdata *u, pa_usec_t *sleep_usec, pa_bool_t polled if (polled) pa_log("ALSA woke us up to read new data from the device, but there was actually nothing to read! " - "Most likely this is an ALSA driver bug. Please report this issue to the PulseAudio developers."); + "Most likely this is an ALSA driver bug. Please report this issue to the ALSA developers. " + "We were woken up with POLLIN set -- however a subsequent snd_pcm_avail_update() returned 0."); return work_done; } diff --git a/src/modules/module-combine.c b/src/modules/module-combine.c index d61d127a..fa807815 100644 --- a/src/modules/module-combine.c +++ b/src/modules/module-combine.c @@ -504,7 +504,7 @@ static void sink_input_state_change_cb(pa_sink_input *i, pa_sink_input_state_t s * we are heard right-away. */ if (PA_SINK_INPUT_IS_LINKED(state) && i->thread_info.state == PA_SINK_INPUT_INIT) - pa_sink_input_request_rewind(i, 0, FALSE, TRUE); + pa_sink_input_request_rewind(i, 0, FALSE, TRUE, TRUE); } /* Called from thread context */ diff --git a/src/modules/module-console-kit.c b/src/modules/module-console-kit.c index e1933c28..4f3ed8dd 100644 --- a/src/modules/module-console-kit.c +++ b/src/modules/module-console-kit.c @@ -63,6 +63,7 @@ struct session { }; struct userdata { + pa_module *module; pa_core *core; pa_dbus_connection *connection; pa_hashmap *sessions; @@ -73,7 +74,7 @@ static void add_session(struct userdata *u, const char *id) { DBusMessage *m = NULL, *reply = NULL; uint32_t uid; struct session *session; - char *t; + pa_client_new_data data; dbus_error_init (&error); @@ -109,11 +110,19 @@ static void add_session(struct userdata *u, const char *id) { session = pa_xnew(struct session, 1); session->id = pa_xstrdup(id); - t = pa_sprintf_malloc("ConsoleKit Session %s", id); - session->client = pa_client_new(u->core, __FILE__, t); - pa_xfree(t); - - pa_proplist_sets(session->client->proplist, "console-kit.session", id); + pa_client_new_data_init(&data); + data.module = u->module; + data.driver = __FILE__; + pa_proplist_setf(data.proplist, PA_PROP_APPLICATION_NAME, "ConsoleKit Session %s", id); + pa_proplist_sets(data.proplist, "console-kit.session", id); + session->client = pa_client_new(u->core, &data); + pa_client_new_data_done(&data); + + if (!session->client) { + pa_xfree(session->id); + pa_xfree(session); + goto fail; + } pa_hashmap_put(u->sessions, session->id, session); @@ -295,6 +304,7 @@ int pa__init(pa_module*m) { m->userdata = u = pa_xnew(struct userdata, 1); u->core = m->core; + u->module = m; u->connection = connection; u->sessions = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func); diff --git a/src/modules/module-ladspa-sink.c b/src/modules/module-ladspa-sink.c index a27ed712..4209e991 100644 --- a/src/modules/module-ladspa-sink.c +++ b/src/modules/module-ladspa-sink.c @@ -144,7 +144,7 @@ static void sink_request_rewind(pa_sink *s) { pa_assert_se(u = s->userdata); /* Just hand this one over to the master sink */ - pa_sink_input_request_rewind(u->sink_input, s->thread_info.rewind_nbytes + pa_memblockq_get_length(u->memblockq), TRUE, FALSE); + pa_sink_input_request_rewind(u->sink_input, s->thread_info.rewind_nbytes + pa_memblockq_get_length(u->memblockq), TRUE, FALSE, FALSE); } /* Called from I/O thread context */ @@ -355,7 +355,7 @@ static void sink_input_state_change_cb(pa_sink_input *i, pa_sink_input_state_t s if (PA_SINK_INPUT_IS_LINKED(state) && i->thread_info.state == PA_SINK_INPUT_INIT) { pa_log_debug("Requesting rewind due to state change."); - pa_sink_input_request_rewind(i, 0, FALSE, TRUE); + pa_sink_input_request_rewind(i, 0, FALSE, TRUE, TRUE); } } diff --git a/src/modules/module-remap-sink.c b/src/modules/module-remap-sink.c index 976a8ce5..ae05f078 100644 --- a/src/modules/module-remap-sink.c +++ b/src/modules/module-remap-sink.c @@ -119,7 +119,7 @@ static void sink_request_rewind(pa_sink *s) { pa_sink_assert_ref(s); pa_assert_se(u = s->userdata); - pa_sink_input_request_rewind(u->sink_input, s->thread_info.rewind_nbytes, TRUE, FALSE); + pa_sink_input_request_rewind(u->sink_input, s->thread_info.rewind_nbytes, TRUE, FALSE, FALSE); } /* Called from I/O thread context */ @@ -270,7 +270,7 @@ static void sink_input_state_change_cb(pa_sink_input *i, pa_sink_input_state_t s if (PA_SINK_INPUT_IS_LINKED(state) && i->thread_info.state == PA_SINK_INPUT_INIT) { pa_log_debug("Requesting rewind due to state change."); - pa_sink_input_request_rewind(i, 0, FALSE, TRUE); + pa_sink_input_request_rewind(i, 0, FALSE, TRUE, TRUE); } } diff --git a/src/modules/module-sine.c b/src/modules/module-sine.c index 3b0dc352..2ea78da2 100644 --- a/src/modules/module-sine.c +++ b/src/modules/module-sine.c @@ -115,7 +115,7 @@ static void sink_input_state_change_cb(pa_sink_input *i, pa_sink_input_state_t s * we are heard right-away. */ if (PA_SINK_INPUT_IS_LINKED(state) && i->thread_info.state == PA_SINK_INPUT_INIT) - pa_sink_input_request_rewind(i, 0, FALSE, TRUE); + pa_sink_input_request_rewind(i, 0, FALSE, TRUE, TRUE); } int pa__init(pa_module*m) { diff --git a/src/modules/module-x11-xsmp.c b/src/modules/module-x11-xsmp.c index 57d182fd..5fc8047d 100644 --- a/src/modules/module-x11-xsmp.c +++ b/src/modules/module-x11-xsmp.c @@ -117,13 +117,14 @@ static void new_ice_connection(IceConn connection, IcePointer client_data, Bool int pa__init(pa_module*m) { pa_modargs *ma = NULL; - char t[256], *vendor, *client_id, *k; + char t[256], *vendor, *client_id; SmcCallbacks callbacks; SmProp prop_program, prop_user; SmProp *prop_list[2]; SmPropValue val_program, val_user; struct userdata *u; const char *e; + pa_client_new_data data; pa_assert(m); @@ -198,16 +199,22 @@ int pa__init(pa_module*m) { SmcSetProperties(u->connection, PA_ELEMENTSOF(prop_list), prop_list); pa_log_info("Connected to session manager '%s' as '%s'.", vendor = SmcVendor(u->connection), client_id); - k = pa_sprintf_malloc("XSMP Session on %s as %s", vendor, client_id); - u->client = pa_client_new(u->core, __FILE__, k); - pa_xfree(k); - pa_proplist_sets(u->client->proplist, "xsmp.vendor", vendor); - pa_proplist_sets(u->client->proplist, "xsmp.client.id", client_id); + pa_client_new_data_init(&data); + data.module = m; + data.driver = __FILE__; + pa_proplist_setf(data.proplist, PA_PROP_APPLICATION_NAME, "XSMP Session on %s as %s", vendor, client_id); + pa_proplist_sets(data.proplist, "xsmp.vendor", vendor); + pa_proplist_sets(data.proplist, "xsmp.client.id", client_id); + u->client = pa_client_new(u->core, &data); + pa_client_new_data_done(&data); free(vendor); free(client_id); + if (!u->client) + goto fail; + pa_modargs_free(ma); return 0; diff --git a/src/modules/rtp/module-rtp-recv.c b/src/modules/rtp/module-rtp-recv.c index e35773cc..478e0a32 100644 --- a/src/modules/rtp/module-rtp-recv.c +++ b/src/modules/rtp/module-rtp-recv.c @@ -313,7 +313,7 @@ static int rtpoll_work_cb(pa_rtpoll_item *i) { if (pa_memblockq_is_readable(s->memblockq) && s->sink_input->thread_info.underrun_for > 0) { pa_log_debug("Requesting rewind due to end of underrun"); - pa_sink_input_request_rewind(s->sink_input, 0, FALSE, TRUE); + pa_sink_input_request_rewind(s->sink_input, 0, FALSE, TRUE, FALSE); } return 1; |