Lines Matching defs: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",
269 "%s(): recursive clock topology detected, id %d.\n",
274 /* first, see if the ID we're looking at is a clock source already */
281 "clock source %d is not valid, cannot use\n",
327 /* Skip setting clock selector again for some devices */
347 /* The current clock source is invalid, try others. */
363 "found and selected valid clock source %d\n",
383 * the clock source (end-leaf) must be used. However, clock selectors,
384 * clock multipliers and sample rate converters may be specified as
385 * clock source input to terminal. This functions walks the clock path
390 * Returns the clock source UnitID (>=0) on success, or an error.
401 return __uac_clock_find_source(chip, fmt, fmt->clock, visited,
467 int altsetting, int clock)
476 snd_usb_ctrl_intf(chip) | (clock << 8),
490 * Return 0 if the clock source is read-only, the actual rate on success,
498 int clock, int rate)
506 cs_desc = snd_usb_find_clock_source(chip, clock, fmt->protocol);
525 snd_usb_ctrl_intf(chip) | (clock << 8),
530 return get_sample_rate_v2v3(chip, fmt->iface, fmt->altsetting, clock);
537 int clock;
539 /* First, try to find a valid clock. This may trigger
540 * automatic clock selection if the current clock is not
543 clock = snd_usb_clock_find_source(chip, fmt, true);
544 if (clock < 0) {
545 /* We did not find a valid clock, but that might be
547 * external clock source. Try again without validation
551 clock = snd_usb_clock_find_source(chip, fmt, false);
557 if (clock < 0)
558 return clock;
561 prev_rate = get_sample_rate_v2v3(chip, fmt->iface, fmt->altsetting, clock);
565 cur_rate = snd_usb_set_sample_rate_v2v3(chip, fmt, clock, rate);
578 "%d:%d: freq mismatch: req %d, clock runs @%d\n",
595 /* validate clock after rate change */
596 if (!uac_clock_source_is_valid(chip, fmt, clock))
604 usb_audio_dbg(chip, "%d:%d Set sample rate %d, clock %d\n",
605 fmt->iface, fmt->altsetting, rate, fmt->clock);