All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: spdif input, source synchronous?
       [not found] <50A17AEC.2080102@radagast.org>
@ 2013-01-23 21:19 ` Rafal Powierski
  2013-01-24 11:49   ` Clemens Ladisch
  0 siblings, 1 reply; 3+ messages in thread
From: Rafal Powierski @ 2013-01-23 21:19 UTC (permalink / raw)
  To: Dave Platt; +Cc: alsa-devel

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: spdif input, source synchronous?
  2013-01-23 21:19 ` spdif input, source synchronous? Rafal Powierski
@ 2013-01-24 11:49   ` Clemens Ladisch
  0 siblings, 0 replies; 3+ messages in thread
From: Clemens Ladisch @ 2013-01-24 11:49 UTC (permalink / raw)
  To: Rafal Powierski; +Cc: alsa-devel, Dave Platt

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* spdif input, source synchronous?
@ 2012-11-08  9:10 Rafal Powierski
  0 siblings, 0 replies; 3+ messages in thread
From: Rafal Powierski @ 2012-11-08  9:10 UTC (permalink / raw)
  To: alsa-devel

Hi Developers,

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?

How can I read presence and rate of the signal?
Verb – Get Digital Converter Control 1,2 is good thing to have, but I need “carrier-detect” and maybe rate to feed back to Alsa on setup.

I hope someone knows this – even if maybe spdif input is not very popular.

Regards,
Rafal
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-24 11:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <50A17AEC.2080102@radagast.org>
2013-01-23 21:19 ` spdif input, source synchronous? Rafal Powierski
2013-01-24 11:49   ` Clemens Ladisch
2012-11-08  9:10 Rafal Powierski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.