This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#10086 - 5G iPod WM8758 codec sample rate setting
Attached to Project:
Rockbox
Opened by Boris Gjenero (dreamlayers) - Wednesday, 01 April 2009, 21:17 GMT+2
Last edited by Boris Gjenero (dreamlayers) - Tuesday, 07 April 2009, 18:34 GMT+2
Opened by Boris Gjenero (dreamlayers) - Wednesday, 01 April 2009, 21:17 GMT+2
Last edited by Boris Gjenero (dreamlayers) - Tuesday, 07 April 2009, 18:34 GMT+2
|
DetailsCurrently, the only sample rate supported on the 5G iPod is 44100 Hz. This patch adds support for all other rates which can be supported both by Rockbox and the codec. Supported rates are:
48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000 The patch is based on the WM8983 datasheet, because the WM8758 datasheet is unavailable. The WM8983 supports sample rates between 8 and 48 kHz. It would be easy to compute settings for 96000, 88200 and 64000, but I think it's best to not overclock the codec. This is patch was inspired by problems with Doom sounds: http://forums.rockbox.org/index.php?topic=21111.0 . With this patch, a compile-time check makes Doom use 11025 instead of 44100 and then sounds work properly. However, there may be another underlying issue which needs to be looked at: sound from plugins may underrun too easily. In test_sampr, merely scrolling through a list causes underruns. This does absolutely nothing for standard audio playback. There doesn't seem to be any sample rate changing support there, and so software resamples to 44100 if necessary. The same process which sets playback sample rates also sets recording sample rates. I have enabled use of all of the new sample rates for recording. I haven't been able to test this however, because I don't have a line in adapter. Playback sample rate changing may be tested via the test_sampr plugin. To build it, add test_sampr.c it to apps/plugins/SOURCES. |
This task depends upon
Closed by Boris Gjenero (dreamlayers)
Tuesday, 07 April 2009, 18:34 GMT+2
Reason for closing: Accepted
Additional comments about closing: Committed in r20635
Tuesday, 07 April 2009, 18:34 GMT+2
Reason for closing: Accepted
Additional comments about closing: Committed in r20635
They shouldn't underrun. The only thing I'd expect is glitches when changing rates on the fly (not minor ones either). Anything <= 44100 should definitely work since it's an equal or lesser load than core playback. If there are underruns under a steady rate, then it's something else surely. The pcm DMA code attempts to maintain a constant period of DMA interrupts for all samplerates for the PCM tick so maybe there's an issue with that?
Just to clarify again: The underruns in plugins aren't a problem with this patch. This patch stops underruns in Doom because Doom can use the 11025 Hz sample rate when it is available. I feel that Doom probably should not underrun the buffer at 44100 Hz, and there may be another entirely separate bug there.