Re: [pulseaudio-discuss] [PATCH 0/3] Results from debugging a rewind problem

2011-10-03 Thread Colin Guthrie
'Twas brillig, and Tanu Kaskinen at 29/09/11 16:54 did gyre and gimble:
 module-null-sink has a bug (fix to be posted later) that
 causes it to use 10 second buffer instead of the intended 2
 second buffer. That's actually sort of nice, because that
 made another bug visible. When moving streams away from the
 null sink, streams sometimes played silence for a while to
 the new sink. The culprit turned out to be a bug in rewind
 handling when a stream moving is finished. The first patch
 fixes that.
 
 The second patch just adds some documentation and FIXME
 notes - a result of thinking through what really should
 happen when a stream is moved.
 
 The third patch adds some assistance for debugging future
 bugs. The added memblockq information was successfully used
 in debugging this rewinding bug.

Incidentally, I'm currently fiddling about with a problem I'm seeing
with SDL audio (using the built in pulse support) under a VM.

Basically the problem is about a 0.4s delay in the audio. I cannot
reproduce on my own (bare-metal) machine with or without tsched=0 (IIRC
VMs disable tsched automatically).

When the problem happens it is preceded by the message relating to being
woken up by the alsa driver but with no data to write.

This happens on both the snd-intel8x0 and snd-hda-intel h/w (VirtualBox
supports both as emulated devices)

I'm not sure why but I have got half an inkling this is related to
rewinding behaviour (i.e. rewinding too far and then having to play
through the silence this results in, which results in the delay).

Does anyone have any ideas about this?


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
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH 0/3] Results from debugging a rewind problem

2011-10-01 Thread Colin Guthrie
'Twas brillig, and Tanu Kaskinen at 29/09/11 16:54 did gyre and gimble:
 module-null-sink has a bug (fix to be posted later) that
 causes it to use 10 second buffer instead of the intended 2
 second buffer. That's actually sort of nice, because that
 made another bug visible. When moving streams away from the
 null sink, streams sometimes played silence for a while to
 the new sink. The culprit turned out to be a bug in rewind
 handling when a stream moving is finished. The first patch
 fixes that.
 
 The second patch just adds some documentation and FIXME
 notes - a result of thinking through what really should
 happen when a stream is moved.
 
 The third patch adds some assistance for debugging future
 bugs. The added memblockq information was successfully used
 in debugging this rewinding bug.
 
 Tanu Kaskinen (3):
   sink: Move updating the requested latency after the rewind request
 when finishing a stream move.
   sink: Add some comments about the rewind handling during stream
 moves.
   memblockq: Improve debuggability by storing a name and a sample spec.
 
  src/modules/echo-cancel/module-echo-cancel.c |8 +-
  src/modules/module-combine-sink.c|3 +-
  src/modules/module-equalizer-sink.c  |4 +-
  src/modules/module-ladspa-sink.c |2 +-
  src/modules/module-loopback.c|3 +-
  src/modules/module-virtual-sink.c|2 +-
  src/modules/module-virtual-source.c  |4 +-
  src/modules/rtp/module-rtp-recv.c|3 +-
  src/modules/rtp/module-rtp-send.c|3 +-
  src/pulse/stream.c   |3 +-
  src/pulsecore/memblockq.c|   15 +++-
  src/pulsecore/memblockq.h|   11 ++-
  src/pulsecore/play-memchunk.c|2 +-
  src/pulsecore/protocol-esound.c  |6 +-
  src/pulsecore/protocol-http.c|3 +-
  src/pulsecore/protocol-native.c  |   12 +++-
  src/pulsecore/protocol-simple.c  |6 +-
  src/pulsecore/sink-input.c   |   24 +---
  src/pulsecore/sink.c |   87 
 --
  src/pulsecore/sound-file-stream.c|2 +-
  src/pulsecore/source-output.c|6 +-
  src/tests/memblockq-test.c   |7 ++-
  22 files changed, 167 insertions(+), 49 deletions(-)
 


Thanks for this.

All three patches pushed now. I think the comment formatting is fine,
although if there is general consensus on widening the standard comment
width, we could clean it up later if someone cares enough.

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
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss