[alsa-devel] Digital IO and SPDIF format

Clemens Ladisch clemens at ladisch.de
Tue Feb 1 17:32:01 CET 2011


Torsten Schenk wrote:
> - if 6fire's clock and playback device's clock differ, should I use
> playback device's clock (no interpolation of samples but capturing
> tool might have invalid sample rate information) or the 6fire's clock
> (samples need to be interpolated somehow)?

You should never change the captured samples.  A digital frame might
be transporting AC-3/DTS data.

> - should I receive a whole spdif block (usually 192 spdif frames) and
> use the information I got from the block (f.ex. left/right channel
> bits) before copying it to alsa or should I directly copy every frame
> to alsa?

When copying data from the URB buffer to ALSA's buffer, copy only the
frames that are actually present.  Why would you need the whole block
for this?

> Am I correct in assuming that SNDRV_PCM_FORMAT_IEC958_SUBFRAME_XX
> samples are formatted like in the specification?

Er ... the format of these samples is what the old revision of the
CMI8738 chip requires.

> If you know of any tool that is able to handle this format

alsa-lib/src/pcm/pcm_iec958.c


Regards,
Clemens


More information about the Alsa-devel mailing list