[alsa-devel] How do I tell ALSA that my driver supports every possible sample rate?

Clemens Ladisch cladisch at fastmail.net
Tue Jul 24 09:14:24 CEST 2007


Timur Tabi wrote:
> Clemens Ladisch wrote:
> > To indicate that the PCM device supports all sample rates between the
> > minimum and the maximum, set SNDRV_PCM_RATE_CONTINUOUS in addition to
> > the other supported bits.
> 
> So I should do this:
> 
> 	SNDRV_PCM_RATES_5512 | SNDRV_PCM_RATE_8000_192000 | SNDRV_PCM_RATE_CONTINUOUS

Yes.

> That's not really elegant.

How could this be made more elegant?

It would be possible for ALSA to automatically set the single rate bits
that fall into the minimum/maximum range when the CONTINUOUS bit is set,
but this wouldn't help in your case because you'd still need to set
these bits in case one of the I2S/codec drivers has to remove the
CONTINUOUS bit.


Regards,
Clemens


More information about the Alsa-devel mailing list