Lines Matching refs:new_speed
192 static int ivtv_validate_speed(int cur_speed, int new_speed) in ivtv_validate_speed() argument
194 int fact = new_speed < 0 ? -1 : 1; in ivtv_validate_speed()
199 if (new_speed < 0) in ivtv_validate_speed()
200 new_speed = -new_speed; in ivtv_validate_speed()
204 if (cur_speed <= new_speed) { in ivtv_validate_speed()
205 if (new_speed > 1500) in ivtv_validate_speed()
207 if (new_speed > 1000) in ivtv_validate_speed()
211 if (new_speed >= 2000) in ivtv_validate_speed()
213 if (new_speed >= 1500) in ivtv_validate_speed()
215 if (new_speed >= 1000) in ivtv_validate_speed()
218 if (new_speed == 0) in ivtv_validate_speed()
220 if (new_speed == 1 || new_speed == 1000) in ivtv_validate_speed()
221 return fact * new_speed; in ivtv_validate_speed()
223 s = new_speed; in ivtv_validate_speed()
224 new_speed = 1000 / new_speed; in ivtv_validate_speed()
225 if (1000 / cur_speed == new_speed) in ivtv_validate_speed()
226 new_speed += (cur_speed < s) ? -1 : 1; in ivtv_validate_speed()
227 if (new_speed > 60) return 1000 / (fact * 60); in ivtv_validate_speed()
228 return 1000 / (fact * new_speed); in ivtv_validate_speed()