Denis Shulyaka wrote:
> I have a CM106-based usb sound card (0d8c:0102) with SPDIF-In. My aim
> is to decode the compressed audio formats that may come from this
> source. And the first task for this is to get the original sample rate
> of the source to avoid any resampling.

In general, SPDIF inputs do not resample, and if you try to record with
the wrong sample rate, the result has the original sample rate and is
just labelled wrong.

And in practice, everybody uses 48 kHz.

> According to the CM106 datasheet, one can read the SPDIF-In sample
> rate from SPDFI_FREQ bits (8~7 of register 03).
> What is the correct way to do so? Can ALSA read those register bits?

In theory, this would be possible.

> Does ALSA provide any general interface for the userspace applications
> that indicates the SPDIF source sample rate?

Yes, but the USB audio driver does not implement it because the USB
audio specification does not define such an interface between the driver
and the device.

> Should I attempt to communicate with the hardware with libusb, or can
> I do it with ALSA only?

At the moment, you have to write the code yourself.  But if you've
tested it, we would be interested in integrating it into the kernel


Check out the vibrant tech community on one of the world's most
engaging tech sites,!
Alsa-user mailing list

Reply via email to