Re: [alsa-devel] spdif input, source synchronous?
Dave,
it took me some time, but I finally got a proper equipment to test ALC886 SPDIF input. (hw:1,1,0) The test results show that the input is not "source synchronous"
experiment: Analog->digital (spdif,toslink) Audio converter box, where internal crystal is removed and replaced with precision adjustable PLL-based gen. 2 simple independent sinus audio generators, providing audio source for ADC L,R inputs
software: stream consequent samples (L,R) are compared. frequency of identical consequent samples (32bits) is calculated (ppm) results: crystal marking is: 12288000 = 256*48kHz
gen. Hz | gen. ppm | duplicate probability (ppm)
12288000 0 0 12287856 -11.72 2 12287840 -13.02 4 12287824 -14.32 5 12287808 -15.62 7 12287792 -16.93 9 12287776 -18.22 10 12287760 -19.53 13 12287744 -20.83 14 12287728 -22.13 16 12287712 -23.44 17 12287696 -24.74 18 12287680 -26.04 20 12287664 -27.34 21
It seams that my HDA clock is a bit slower then definition ( about -10ppm) Therefore resampling starts below -10ppm It probably means that when spdif signal is 0ppm, about 10ppm of samples are missing.
Is this a bug? or it is planed like this? Is this a software problem or hardware problem (codec or DMA sequencer) or configuration problem? since it is not a real resampling (no signal reconstruction takes place) samples are just repeated or skipped, it seams not right to me. Who could comment on this?
Regards, Rafal
-----Original Message----- From: Dave Platt Sent: Monday, November 12, 2012 11:40 PM To: powierski@mediascore.de Subject: re: [alsa-devel] spdif input, source synchronous?
Does anyone know how the SPDIF input is working on HDA? Is it using a source-synchronous data transfer over HDA? In my arrangement (ALC886) I can set up any rate and I am receiving a rectangular “resampling”. – is this a bug? will this stay? so I can use higher ratio and some kind of software PLL to recover input rate?
I tested out S/PDIF input on my ALC262 setup some time ago.
What I found, at the time, was that the data capture did appear to be driven by the rate of the incoming signal. My outboard ADC provides a 44100 sample/second rate, and that seemed to be what I was getting. I tried forcing the capture to 48000 samples per second, and saw no difference in the captured file size... the number of samples per second actually captured seemed to be the same (within experimental error) and I didn't see any evidence of resampling going on.
Now, this was a capture with "hw:Intel,1" as the device. I expect that I would have seen resampling, and a different type of delivery if I had specified "plughw:Intel,1" or some other input style which had gone through the plug interface.
Unfortunately I don't have any way of generating a CD-rate data stream with a specific set of known values... I'd need a CD player with an S/PDIF output and I don't have one of those handy. If I can figure out a way of doing this I'll try generating a set of CDs with a known-value pattern, play it, capture it, and see if it does or does not exactly correlate.
Rafal Powierski wrote:
... ALC886 SPDIF input. The test results show that the input is not "source synchronous"
It seams that my HDA clock is a bit slower then definition ( about -10ppm) Therefore resampling starts below -10ppm It probably means that when spdif signal is 0ppm, about 10ppm of samples are missing.
And real S/PDIF inputs probably are all over the map ...
Is this a bug? or it is planed like this?
The HDA specification describes source synchronous streams, but does not mandate them.
Apparently, the ALC886 does not support source synchronous streams. A quick Google search shows only the WM8850 (which also has a real sample rate converter).
Regards, Clemens
participants (2)
-
Clemens Ladisch
-
Rafal Powierski