summaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/alsa/alsa-sink.c2
-rw-r--r--src/modules/module-combine.c2
-rw-r--r--src/modules/module-ladspa-sink.c4
-rw-r--r--src/modules/module-null-sink.c9
-rw-r--r--src/modules/module-remap-sink.c4
-rw-r--r--src/modules/module-solaris.c4
-rw-r--r--src/modules/oss/module-oss.c2
7 files changed, 14 insertions, 13 deletions
diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index a770f0f5..bcca57d4 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -756,7 +756,7 @@ static int update_sw_params(struct userdata *u) {
return err;
}
- pa_sink_set_max_request(u->sink, u->hwbuf_size - u->hwbuf_unused);
+ pa_sink_set_max_request_within_thread(u->sink, u->hwbuf_size - u->hwbuf_unused);
return 0;
}
diff --git a/src/modules/module-combine.c b/src/modules/module-combine.c
index 4b2d6f9b..f72223d9 100644
--- a/src/modules/module-combine.c
+++ b/src/modules/module-combine.c
@@ -649,7 +649,7 @@ static void update_max_request(struct userdata *u) {
if (max_request <= 0)
max_request = pa_usec_to_bytes(u->block_usec, &u->sink->sample_spec);
- pa_sink_set_max_request(u->sink, max_request);
+ pa_sink_set_max_request_within_thread(u->sink, max_request);
}
/* Called from thread context of the io thread */
diff --git a/src/modules/module-ladspa-sink.c b/src/modules/module-ladspa-sink.c
index 54a4e6cb..81546ff4 100644
--- a/src/modules/module-ladspa-sink.c
+++ b/src/modules/module-ladspa-sink.c
@@ -264,7 +264,7 @@ static void sink_input_update_max_rewind_cb(pa_sink_input *i, size_t nbytes) {
return;
pa_memblockq_set_maxrewind(u->memblockq, nbytes);
- pa_sink_set_max_rewind(u->sink, nbytes);
+ pa_sink_set_max_rewind_within_thread(u->sink, nbytes);
}
/* Called from I/O thread context */
@@ -277,7 +277,7 @@ static void sink_input_update_max_request_cb(pa_sink_input *i, size_t nbytes) {
if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
return;
- pa_sink_set_max_request(u->sink, nbytes);
+ pa_sink_set_max_request_within_thread(u->sink, nbytes);
}
/* Called from I/O thread context */
diff --git a/src/modules/module-null-sink.c b/src/modules/module-null-sink.c
index 183d4b2e..c8edd0c7 100644
--- a/src/modules/module-null-sink.c
+++ b/src/modules/module-null-sink.c
@@ -253,6 +253,7 @@ int pa__init(pa_module*m) {
pa_channel_map map;
pa_modargs *ma = NULL;
pa_sink_new_data data;
+ size_t nbytes;
pa_assert(m);
@@ -299,11 +300,11 @@ int pa__init(pa_module*m) {
pa_sink_set_rtpoll(u->sink, u->rtpoll);
pa_sink_set_latency_range(u->sink, (pa_usec_t) -1, MAX_LATENCY_USEC);
- u->block_usec = u->sink->thread_info.max_latency;
- u->sink->thread_info.max_rewind =
- u->sink->thread_info.max_request =
- pa_usec_to_bytes(u->block_usec, &u->sink->sample_spec);
+ u->block_usec = u->sink->thread_info.max_latency;
+ nbytes = pa_usec_to_bytes(u->block_usec, &u->sink->sample_spec);
+ pa_sink_set_max_rewind(u->sink, nbytes);
+ pa_sink_set_max_request(u->sink, nbytes);
if (!(u->thread = pa_thread_new(thread_func, u))) {
pa_log("Failed to create thread.");
diff --git a/src/modules/module-remap-sink.c b/src/modules/module-remap-sink.c
index 7ab81b63..8c43a72e 100644
--- a/src/modules/module-remap-sink.c
+++ b/src/modules/module-remap-sink.c
@@ -179,7 +179,7 @@ static void sink_input_update_max_rewind_cb(pa_sink_input *i, size_t nbytes) {
if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
return;
- pa_sink_set_max_rewind(u->sink, nbytes);
+ pa_sink_set_max_rewind_within_thread(u->sink, nbytes);
}
/* Called from I/O thread context */
@@ -192,7 +192,7 @@ static void sink_input_update_max_request_cb(pa_sink_input *i, size_t nbytes) {
if (!u->sink || !PA_SINK_IS_LINKED(u->sink->thread_info.state))
return;
- pa_sink_set_max_request(u->sink, nbytes);
+ pa_sink_set_max_request_within_thread(u->sink, nbytes);
}
/* Called from I/O thread context */
diff --git a/src/modules/module-solaris.c b/src/modules/module-solaris.c
index 995b3c63..e7dfc05e 100644
--- a/src/modules/module-solaris.c
+++ b/src/modules/module-solaris.c
@@ -653,7 +653,7 @@ static void thread_func(void *userdata) {
u->buffer_size = u->buffer_size * 18 / 25;
u->buffer_size -= u->buffer_size % u->frame_size;
u->buffer_size = PA_MAX(u->buffer_size, (int32_t)MIN_BUFFER_SIZE);
- pa_sink_set_max_request(u->sink, u->buffer_size);
+ pa_sink_set_max_request_within_thread(u->sink, u->buffer_size);
pa_log("EAGAIN. Buffer size is now %u bytes (%llu buffered)", u->buffer_size, buffered_bytes);
break;
default:
@@ -946,7 +946,7 @@ int pa__init(pa_module *m) {
u->sink->set_mute = sink_set_mute;
u->sink->refresh_volume = u->sink->refresh_muted = TRUE;
- u->sink->thread_info.max_request = u->buffer_size;
+ pa_sink_set_max_request(u->sink, u->buffer_size);
u->min_request = pa_usec_to_bytes(PA_USEC_PER_SEC / MAX_RENDER_HZ, &ss);
} else
u->sink = NULL;
diff --git a/src/modules/oss/module-oss.c b/src/modules/oss/module-oss.c
index 7bce8d00..f67f47e1 100644
--- a/src/modules/oss/module-oss.c
+++ b/src/modules/oss/module-oss.c
@@ -1388,7 +1388,7 @@ int pa__init(pa_module*m) {
pa_sink_set_rtpoll(u->sink, u->rtpoll);
u->sink->refresh_volume = TRUE;
- u->sink->thread_info.max_request = u->out_hwbuf_size;
+ pa_sink_set_max_request(u->sink, u->out_hwbuf_size);
if (use_mmap)
u->out_mmap_memblocks = pa_xnew0(pa_memblock*, u->out_nfrags);