FS#8362 - S/PDIF recording is not working with certain input devices

Attached to Project: Rockbox
Opened by Gerhard Dirschl (gdirschl) - Sunday, 23 December 2007, 11:53 GMT
Last edited by Peter D'Hoye (petur) - Friday, 22 August 2008, 22:32 GMT
Task Type Bugs
Category Recording
Status Closed
Assigned To No-one
Operating System Iriver H100 series
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


The current rockbox build failed to record from a 16Bit 48kHz source (via optical in). The sampling-rate is recognized correctly. The peak-meter and analog monitor is also working. But when I press the play button to actually start recording, not much happens. The "recording" icon and the destination filename is displayed and that's it. Time and byte counter stay 0 and the destination file is also not created.
This task depends upon

Closed by  Peter D'Hoye (petur)
Friday, 22 August 2008, 22:32 GMT
Reason for closing:  Fixed
Additional comments about closing:  fixed recently by amiconn: the valnogood bit is now ignored
Comment by Peter D'Hoye (petur) - Sunday, 23 December 2007, 23:56 GMT
did you try starting recording with REC?
Comment by Gerhard Dirschl (gdirschl) - Monday, 24 December 2007, 09:39 GMT
I did, but I got the same behavior. I should have noted that this only happens when using the digital (S/PDIF) input. Recording from the internal microphone, analog input or FM Radio works without any problems.
Comment by Michael Sevakis (MikeS) - Monday, 24 December 2007, 10:39 GMT
When _exactly_ did that break? Only the current build? It surely worked fine last time I checked it.
Comment by Michael Sevakis (MikeS) - Monday, 24 December 2007, 11:12 GMT
Just confirmed this. Weird. I'll have a look-see.
Comment by Michael Sevakis (MikeS) - Monday, 24 December 2007, 11:26 GMT
Nix that. I forgot that it won't actually receive samples without an actual sigal source (time remains at 0) so I went and actually plugged my H120 into a DVD unit with optical out and it recorded that just fine.
Comment by Gerhard Dirschl (gdirschl) - Tuesday, 25 December 2007, 12:03 GMT
That's weird. It seems to be an incompatibility between rockbox and my DVB-S receiver. I did some more testing:
- DVB-S box and rockbox (16Bit @ 48kHz): cannot record (peak meter and analog monitor is working, though).
- DVB-S box and iRiver-Firmware (16Bit @ 48kHz): works.
- CD-Player and rockbox (16bit @ 44kHz): works.
Comment by Gerhard Dirschl (gdirschl) - Tuesday, 25 December 2007, 12:12 GMT
I just remembered that there's a S/PDIF analyzer in the debug menu:
Val:-- Sym:OK Par:OK <--- uh, oh
Status word: 20000840
Pro: 0 (Consumer)
Audio: 0 (PCM)
Copy: 1 (Permitted)
Preemph: 4 (Reserved) <--- hm?
Mode: 0
Category: 0x00 (General)
Generation: 0 (No ind.)
Source: 0
Channel: 8 (A (Left)) <--- ??
Freq: 4 (48 kHz)
Clock accuracy: 0
Measured freq.: fluctuates between 77xxx-80xxx Hz <--- what the...
Comment by Gerhard Dirschl (gdirschl) - Tuesday, 25 December 2007, 12:26 GMT
One last note. I recorded a few minutes from the DVB-S box with the original firmware. The WAV file (16Bit, 48kHz, Stereo) sounds OK.
Comment by Michael Sevakis (MikeS) - Wednesday, 26 December 2007, 04:12 GMT
The fact that you are getting peakmeters and monitoring (which is digital) along with a sticking recording is really weird since data would have to be received for peaks to be calculated and monitoring to be heard which should just be buffered and encoded like anything else. Any chance of trying with a logf build, dumping that and posting it here?
Comment by Gerhard Dirschl (gdirschl) - Saturday, 29 December 2007, 00:11 GMT
Did it (with logf enabled globally).
I plugged in the TOSLINK cable,
entered the recording screen using the REC-button,
started recording with REC,
waited a few seconds and started a new file with REC,
stopped recording after a few more seconds,
exited the recording screen and called logfdump.
   logf.txt (30.1 KiB)