Bug 6442 - Firmware should decode to PCM even when paused
: Firmware should decode to PCM even when paused
Status: RESOLVED WONTFIX
Product: SB 2/3
Classification: Unclassified
Component: Audio
: 85
: Macintosh Other
: P2 enhancement (vote)
: 8.1.0
Assigned To: Felix Mueller
:
Depends on:
Blocks: 4677
  Show dependency treegraph
 
Reported: 2007-12-21 16:25 UTC by Andy Grundman
Modified: 2010-05-14 14:07 UTC (History)
5 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Grundman 2007-12-21 16:25:17 UTC
The firmware should always try to fill the output buffer even when paused.  The current implementation causes some issues when you have a codec with an output threshold (ogg, wma, and high-rate flac) playing on an SB and a Transporter synced, because they decode at different rates due to the CPU speed difference.  

I have not tested if Alan's sync fixes handle this case or not, so it may not be as big of a problem anymore.
Comment 1 Blackketter Dean 2007-12-27 12:34:35 UTC
Sean: did your recent transporter changes address this? 

Should we be fixing this for 7.0?
Comment 2 Sean Adams 2007-12-27 14:40:00 UTC
No but it's something we should look at in the future to improve syncing, as this would make the startup more deterministic. It would ensure that Transporter and Squeezebox have the same startup latency, even if they are decoding different formats. It also would reduce the chance of under-running the decode buffer if the codec is lagging. If this were addressed then we should not need the kludgy "threshold" setting. 

It would also reduce track startup time by perhaps 50-100ms, because the decoder would be getting a head start while the streambuf is being filled.

Architecturally it is the Right Thing to do, although there may have been some implementation challenge I'm not aware of.
Comment 3 Alan Young 2008-01-01 05:00:41 UTC
This would certainly be a help but there are some implications for the sync code. Squeezeslave already does this and one has to wait quite a while for the track to start, because the decode buffer does not reach the required fullness to trigger track-start until the output buffer has been filled. This is especially a problem for radio stations because of the real-time nature of the feed. Fixing this is not a big deal - it just needs to be considered as part of the work.
Comment 4 Chris Owens 2008-06-04 16:48:51 UTC
Too risky to fix, and any problems will be taken care of by Alan Young's 'new streaming' feature in 7.2
Comment 5 Chris Owens 2008-06-04 16:54:33 UTC
Sean notes that this will improve new-track startup time for the first track or when skipping to a new track, so it is worthwhile.

This has to include a change to the behavior of the STMl packet to be sent after a certain number of bytes received instead of based on buffer fullness status.
Comment 6 Richard Titmuss 2008-11-07 04:27:45 UTC
The is fixed for squeezeplay in jive r3307, for 7.3. We should evaluate how well this fix works, and port it to ip3k in a later release:

> Decode to PCM even when paused. This fixes a couple of bugs, an audio glitch
> when playback starts and avoiding an auto-pause (that never resumed) on an 
> audio underrun.
> 
> A delay is still needed before the decoder starts, to prevent immediate 
> decoder underruns at the start of a track. Also (at least on ip3k) some
> decoders assume sufficient data to parse the headers at the start of a track.
> 
> The auto start threshold/STMl has been changed to trigger on the bytes 
> received, not the fullness of the decode buffer. A future improvement
> maybe to trigger on the fullness of the output buffer, but Alan 
> says that this will require a SC change and should be done in all the
> supported player software (squeezeplay, ip3k, etc) at the same time.

Comment 7 James Richardson 2008-11-10 09:52:42 UTC
Richard has implemented this for SqueezePlay.  once it is verified this should be back ported for Transporter
Comment 8 Keith Briscoe 2008-11-10 13:44:44 UTC
Shouldn't this also be backported for other players?  Although the original case notes specifiy the Transporter, as I understand it, this could impact any two players with underlying hardware differences: e.g. SB3 and Controller, etc.
Comment 9 Sean Adams 2008-11-10 14:18:03 UTC
(In reply to comment #8)
> Shouldn't this also be backported for other players?  Although the original
> case notes specifiy the Transporter, as I understand it, this could impact any
> two players with underlying hardware differences: e.g. SB3 and Controller, etc.
> 

yes, this would apply to all products.
Comment 10 James Richardson 2008-12-19 08:02:51 UTC
Changing target to next release
Comment 11 Richard Titmuss 2009-06-09 11:55:15 UTC
Felix, we should consider this for 8.0 firmware in ip3k.
Comment 12 James Richardson 2009-06-10 13:28:53 UTC
Targeting based on engineering discussion
Comment 13 rpadula 2009-06-15 06:21:02 UTC
I posted this to bug#897 and it applies here as well.  I'm going through the bugs that involve all of the problems in my system and responding.  So far I'm up to Bug#10682, #19680,#983,#9807,and now#6442.  There are different responses in these various bugs.

This is not and has never been fixed in my system.  I have called, writtten and so many bugs have been opened, closed that I can't track them any more.  This has been going on since 7.1!!!!  I have a controller that is a useless paperweight.  I have thousands of dollars in boxes that give me constant aggravation.  At it's best I can sync two or maybe three players.  At it's worst, like now, the system has been shut down for the weekend.  I bought a new IMAC and configured it with customer service on friday 6/12 with the latest 7.3.3 nightly.
Comment 14 Alan Young 2010-05-07 10:20:15 UTC
All new Squeezebox products are likely to be based on the SqueezePlay platform.
We do not plan to implement any further enhancements to the ip3k firmware or
which are targeted specifically at ip3k-based products.
Comment 15 Keith Briscoe 2010-05-14 14:07:52 UTC
I request that this be reclassified as a bug (and reopened), because the current firmware can have audible sync problems until this is fixed.  Admittedly this is very codec-dependent and can often be worked around with server-side transcoding, but I still think fixing it is "The Right Think to Do" (also sprach Sean).