Lines Matching refs:rate

159 static int set_fixed_rate(struct audioformat *fp, int rate, int rate_bits)
166 fp->rate_min = rate;
167 fp->rate_max = rate;
169 fp->rate_table[0] = rate;
173 /* set up rate_min, rate_max and rates from the rate table */
176 unsigned int rate;
183 rate = fp->rate_table[i];
184 fp->rate_min = min(fp->rate_min, rate);
185 fp->rate_max = max(fp->rate_max, rate);
186 fp->rates |= snd_pcm_rate_to_rate_bit(rate);
197 * @offset: the start offset of descriptor pointing the rate type
214 * build the rate table and bitmap flags
225 unsigned int rate = combine_triple(&fmt[idx]);
226 if (!rate)
231 if (rate == 48000 && nr_rates == 1 &&
237 rate = 96000;
239 if (rate == 16000 &&
242 rate = 8000;
244 fp->rate_table[fp->nr_rates++] = rate;
282 unsigned int rate)
287 return rate <= 48000;
290 return (rate == 88200 || rate == 96000);
293 return rate >= 176400;
302 * altsetting. Maximum rate is exposed in the last 4 bytes of Format Type
307 unsigned int rate)
327 /* Validate max rate */
334 "%u:%d : unexpected max rate: %u\n",
340 return rate <= max_rate;
347 * Helper function to walk the array of sample rate triplets reported by
362 unsigned int rate;
369 * rate range, and this function should return 0 for no further
379 for (rate = min; rate <= max; rate += res) {
383 !s1810c_valid_sample_rate(fp, rate))
388 !focusrite_valid_sample_rate(chip, fp, rate))
392 fp->rate_table[nr_rates] = rate;
434 /* check whether the given altsetting is supported for the already set rate */
465 * Validate each sample rate with the altsetting
466 * Rebuild the rate table if only partial values are valid
479 /* performing the rate verification may lead to unexpected USB bus
524 "No valid sample rate available for %d:%d, assuming a firmware bug\n",
603 "%s(): unable to retrieve sample rate range (clock %d)\n",