• Status Closed
  • Percent Complete
  • Task Type Patches
  • Category Music playback
  • Assigned To
    Steve Bavin
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by Steve Bavin - 2006-09-19
Last edited by Steve Bavin - 2006-09-20

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

This is an addendum to  FS#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.


Closed by  Steve Bavin
2006-09-26 07:28
Reason for closing:  Accepted
Additional comments about closing:  

Committed, nobody has reported any problems and it fixes 3 issues.

Steve Bavin commented on 2006-09-20 09:12

Here’s a slightly updated version. I’ve tested this on an H340 and recording still works. Can others please test too?

Steve Bavin commented on 2006-09-20 09:14


Steve Bavin commented on 2006-09-20 14:23

Here’s an updated version that will allow recording to be monitored, even if voice menus are still talking…

Rani Hod commented on 2006-09-20 15:26

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.

Steve Bavin commented on 2006-09-20 17:00

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?

Steve Bavin commented on 2006-09-20 17:31

OK, I’ve added waits to ensure that both audio and voice playback completes before recording begins. Please try this version of the patch.

Rani Hod commented on 2006-09-21 17:41

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
* [all] Error 2

I guess you were using  FS#6033  as well?

Steve Bavin commented on 2006-09-21 17:47

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.

Rani Hod commented on 2006-09-22 15:46

Tested on X5, no problems found.

Steve Bavin commented on 2006-09-23 14:19

Here’s today’s version! This should also fix the reported problem where CPU remains boosted after stop if voice is in use.

Steve Bavin commented on 2006-09-23 21:50

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…)


Available keyboard shortcuts


Task Details

Task Editing