Lines Matching refs:rate
3 * Clock domain and sample rate management functions
166 * single sample rate, the terminal is connected directly to it
180 * Sample rate changes takes more than 2 seconds for this device. Clock
382 * For all kinds of sample rate settings and other device queries,
384 * clock multipliers and sample rate converters may be specified as
409 const struct audioformat *fmt, int rate)
415 /* if endpoint doesn't have sampling rate control, bail out */
419 data[0] = rate;
420 data[1] = rate >> 8;
421 data[2] = rate >> 16;
428 fmt->iface, fmt->altsetting, rate, fmt->endpoint);
432 /* Don't check the sample rate for devices which we know don't
453 dev_info(&dev->dev, "failed to read current rate; disabling the check\n");
458 if (crate != rate) {
459 dev_warn(&dev->dev, "current rate %d is different from the runtime rate %d\n", crate, rate);
460 // runtime->rate = crate;
488 * Try to set the given sample rate:
490 * Return 0 if the clock source is read-only, the actual rate on success,
493 * This function gets called from format.c to validate each sample rate, too.
498 int clock, int rate)
521 data = cpu_to_le32(rate);
534 const struct audioformat *fmt, int rate)
546 * because the current sample rate does not match an
549 * rate.
562 if (prev_rate == rate)
565 cur_rate = snd_usb_set_sample_rate_v2v3(chip, fmt, clock, rate);
569 fmt->iface, fmt->altsetting, rate, cur_rate);
576 if (cur_rate != rate) {
579 fmt->iface, fmt->altsetting, rate, cur_rate);
585 bool cur_base_48k = (rate % 48000 == 0);
595 /* validate clock after rate change */
602 const struct audioformat *fmt, int rate)
604 usb_audio_dbg(chip, "%d:%d Set sample rate %d, clock %d\n",
605 fmt->iface, fmt->altsetting, rate, fmt->clock);
610 return set_sample_rate_v1(chip, fmt, rate);
614 if (rate != UAC3_BADD_SAMPLING_RATE)
621 return set_sample_rate_v2v3(chip, fmt, rate);