FS#11878 - Worse sound during the recording in FM Radio

Attached to Project: Rockbox
Opened by Marek Salaba (salaba) - Friday, 14 January 2011, 17:09 GMT
Last edited by Michael Sevakis (MikeS) - Monday, 12 December 2011, 20:15 GMT
Task Type Bugs
Category FM Tuner
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Hi all.

After the start of recording directly from the radio then sound worse of playing FM station.
After the stop recording, the sound is fine again.
I have Sansa Fuze v2 and I test it also on friend's player Sansa Fuze v2.

Does it have any reason or is it a bug?

Best regards,
Marek Salaba
This task depends upon

Closed by  Michael Sevakis (MikeS)
Monday, 12 December 2011, 20:15 GMT
Reason for closing:  Fixed
Additional comments about closing:  Monitoring quality is now as good is it is going to ever be.
Comment by Bertrik Sikken (bertrik) - Saturday, 15 January 2011, 07:21 GMT
As far as I know, the analog audio from the FM radio is passed directly to the analog mixer when *not* recording (bypass mode). When recording, the audio from the FM radio is passed into the A->D converter, through the D->A converter and into the analog mixer so you're hearing the sampled and quantized audio signal. There will always be some quality loss due to the sampling and quantizing,

Can you provide an example of the quality loss, so we can determine if it's just quantizing / sampling or something else?
Comment by foolsh (BenjaminBrown) - Friday, 28 January 2011, 10:17 GMT
Marek Salaba could record the sound your Sansa Fuze makes with your computer and upload it here? The file has to be smaller than 2mb. Thanks
Comment by Marek Salaba (salaba) - Sunday, 13 February 2011, 12:25 GMT
I will try to make a record.
Comment by Othniel Graichen (OthnielGraichen) - Friday, 07 October 2011, 00:23 GMT
BTW this description is exactly what I am noticing on my e200v2. The problem doesn't occur on e200v1.
Comment by Mark Wilhelmsson (markanini) - Sunday, 04 December 2011, 10:28 GMT
I notice the recording screen disables EQ, crossfeed etc, maybe this is the "degradation" reported?
Comment by Michael Sevakis (MikeS) - Monday, 05 December 2011, 13:28 GMT
Besides, samples on the AMS v2 are only 14 bits and the real sample rate is 1/2 what is shown in the screen since the ADC runs at 1/2 the clock rate of the DAC on all AMS. None of this is corrected for, meaning that samples are repeated once and the volume is 12dB lower than what it should be.

On e200v1, samples are 16 bits but the proper sample rate is enforced by discarding every other duplicated sample. Even so, actual recorded quality on e200v1 is a bit better than what monitoring shows because monitoring has the full sample rate.
Comment by Mark Wilhelmsson (markanini) - Monday, 05 December 2011, 14:12 GMT
Very interesting, Michael. It looks like an explanation for issues reported here I hope you and saratoga will be able to find a work-around eventually. :)
Comment by Michael Sevakis (MikeS) - Tuesday, 06 December 2011, 03:30 GMT
I did some fiddling around to revert to not using DMA channels for recording so that the samples can be properly processed during recording for bit depth, frequency and copying to the right channel for the mic source on as3525v1. Not all is complete here that I would like quite yet but it does work. Sample rates from 8kHz through 48kHz are enabled for recording per the divide-by-2 of the ADC.
Comment by Michael Sevakis (MikeS) - Wednesday, 07 December 2011, 01:49 GMT
I'm happy with this one.

It takes care of some issue with hardware that has different settings for a given recording samplerate and the default recording rate doesn't result in the default playback rate (for hardware reset).

Implements monitoring in both channels for all devices for mono and stereo.

Implements full-duplex audio on AMS (record and play simultaneously and as independently as possible).
Comment by Michael Sevakis (MikeS) - Thursday, 08 December 2011, 20:17 GMT
Patch committed in r31180. I await word on what happened.
Comment by Mark Wilhelmsson (markanini) - Saturday, 10 December 2011, 01:15 GMT
FM recording quality is very clean now after your patch. Great work! If you feel like implementing DC offset correction for my Fuze v2 it's detected as positive 2.16 by CEP.
Comment by Michael Sevakis (MikeS) - Saturday, 10 December 2011, 01:20 GMT
I had thought about it. It really wouldn't do anything that "Center Wave" wouldn't accomplish in CEP since the DC offset is probably before the ADC, thus digitized before anything can be done.
Comment by Mark Wilhelmsson (markanini) - Saturday, 10 December 2011, 01:29 GMT
Reporting cause you mentioned such possibility in the other task but I agree with your conclusion.