FS#5963 - Crash when leaving "Recording Settings" entered from the FM Radio screen

Attached to Project: Rockbox
Opened by Václav Brožík (pabouk) - Saturday, 09 September 2006, 11:04 GMT
Task Type Bugs
Category Recording
Status Closed
Assigned To No-one
Operating System Iriver H100 series
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


I encountered crashes on iriver H120 when leaving the "Recording Settings" menu entered from the FM Radio screen.
In older build (probably 060907) it showed:


Now (060909-1036) it just spins up the HDD (even when no option was changed), changes the sound of the radio (it loses high frequencies) and freezes without any message or the possibility to reboot by pressing PLAY. I seems that after entering and leaving the "Recording Screen" it does not crash anymore. I tested it with cleared settings.
This task depends upon

Closed by  Michael Sevakis (MikeS)
Sunday, 17 September 2006, 23:51 GMT
Reason for closing:  Fixed
Additional comments about closing:  Well yes that call to audio_set_recording_options after in the fm recording settings menu was not right and has been #ifdef\'ed out for SWCODEC (never looked why it\'s there for HWCODEC and big *doh* on my part :). It doesn\'t init DMA but rather EBU (SPDIF) and/or ColdFire I2S. Additionally, the code for monitoring for SPDIF will be moved to rec_set_source as that is where monitoring is enabled for everything else and is the function\'s purpose.
Comment by Michael Sevakis (MikeS) - Saturday, 09 September 2006, 11:33 GMT
That means the FIFO buffer is getting filled and DMA is not reading the samples out fast enough. There should be traps for these conditions...note made.

How much does it lose HF? If somehow it's sampling at 22 or 11 it will do that. No SPDIF was involved?
Comment by Václav Brožík (pabouk) - Saturday, 09 September 2006, 13:19 GMT
I did the following:
- booted Rockbox (with cleared settings)
- started FM radio, loaded presets and tuned a station
- long pressed NAVI
- entered Recording Settings
- exited Recording Settings
- Rockbox crashed

So it seems that the DMA transfer is initialized after leaving the Recording Settings menu (why?) but the reading thread is not initialized probably. I did not enter the Recording Screen so I did not start recording.

I hear the same loss of HF when entering the Recording Screen while the radio is playing. I think the HF are not completely lost but just attenuated. I did not use SPDIF and the sampling frequency is configured to 44.1 kHz (the only available on iriver ATM).
Comment by Václav Brožík (pabouk) - Sunday, 17 September 2006, 23:03 GMT
I confirm that the bug is fixed. Thank you.