Lines Matching refs:clock

21 #include "clock.h"
165 * Assume the clock is valid if clock source supports only one
167 * (there is no clock selector) and clock type is internal.
169 * reports that clock is invalid.
172 (fmt->clock & 0xff) == cs_desc->v2.bClockID &&
198 "%s(): cannot get clock validity for id %d\n",
230 /* If a clock source can't tell us whether it's valid, we assume it is */
243 "%s(): cannot get clock validity for id %d\n",
271 "%s(): recursive clock topology detected, id %d.\n",
276 /* first, see if the ID we're looking at is a clock source already */
283 "clock source %d is not valid, cannot use\n",
315 "%s(): clock selector control is not readable, id %d\n",
345 /* Skip setting clock selector again for some devices */
369 /* The current clock source is invalid, try others. */
385 "found and selected valid clock source %d\n",
405 * the clock source (end-leaf) must be used. However, clock selectors,
406 * clock multipliers and sample rate converters may be specified as
407 * clock source input to terminal. This functions walks the clock path
412 * Returns the clock source UnitID (>=0) on success, or an error.
423 return __uac_clock_find_source(chip, fmt, fmt->clock, visited,
489 int altsetting, int clock)
498 snd_usb_ctrl_intf(chip) | (clock << 8),
512 * Return 0 if the clock source is read-only, the actual rate on success,
520 int clock, int rate)
528 cs_desc = snd_usb_find_clock_source(chip, clock, fmt->protocol);
547 snd_usb_ctrl_intf(chip) | (clock << 8),
552 return get_sample_rate_v2v3(chip, fmt->iface, fmt->altsetting, clock);
559 int clock;
561 /* First, try to find a valid clock. This may trigger
562 * automatic clock selection if the current clock is not
565 clock = snd_usb_clock_find_source(chip, fmt, true);
566 if (clock < 0) {
567 /* We did not find a valid clock, but that might be
569 * external clock source. Try again without validation
573 clock = snd_usb_clock_find_source(chip, fmt, false);
579 if (clock < 0)
580 return clock;
583 prev_rate = get_sample_rate_v2v3(chip, fmt->iface, fmt->altsetting, clock);
587 cur_rate = snd_usb_set_sample_rate_v2v3(chip, fmt, clock, rate);
600 "%d:%d: freq mismatch: req %d, clock runs @%d\n",
617 /* validate clock after rate change */
618 if (!uac_clock_source_is_valid(chip, fmt, clock))
626 usb_audio_dbg(chip, "%d:%d Set sample rate %d, clock %d\n",
627 fmt->iface, fmt->altsetting, rate, fmt->clock);