Liam Girdwood wrote:
On Mon, 2007-10-01 at 16:49 -0500, Timur Tabi wrote:
Liam Girdwood wrote:
Could you have a look at the V2 i.mx31 SSI driver and let me know if we need further changes for better dts support.
I'm trying to port the CS4270 codec driver (it's easier) to ASOC v2, and I see that you don't have snd_pcm_rate_to_rate_bit(). Where did it go?
We never had a snd_pcm_rate_to_rate_bit() in the ASoC code, perhaps you mean something else ?
In may not be part of ASoC, but it's part of ALSA, and I need it. It's not just in your repository.
sound/core/pcm_misc.c
/** * snd_pcm_rate_to_rate_bit - converts sample rate to SNDRV_PCM_RATE_xxx bit * @rate: the sample rate to convert * * 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; } EXPORT_SYMBOL(snd_pcm_rate_to_rate_bit);