Lines Matching refs:freq
162 static u32 tea5777_freq_to_v4l2_freq(struct radio_tea5777 *tea, u32 freq) in tea5777_freq_to_v4l2_freq() argument
166 return (freq * TEA5777_FM_FREQ_STEP + TEA5777_FM_IF) * 16; in tea5777_freq_to_v4l2_freq()
168 return (freq * TEA5777_AM_FREQ_STEP + TEA5777_AM_IF) * 16; in tea5777_freq_to_v4l2_freq()
175 u32 freq; in radio_tea5777_set_freq() local
178 freq = clamp(tea->freq, bands[tea->band].rangelow, in radio_tea5777_set_freq()
180 freq = (freq + 8) / 16; /* to kHz */ in radio_tea5777_set_freq()
185 freq = (freq - TEA5777_FM_IF) / TEA5777_FM_FREQ_STEP; in radio_tea5777_set_freq()
187 tea->write_reg |= (u64)freq << TEA5777_W_FM_PLL_SHIFT; in radio_tea5777_set_freq()
198 freq = (freq - TEA5777_AM_IF) / TEA5777_AM_FREQ_STEP; in radio_tea5777_set_freq()
200 tea->write_reg |= (u64)freq << TEA5777_W_AM_PLL_SHIFT; in radio_tea5777_set_freq()
219 tea->freq = tea5777_freq_to_v4l2_freq(tea, freq); in radio_tea5777_set_freq()
348 f->frequency = tea->freq; in vidioc_g_frequency()
365 tea->freq = f->frequency; in vidioc_s_frequency()
397 if (tea->freq < rangelow || tea->freq > rangehigh) { in vidioc_s_hw_freq_seek()
398 tea->freq = clamp(tea->freq, rangelow, in vidioc_s_hw_freq_seek()
410 orig_freq = tea->freq; in vidioc_s_hw_freq_seek()
415 tea->freq = rangelow; in vidioc_s_hw_freq_seek()
423 tea->freq = rangehigh; in vidioc_s_hw_freq_seek()
434 tea->freq = orig_freq + spacing; in vidioc_s_hw_freq_seek()
437 tea->freq = orig_freq - spacing; in vidioc_s_hw_freq_seek()
459 tea->freq = (tea->read_reg & TEA5777_R_FM_PLL_MASK); in vidioc_s_hw_freq_seek()
460 tea->freq = tea5777_freq_to_v4l2_freq(tea, tea->freq); in vidioc_s_hw_freq_seek()
478 tea->freq = orig_freq; in vidioc_s_hw_freq_seek()
539 tea->freq = 90500 * 16; /* 90.5Mhz default */ in radio_tea5777_init()