f...@interkatz.de wrote:
> according to hda-verb, the supported capturing parameters are 16/20/24
> bits per sample

These are the sample formats that are transmitted on the HDA bus.

> Alsa-lib, on the other hand, claims that the supported formats (for
> `hw:0,0` in this case) are S16LE and S32LE

These are the sample formats that the HDA controller writes into memory,
and that your application sees in the buffer.

> I expected that ALSA returns something like: S16LE, S20LE, S24LE.

S20 and S24 are smaller samples that are aligned at the least
significant bit in the 32-bit memory word.  This would make them harder
to handle, and almost no DMA controller is stupid enough to use them.

The 20- or 24-bit samples you get from HDA are aligned at the most
significant bit, i.e., you can handle them like 32-bit values.  If you
really want to know how many bits are actually significant, call
snd_pcm_hw_params_get_sbits() after you've set the hw params.


Regards,
Clemens


_______________________________________________
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user

Reply via email to