FS#6096 - Recording for ipod 4g/Photo/5g and iriver H10

Attached is a work-in-progress patch to implement recording on the ipods.

I first implemented this a couple of months ago, and have now resynced it to CVS following the major reworking of the Rockbox recording code. I have only tested the resynced version of the patch on a 5g, but it should also be working on the 4g (greyscale) and Photo/Color.

On the 5g, recording is via the line-in pins hidden in the dock connector. On the 4g/Photo, recording is either via the line-in pins, or via the the right channel in the headphone socket which doubles as a mic input.

Remaining issues/unimplemented features:

1) Playback is broken after recording2) No gain control3) mp3 codec is untested, wavpack codec doesn’t work. WAV is OK.4) Only 16-bit/44.1KHz is implemented - the recording hardware should be able to handle a variety of samplerates up to 24-bit/96KHz.

Updated with wmcodec_disable_recording() implemented for the WM8731. The 4 remaining issues are still present.Now that the scope of this bug is greater than just the ipods, should the title/details be changed, or should we start a new bug report?

As far as I know, the 1st Gen Nano can’t record - it contains a WM8795G audio codec, compared to the WM8975 in the 4g and Photo/Color. My understanding is that the “G” suffix means it only has a DAC, and not an ADC.

tested your compiled version on a H10 6GB (Link: http://barrywardell.net/assets/files/rockbox-recording-6gb.zip)Could only test Mic-In so far, but with WAV as codec selected, it worked flawlessly! Thanks!Any news on other codecs? Maybe a newer compiled version? Or is this patch rather simple to apply it yourself?

Updated to CVS. All encoding types now work. Still no gain control, playback after recording or sample rate control. Not tested with H10 line-in.I will clean this up a little then commit it if there are no problems reported.