Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#6024 - Fix for voice crash after playback stops - take 2

Attached to Project: Rockbox
Opened by Steve Bavin (pondlife) - Tuesday, 19 September 2006, 10:59 GMT+2
Last edited by Steve Bavin (pondlife) - Wednesday, 20 September 2006, 12:55 GMT+2
Task Type Patches
Category Music playback
Status Closed
Assigned To Steve Bavin (pondlife)
Player Type All players
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

This is an addendum to  FS#5992  - http://www.rockbox.org/tracker/5992 - read that for full explanation.

The previous patch was committed too early (breaking recording) and was then partially reverted, so it was not effective against the bug it was aimed at fixing.

The problem was caused by swap_codec being called when no audio codec is loaded; thus nothing ever takes over from the voice codec and swap_codec never completes.

The attached patch resolves that bug, but may again break recording (although I cannot reproduce that here on the sim, probably because the simulator does not simulate recording enough - another job!).

Please can someone with access to a recording target test this patch and report back. I should get my H300 back soon and will test on that.

One final note: PLEASE DO NOT COMMIT THIS PATCH YET!!!
(application/octet-stream)    voicefix060919.patch (0.7 KiB)
 apps/playback.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

This task depends upon

Closed by  Steve Bavin (pondlife)
Tuesday, 26 September 2006, 09:28 GMT+2
Reason for closing:  Accepted
Additional comments about closing:  Committed, nobody has reported any problems and it fixes 3 issues.
Comment by Steve Bavin (pondlife) - Wednesday, 20 September 2006, 11:12 GMT+2
Here's a slightly updated version. I've tested this on an H340 and recording still works. Can others please test too?
Comment by Steve Bavin (pondlife) - Wednesday, 20 September 2006, 11:14 GMT+2
Patch...
(application/octet-stream)    voicefix060920.patch (2.4 KiB)
 apps/playback.c |   20 ++++++++++++--------
 apps/pcmbuf.c   |    2 +-
 2 files changed, 13 insertions(+), 9 deletions(-)

Comment by Steve Bavin (pondlife) - Wednesday, 20 September 2006, 16:23 GMT+2
Here's an updated version that will allow recording to be monitored, even if voice menus are still talking...
(application/octet-stream)    voicefix0609201.patch (3.5 KiB)
 apps/playback.c |   32 +++++++++++++++++---------------
 apps/pcmbuf.c   |    2 +-
 2 files changed, 18 insertions(+), 16 deletions(-)

Comment by Rani Hod (RaeNye) - Wednesday, 20 September 2006, 17:26 GMT+2
Bottom line: doesn't crash X5.

All OK when recording Mic/FM radio without voice;

If voice plays while entering recording screen:
- the peakmeters are max'ed out
- recording comes out as noise
- voice doesn't play anymore
- voice thread is running continuously (*R)
- CPU boost is stuck at 1
but still player doesn't crash.
Comment by Steve Bavin (pondlife) - Wednesday, 20 September 2006, 19:00 GMT+2
Hi Rani,

I can't reproduce anything like that on the H300. Does it happen if you just enable voice menus (rather than file/dir voicing)? I assume you hover on "Recording Screen" and then press select before speech completes?
Comment by Steve Bavin (pondlife) - Wednesday, 20 September 2006, 19:31 GMT+2
OK, I've added waits to ensure that both audio and voice playback completes before recording begins. Please try this version of the patch.
(application/octet-stream)    voicefix0609203.patch (6 KiB)
 apps/playback.c |   59 ++++++++++++++++++++++++++++++--------------------------
 apps/pcmbuf.c   |    4 +--
 2 files changed, 34 insertions(+), 29 deletions(-)

Comment by Rani Hod (RaeNye) - Thursday, 21 September 2006, 19:41 GMT+2
make says:
...
CC pcmbuf.c
pcmbuf.c: In function `pcmbuf_boost':
pcmbuf.c:124: warning: implicit declaration of function `cpu_boost_id'
pcmbuf.c:124: error: `CPUBOOSTID_PCMBUF' undeclared (first use in this function)
pcmbuf.c:124: error: (Each undeclared identifier is reported only once
pcmbuf.c:124: error: for each function it appears in.)
make[1]: *** [rockbox-6024/build/apps/pcmbuf.o] Error 1
make: *** [all] Error 2

I guess you were using  FS#6033  as well?
Comment by Steve Bavin (pondlife) - Thursday, 21 September 2006, 19:47 GMT+2
D'OH! Yes - my next aim is to fix the problem where the PCMBUF boost remains enabled after stop... The attached update should apply cleanly.
(application/octet-stream)    voicefix060921.patch (5.4 KiB)
 apps/playback.c |   53 +++++++++++++++++++++++++++++------------------------
 apps/pcmbuf.c   |    4 +---
 2 files changed, 30 insertions(+), 27 deletions(-)

Comment by Rani Hod (RaeNye) - Friday, 22 September 2006, 17:46 GMT+2
Tested on X5, no problems found.
Comment by Steve Bavin (pondlife) - Saturday, 23 September 2006, 16:19 GMT+2
Here's today's version! This should also fix the reported problem where CPU remains boosted after stop if voice is in use.
(application/octet-stream)    voicefix060923.patch (5.1 KiB)
 apps/playback.c |   55 ++++++++++++++++++++++++++++++-------------------------
 apps/pcmbuf.c   |    1 +
 2 files changed, 31 insertions(+), 25 deletions(-)

Comment by Steve Bavin (pondlife) - Saturday, 23 September 2006, 23:50 GMT+2
One more fix - audio_stop now returns only once playback has stopped, otherwise the playlist viewer got confused. (lostlogic already fixed this bug back in April, but I brought it back for a while...)
(application/octet-stream)    voicefix0609231.patch (4.9 KiB)
 apps/playback.c |   57 +++++++++++++++++++++++++++++++-------------------------
 apps/pcmbuf.c   |    1 
 2 files changed, 33 insertions(+), 25 deletions(-)

Loading...