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

Takashi Iwai tiwai at suse.de
Tue Jul 24 17:07:16 CEST 2007


At Tue, 24 Jul 2007 09:54:24 -0500,
Timur Tabi wrote:
> 
> Clemens Ladisch wrote:
> 
> >> 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?
> 
> Well, you could add SNDRV_PCM_RATE_ALL which be the sum of all SNDRV_PCM_RATE_xxx macros, 
> where xxx is some number.  So for today, that would be something like this:
> 
> #define SNDRV_PCM_RATE_ALL (SNDRV_PCM_RATE_8000_192000 | SNDRV_PCM_RATES_5512)

I'd prefer 5512_19200.  The word "ALL" may vary in future.

Anyway, the bits SND_PCM_RATES_[0-9]* are ignored when _CONTINUOUS or
_KNOT is passed.  Only the values in rate_min/rate_max fields are
referred as actual min/max rates.


Takashi


More information about the Alsa-devel mailing list