/* Returns the SNDRV_PCM_RATE_xxx flag that corresponds to the given rate, or SNDRV_PCM_RATE_KNOT for an unknown rate.  */
unsigned int snd_pcm_rate_to_rate_bit(unsigned int rate)
/* Returns the SNDRV_PCM_RATE_xxx flag that corresponds to the given rate, or SNDRV_PCM_RATE_KNOT for an unknown rate.  */
unsigned int snd_pcm_rate_to_rate_bit(unsigned int rate)
{
	unsigned int i;
	for (i = 0; i < snd_pcm_known_rates.count; i++)
		if (snd_pcm_known_rates.list[i] == rate)
			return 1u << i;
	return SNDRV_PCM_RATE_KNOT;
}