[pulseaudio-discuss] thank you all for a nice summer of code

2012-08-30 Thread rong deng
Hi PulseAudio community,

It's a great honour for me to be selected as this year's google summer
of code on PulseAudio project and now GSoC is nearing the end. I would
say it's a nice experience for me. I'm involved in the mailing list
discussion, get used to talk on IRC room, I've never done this before
:) Everyone here is quite nice, whenever I got a question, I can ask
and also everyone is sharing his/her tips, e.g. I once asked how to
use the git related tools and many people respond. I'll still be
around, looking for things that i'm capable of to fix or to improve.
Thank you guys! I had a great summer, and hope you had too. :)

Thanks!
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH v1 00/18] Revisiting Bluetooth modules

2012-08-30 Thread Mikel Astiz
Hi,

On Mon, Aug 27, 2012 at 5:23 PM, Mikel Astiz  wrote:
> From: Mikel Astiz 
>
> This patchset revisits the mapping between Bluetooth (BT) and PulseAudio (PA) 
> states, as well as how the PA infrastructure and APIs fit the BT use-cases, 
> including desktop and IVI use-cases. The topic has already been discussed 
> several times in the mailing-list and IRC.

I am planning to send v2 of this patches tomorrow so please don't
review or push any of these patches.

Cheers,
Mikel
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Multiple PulseAudio bugs affecting mplayer2 users

2012-08-30 Thread Tanu Kaskinen
On Sun, 2012-07-29 at 01:12 +0300, Uoti Urpala wrote:
> From 2a76e113939e9d2d7dc7deda69c59762faa75ad6 Mon Sep 17 00:00:00 2001
> From: Uoti Urpala 
> Date: Sat, 28 Jul 2012 23:26:21 +0300
> Subject: [PATCH 2/3] core: fix broken rewinds after sink suspend
> 
> pa_sink_input_request_rewind() set certain state in the sink_input
> object, asked the sink for a rewind, and relied on the sink then
> calling pa_sink_input_process_rewind() to clear the state set earlier.
> However, when uncorking a stream on a suspended sink, a rewind request
> occurs while the sink is still in suspend state. The sink ignores the
> request and the process_rewind() function it not called. In this case
> nothing would clear the state of the sink_input object, in particular
> sink_input->thread_info->rewrite_nbytes == -1. While this state was
> set, further calls to pa_sink_input_process_rewind() would not ask the
> sink to rewind. Thus rewinds for the stream would be permanently
> broken, at least until some external source (like another stream)
> triggers a rewind on the sink and it calls process_rewind.
> 
> Rewrite the pa_sink_input_request_rewind logic so that it always asks
> the sink for a rewind; possibly asking twice should not be harmful as
> the sink already combines requests. This ensures such "deadlock"
> between the objects cannot occur. However, there is still the problem
> that the state from an ignored request may be combined with another
> request done significantly later; but at least this breaks at most one
> rewind and will not cause a catastrophic permanent broken state.
> Possibly this could be avoided by detecting a suspended sink and
> either resetting state or calling process_rewind directly, but I
> haven't tried to investigate that.

I sent a patch that makes sinks to process all rewind requests, even
when suspended. I think that should fix these issues.

-- 
Tanu

___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] [PATCH] sink: Process rewind requests also when suspended.

2012-08-30 Thread Tanu Kaskinen
When a rewind is requested on a sink input, the request parameters are
stored in the pa_sink_input struct. The parameters are reset during
rewind processing, and if the sink decides to ignore the rewind
request due to being suspended, stale parameters are left in
pa_sink_input. It's particularly problematic if the rewrite_bytes
parameter is left at -1, because that will prevent all future rewind
processing on that sink input. So, in order to avoid stale parameters,
every rewind request needs to be processed, even if the sink is
suspended.

Reported-by: Uoti Urpala
---
 src/modules/alsa/alsa-sink.c |   14 ++
 src/modules/jack/module-jack-sink.c  |5 ++---
 src/modules/macosx/module-coreaudio-device.c |9 ++---
 src/modules/module-combine-sink.c|5 ++---
 src/modules/module-esound-sink.c |5 ++---
 src/modules/module-null-sink.c   |   22 +-
 src/modules/module-pipe-sink.c   |7 +++
 src/modules/module-solaris.c |   13 -
 src/modules/module-tunnel.c  |5 ++---
 src/modules/module-waveout.c |9 ++---
 src/modules/oss/module-oss.c |5 ++---
 src/modules/raop/module-raop-sink.c  |5 ++---
 src/modules/xen/module-xenpv-sink.c  |7 +++
 src/pulsecore/sink.c |3 ---
 14 files changed, 57 insertions(+), 57 deletions(-)

diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index 544399e..b709e01 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -1612,6 +1612,11 @@ static int process_rewind(struct userdata *u) {
 size_t rewind_nbytes, unused_nbytes, limit_nbytes;
 pa_assert(u);
 
+if (!PA_SINK_IS_OPENED(u->sink->thread_info.state)) {
+pa_sink_process_rewind(u->sink, 0);
+return 0;
+}
+
 /* Figure out how much we shall rewind and reset the counter */
 rewind_nbytes = u->sink->thread_info.rewind_nbytes;
 
@@ -1691,16 +1696,17 @@ static void thread_func(void *userdata) {
 pa_log_debug("Loop");
 #endif
 
+if (PA_UNLIKELY(u->sink->thread_info.rewind_requested)) {
+if (process_rewind(u) < 0)
+goto fail;
+}
+
 /* Render some data and write it to the dsp */
 if (PA_SINK_IS_OPENED(u->sink->thread_info.state)) {
 int work_done;
 pa_usec_t sleep_usec = 0;
 pa_bool_t on_timeout = pa_rtpoll_timer_elapsed(u->rtpoll);
 
-if (PA_UNLIKELY(u->sink->thread_info.rewind_requested))
-if (process_rewind(u) < 0)
-goto fail;
-
 if (u->use_mmap)
 work_done = mmap_write(u, &sleep_usec, revents & POLLOUT, 
on_timeout);
 else
diff --git a/src/modules/jack/module-jack-sink.c 
b/src/modules/jack/module-jack-sink.c
index f18ff6e..028c86f 100644
--- a/src/modules/jack/module-jack-sink.c
+++ b/src/modules/jack/module-jack-sink.c
@@ -229,9 +229,8 @@ static void thread_func(void *userdata) {
 for (;;) {
 int ret;
 
-if (PA_SINK_IS_OPENED(u->sink->thread_info.state))
-if (u->sink->thread_info.rewind_requested)
-pa_sink_process_rewind(u->sink, 0);
+if (u->sink->thread_info.rewind_requested)
+pa_sink_process_rewind(u->sink, 0);
 
 if ((ret = pa_rtpoll_run(u->rtpoll, TRUE)) < 0)
 goto fail;
diff --git a/src/modules/macosx/module-coreaudio-device.c 
b/src/modules/macosx/module-coreaudio-device.c
index 6d39158..6d36a6a 100644
--- a/src/modules/macosx/module-coreaudio-device.c
+++ b/src/modules/macosx/module-coreaudio-device.c
@@ -280,9 +280,6 @@ static int sink_process_msg(pa_msgobject *o, int code, void 
*data, int64_t offse
 pa_assert(sink);
 
 if (PA_SINK_IS_OPENED(sink->pa_sink->thread_info.state)) {
-if (sink->pa_sink->thread_info.rewind_requested)
-pa_sink_process_rewind(sink->pa_sink, 0);
-
 audio_chunk.memblock = 
pa_memblock_new_fixed(u->module->core->mempool, buf->mData, buf->mDataByteSize, 
FALSE);
 audio_chunk.length = buf->mDataByteSize;
 audio_chunk.index = 0;
@@ -664,8 +661,14 @@ static void thread_func(void *userdata) {
 pa_thread_mq_install(&u->thread_mq);
 
 for (;;) {
+coreaudio_sink *ca_sink;
 int ret;
 
+PA_LLIST_FOREACH(ca_sink, u->sinks) {
+if (ca_sink->pa_sink->thread_info.rewind_requested)
+pa_sink_process_rewind(ca_sink->pa_sink, 0);
+}
+
 ret = pa_rtpoll_run(u->rtpoll, TRUE);
 
 if (ret < 0)
diff --git a/src/modules/module-combine-sink.c 
b/src/modules/module-combine-sink.c
index dec2279..8847077 100644
--- a/src/modules/module-combine-sink.c
+++ b/src/modules/module-combine-sink.c
@@ -

Re: [pulseaudio-discuss] [PATCH] sink: Remove an incorrect FIXME comment.

2012-08-30 Thread Tanu Kaskinen
On Fri, 2012-08-24 at 16:19 +0300, Tanu Kaskinen wrote:
> The problem that the comment mentions doesn't actually
> exist, because when the sink latency is changed to a smaller
> value, the sink implementor will request the required
> rewind.

Pushed.

-- 
Tanu

___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss