Hi Col,

Pls find attached updated patch, it works fine on my Meego platform.
Feel free to let me know if there's any risk.

--xingchao

2011/8/11 Colin Guthrie <[email protected]>:
> 'Twas brillig, and Colin Guthrie at 05/08/11 12:41 did gyre and gimble:
>> 'Twas brillig, and xing wang at 05/08/11 05:46 did gyre and gimble:
>>> Hi,
>>>
>>> Does anyone has comment on this patch?
>>
>> Sorry, I forgot about this one. I had it marked as unread, but it fell
>> of the bottom of my unread list. Thanks very much for pinging it up
again.
>>
>> I think it looks good, but I'll go over it with a few people in the next
>> few days! It's certainly a problem, so it needs fixed and this patch
>> looks like the right fix on first glance.
>
> OK, so this causes the following assert:
>
> E: [alsa-sink] sink-input.c: Assertion
> 'PA_SINK_INPUT_IS_LINKED(i->thread_info.state)' failed at
> ../../src/pulsecore/sink-input.c:1049, function
> pa_sink_input_update_max_request(). Aborting.
>
>
> This is done when a stream is in a START_CORKED state I believe (paplay
> triggered it).
>
> Either way this cannot be done yet.... can you come up with a better
> patch that doesn't break paplay and friends?
>
> Col
>
>
>
>
>
> --
>
> Colin Guthrie
> gmane(at)colin.guthr.ie
> http://colin.guthr.ie/
>
> Day Job:
>  Tribalogic Limited [http://www.tribalogic.net/]
> Open Source:
>  Mageia Contributor [http://www.mageia.org/]
>  PulseAudio Hacker [http://www.pulseaudio.org/]
>  Trac Hacker [http://trac.edgewall.org/]
>
> _______________________________________________
> pulseaudio-discuss mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
>
From e6070cf4ee84701222869944c504ab1ed86f88f9 Mon Sep 17 00:00:00 2001
From: Wang Xingchao <[email protected]>
Date: Fri, 12 Aug 2011 13:12:22 -0400
Subject: [PATCH 1/2] avoid fake rewind in corked state

sink_input_request_rewind() do nothing if in corked state. there's rewind
request need in pa_sink_input_set_state_within_thread(), so mark CORKING state
after rewinding.

Signed-off-by: Wang Xingchao <[email protected]>
---
 src/pulsecore/sink-input.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index d386b00..d9ae5b8 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -1764,8 +1764,9 @@ void pa_sink_input_set_state_within_thread(pa_sink_input *i, pa_sink_input_state
 
         /* This will tell the implementing sink input driver to rewind
          * so that the unplayed already mixed data is not lost */
+	i->thread_info.state = PA_SINK_INPUT_RUNNING;
         pa_sink_input_request_rewind(i, 0, TRUE, TRUE, FALSE);
-
+	i->thread_info.state = PA_SINK_INPUT_CORKED;
     } else if (uncorking) {
 
         i->thread_info.underrun_for = (uint64_t) -1;
-- 
1.7.1

_______________________________________________
pulseaudio-discuss mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

Reply via email to