Lines Matching full:freq
94 int val, freq; in vx_read_uer_status() local
97 freq = 0; in vx_read_uer_status()
110 freq = 32000; in vx_read_uer_status()
113 freq = 44100; in vx_read_uer_status()
116 freq = 48000; in vx_read_uer_status()
127 return freq; in vx_read_uer_status()
148 static int vx_calc_clock_from_freq(struct vx_core *chip, int freq) in vx_calc_clock_from_freq() argument
152 if (snd_BUG_ON(freq <= 0)) in vx_calc_clock_from_freq()
155 hexfreq = (28224000 * 10) / freq; in vx_calc_clock_from_freq()
158 /* max freq = 55125 Hz */ in vx_calc_clock_from_freq()
169 return 0x5fe; /* min freq = 6893 Hz */ in vx_calc_clock_from_freq()
193 void vx_set_internal_clock(struct vx_core *chip, unsigned int freq) in vx_set_internal_clock() argument
198 clock = vx_calc_clock_from_freq(chip, freq); in vx_set_internal_clock()
200 "set internal clock to 0x%x from freq %d\n", clock, freq); in vx_set_internal_clock()
232 int vx_set_clock(struct vx_core *chip, unsigned int freq) in vx_set_clock() argument
257 if (chip->freq == freq) in vx_set_clock()
259 vx_set_internal_clock(chip, freq); in vx_set_clock()
263 if (chip->freq == freq) in vx_set_clock()
265 chip->freq = freq; in vx_set_clock()
276 int freq; in vx_change_frequency() local
286 freq = vx_read_uer_status(chip, &chip->uer_detected); in vx_change_frequency()
287 if (freq < 0) in vx_change_frequency()
288 return freq; in vx_change_frequency()
293 if (freq == 48000 || freq == 44100 || freq == 32000) in vx_change_frequency()
294 chip->freq_detected = freq; in vx_change_frequency()