summaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
authorJoão Paulo Rechi Vita <joao.vita@gmail.com>2008-08-15 16:23:54 -0300
committerLennart Poettering <lennart@poettering.net>2008-09-11 01:12:06 +0300
commit0d37b912ee342a8b50a25fb29fdfdcf1ddac742c (patch)
tree75f88a8402834d95e03e9eff56dbac3b465220bb /src/modules
parent435eb0711b10ac0f33051a31bd74ed1f41277aa6 (diff)
Remove PA_SINK_NETWORK flag and move the passage of streamfd to the rt thread just before the thread creation
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/module-bt-device.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/modules/module-bt-device.c b/src/modules/module-bt-device.c
index cb16601f..3881dd8b 100644
--- a/src/modules/module-bt-device.c
+++ b/src/modules/module-bt-device.c
@@ -766,10 +766,6 @@ int pa__init(pa_module* m) {
pa_log_error("failed to get stream fd (%d)", e);
goto fail;
}
- u->rtpoll_item = pa_rtpoll_item_new(u->rtpoll, PA_RTPOLL_NEVER, 1);
- pollfd = pa_rtpoll_item_get_pollfd(u->rtpoll_item, NULL);
- pollfd->fd = u->stream_fd;
- pollfd->events = pollfd->revents = 0;
/* configure hw supported sample specs */
e = bt_hw_constraint(u);
@@ -786,7 +782,7 @@ int pa__init(pa_module* m) {
pa_sink_new_data_set_sample_spec(&data, &u->ss);
pa_proplist_sets(data.proplist, PA_PROP_DEVICE_STRING, u->name);
pa_proplist_setf(data.proplist, PA_PROP_DEVICE_DESCRIPTION, "Bluetooth sink '%s' (%s)", u->name, u->addr);
- u->sink = pa_sink_new(m->core, &data, PA_SINK_HARDWARE|PA_SINK_LATENCY|PA_SINK_NETWORK);
+ u->sink = pa_sink_new(m->core, &data, PA_SINK_HARDWARE|PA_SINK_LATENCY);
pa_sink_new_data_done(&data);
if (!u->sink) {
pa_log_error("failed to create sink");
@@ -797,6 +793,11 @@ int pa__init(pa_module* m) {
pa_sink_set_asyncmsgq(u->sink, u->thread_mq.inq);
pa_sink_set_rtpoll(u->sink, u->rtpoll);
+ u->rtpoll_item = pa_rtpoll_item_new(u->rtpoll, PA_RTPOLL_NEVER, 1);
+ pollfd = pa_rtpoll_item_get_pollfd(u->rtpoll_item, NULL);
+ pollfd->fd = u->stream_fd;
+ pollfd->events = pollfd->revents = 0;
+
/* start rt thread */
if (!(u->thread = pa_thread_new(thread_func, u))) {
pa_log_error("failed to create thread");