Lines Matching +full:6 +full:f
139 | (state->icp_auto_mhi << 4) | (state->icp_auto_hi << 6); in cx24113_set_parameters()
163 r |= (state->vco_mode << 6) | ((state->bs_freqcnt >> 8) & 0x1f); in cx24113_set_parameters()
245 r = 0x03 << 6; in cx24113_set_bandwidth()
247 r = 0x02 << 6; in cx24113_set_bandwidth()
249 r = 0x01 << 6; in cx24113_set_bandwidth()
258 dprintk("bandwidth: %d %d\n", r >> 6, bandwidth_khz); in cx24113_set_bandwidth()
288 static void cx24113_calc_pll_nf(struct cx24113_state *state, u16 *n, s32 *f) in cx24113_calc_pll_nf() argument
291 s64 F; in cx24113_calc_pll_nf() local
316 dprintk("calculating N/F for %dHz with vcodiv %d\n", freq_hz, vcodiv); in cx24113_calc_pll_nf()
327 } while (N < 6 && R < 3); in cx24113_calc_pll_nf()
329 if (N < 6) { in cx24113_calc_pll_nf()
330 cx_err("strange frequency: N < 6\n"); in cx24113_calc_pll_nf()
333 F = freq_hz; in cx24113_calc_pll_nf()
334 F *= (u64) (R * vcodiv * 262144); in cx24113_calc_pll_nf()
335 dprintk("1 N: %d, F: %lld, R: %d\n", N, (long long)F, R); in cx24113_calc_pll_nf()
337 dividend = F; in cx24113_calc_pll_nf()
339 F = dividend; in cx24113_calc_pll_nf()
340 dprintk("2 N: %d, F: %lld, R: %d\n", N, (long long)F, R); in cx24113_calc_pll_nf()
341 F -= (N + 32) * 262144; in cx24113_calc_pll_nf()
343 dprintk("3 N: %d, F: %lld, R: %d\n", N, (long long)F, R); in cx24113_calc_pll_nf()
346 if (F > (262144 / 2 - 1638)) in cx24113_calc_pll_nf()
347 F = 262144 / 2 - 1638; in cx24113_calc_pll_nf()
348 if (F < (-262144 / 2 + 1638)) in cx24113_calc_pll_nf()
349 F = -262144 / 2 + 1638; in cx24113_calc_pll_nf()
350 if ((F < 3277 && F > 0) || (F > -3277 && F < 0)) { in cx24113_calc_pll_nf()
351 F = 0; in cx24113_calc_pll_nf()
353 cx24113_writereg(state, 0x10, r | (1 << 6)); in cx24113_calc_pll_nf()
356 dprintk("4 N: %d, F: %lld, R: %d\n", N, (long long)F, R); in cx24113_calc_pll_nf()
359 *f = (s32) F; in cx24113_calc_pll_nf()
363 static void cx24113_set_nfr(struct cx24113_state *state, u16 n, s32 f, u8 r) in cx24113_set_nfr() argument
368 reg = ((n & 0x1) << 7) | ((f >> 11) & 0x7f); in cx24113_set_nfr()
371 cx24113_writereg(state, 0x1b, (f >> 3) & 0xff); in cx24113_set_nfr()
374 cx24113_writereg(state, 0x1c, reg | ((f & 0x7) << 5)); in cx24113_set_nfr()
382 u16 n = 6; in cx24113_set_frequency()
383 s32 f = 0; in cx24113_set_frequency() local
395 cx24113_calc_pll_nf(state, &n, &f); in cx24113_set_frequency()
396 cx24113_set_nfr(state, n, f, state->refdiv); in cx24113_set_frequency()
400 r |= 1 << 6; in cx24113_set_frequency()
485 {-54, -41, -35, -30, -25, -21, -16, -10, -6, -2},