• Status Closed
  • Percent Complete
  • Task Type Patches
  • Category Recording
  • Assigned To No-one
  • Operating System iriver H10
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by cdlees - 2008-09-11
Last edited by petur - 2008-09-28

FS#9394 - IRiver H10 sample rate change

Allows you to change the recording/playback sample rate on the IRiver H10. It was locked at 44.1kHz, now you can select 8, 32, 44.1, 48, 88.2 and 96kHz. Checked on r18325 (I don’t have svn access, firewall). The patch was checked by recording 15 seconds of a 1kHz sine wave on the line in input at each sample rate. Tested by playing the samples back on the H10 as well as looking at the files in Cooledit.

Has only been tested on the H10 20GB.

Closed by  petur
2008-09-28 23:26
Reason for closing:  Accepted
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

Thanks & welcome to the Rockbox credits file ;)

MikeS commented on 2008-09-11 23:39

Nice job. Does this actually change the internal clock rate of the codec? I also have a few notes to make.

This should follow the convention where pcm_set_frequency doesn’t have immediate effect on the hardware.

pcm_apply_settings should apply all parameter changes done by other calls - this is done to have on-the-fly changes without having several settings take effect in succession.

pcm_apply_settings should synchronize with the interrupt properly by masking FIQ.

Any changes should be applied when starting playback (via pcm_apply_settings semantics): stopped→play, stopped→paused, paused→play

If any ports have implemented the interface outside spec they should be synced to proper behavior or else software development can’t rely on a consistent interface.

It updates the variable pcm_freq in pcm_set_frequency. The change is then made in pcm_apply_changes, this calls audiohw_set_sample_rate. This way the codec is disabled, the change is made then the codec is enabled. This takes care of the FIQ so it all works nicely.

The internal sampling frequency of the codec is changed. I have tested the bandwidth of the codec by recording a white noise source then processing the data in matlab to get the spectral response at 44.1kHz and 96kHz to verify that it works.

This patch should work for any device using the PP5020 and a WM8731, if there are any others. The config_XXX.h will just have to be updated.

petur commented on 2008-09-12 20:23

Nice work…

Would be nice if you could create patches against SVN and not against another tree on your disk. (svn diff)

MikeS commented on 2008-09-12 20:28

There is a test_sampr plugin to test on-the-fly samplerate changes. At 44.1kHz it is an A440 and should change pitch in proportion to the rate.

petur commented on 2008-09-12 21:05

patch against current SVN, also added H10-5GB

ipod 3gen could also use it if it has recording….


Available keyboard shortcuts


Task Details

Task Editing