12 Nov
2008
12 Nov
'08
4:35 p.m.
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