Lines Matching refs:rate

160 static int set_fixed_rate(struct audioformat *fp, int rate, int rate_bits)
167 fp->rate_min = rate;
168 fp->rate_max = rate;
170 fp->rate_table[0] = rate;
181 * @offset: the start offset of descriptor pointing the rate type
198 * build the rate table and bitmap flags
210 unsigned int rate = combine_triple(&fmt[idx]);
211 if (!rate)
216 if (rate == 48000 && nr_rates == 1 &&
222 rate = 96000;
224 if (rate == 16000 &&
227 rate = 8000;
229 fp->rate_table[fp->nr_rates] = rate;
230 if (!fp->rate_min || rate < fp->rate_min)
231 fp->rate_min = rate;
232 if (!fp->rate_max || rate > fp->rate_max)
233 fp->rate_max = rate;
234 fp->rates |= snd_pcm_rate_to_rate_bit(rate);
270 unsigned int rate)
275 return rate <= 48000;
278 return (rate == 88200 || rate == 96000);
281 return rate >= 176400;
290 * altsetting. Maximum rate is exposed in the last 4 bytes of Format Type
295 unsigned int rate)
315 /* Validate max rate */
322 "%u:%d : unexpected max rate: %u\n",
328 return rate <= max_rate;
335 * Helper function to walk the array of sample rate triplets reported by
352 unsigned int rate;
359 * rate range, and this function should return 0 for no further
369 for (rate = min; rate <= max; rate += res) {
373 !s1810c_valid_sample_rate(fp, rate))
378 !focusrite_valid_sample_rate(chip, fp, rate))
382 fp->rate_table[nr_rates] = rate;
383 if (!fp->rate_min || rate < fp->rate_min)
384 fp->rate_min = rate;
385 if (!fp->rate_max || rate > fp->rate_max)
386 fp->rate_max = rate;
387 fp->rates |= snd_pcm_rate_to_rate_bit(rate);
493 "%s(): unable to retrieve sample rate range (clock %d)\n",