[alsa-devel] spdif input - square resample confusion, alc886

Rafal Powierski powierski at mediascore.de
Sat Nov 3 12:59:49 CET 2012


(High Definition Audio Specification: 5.4.3 Source Synchronous Input)
Writing application.
hardware: ALC886 codec and AMD FUSION in my special device.

How can I detect spdif stream source sample ratio?
I tried not to set the ratio at init – this gives 44.1
If I set 48k it seams to work. 
if I set different, alsa+codec is somehow following my request and rectangular-“resampling” input to given setting.
That is I am getting 2x the same value when I set 96000Hz
I am afraid of repeatedly loosing samples or getting it twice (e.g. in case of jitter or the stream from alsa is not really the source synchronous ).

How can I got real 1:1 sample ratio?

if no solution:
can I use much higher sample ratio and use software PLL based on equal consequent samples?
is that behavior of repeating samples consistent? – i.e. is that planed or bug?

RAW data (e.g. AC3):
SND_PCM_FORMAT_IEC958_SUBFRAME_LE is not available
but 32 bit format brings all 32 bits set to some non constant value.
Is this maybe the raw format?


More information about the Alsa-devel mailing list