[alsa-devel] IEC958 / SPDIF raw capture

Jaroslav Kysela perex at perex.cz
Thu Feb 11 08:36:49 CET 2010

On Thu, 11 Feb 2010, Donald Tournier wrote:

> Hi,
> We have an application in our institute that will require recording of
> a digital signal via an optical cable. We have to be able to guarantee
> perfect bitwise reproduction of the signal (the odd bit error is not a
> problem). We're thinking of using SPDIF and ALSA to capture the signal
> (obviously we'll have to make sure the signal is properly encoded to
> begin with).
> However, after some initial attempts, it's becoming clear that ALSA
> can't necessarily guarantee bitwise perfect capture. ALSA might change
> the format, or resample the signal after capture (although I've heard
> that can be turned off with "snd_pcm_hw_params_set_rate_resample
> (capture_handle, hw_params, 0)"). Also, the card that we've been
> playing with so far (SB Audigy2 ZS) apparently performs some low-pass
> digital filtering on the input stream anyway, and is therefore no use
> to us.

Getting raw S/PDIF stream for EMU chips is not so easy. They operates 
internally at 48kHz and everything is resampled to this frequency.


Jaroslav Kysela <perex at perex.cz>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.

More information about the Alsa-devel mailing list