Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Music playback
  • Assigned To
    pondlife
  • 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 pondlife - 2006-09-19
Last edited by pondlife - 2006-09-20

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

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!!!

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

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

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

Patch…

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

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.

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?

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

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?

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.

Tested on X5, no problems found.

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

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

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing