[alsa-devel] maximum tolerable sampling frequency difference for a driver

Clemens Ladisch clemens at ladisch.de
Wed Nov 12 16:35:44 CET 2008


chri wrote:
> Let's say that the driver cannot set the exact sampling frequency
> asked via hwparms ...

This never happens.

The driver tells the ALSA framework what frequencies it supports, either
by setting individual bits in the .rates field, or by installing a
constraint by calling snd_pcm_hw_constraint_list() or some other of the
constraint functions when the device is opened.  ALSA then makes sure
that the driver always gets values in hw_params that meet these
constraints.

When an application requests a frequency that is not supported by the
device, it is the application that must decide whether the actual
frequency is acceptable.


HTH
Clemens


More information about the Alsa-devel mailing list