Lines Matching refs:lookup

591 				const struct stv0900_table *lookup,  in stv0900_get_rf_level()  argument
602 if ((lookup == NULL) || (lookup->size <= 0)) in stv0900_get_rf_level()
609 imax = lookup->size - 1; in stv0900_get_rf_level()
610 if (INRANGE(lookup->table[imin].regval, agc_gain, in stv0900_get_rf_level()
611 lookup->table[imax].regval)) { in stv0900_get_rf_level()
615 if (INRANGE(lookup->table[imin].regval, in stv0900_get_rf_level()
617 lookup->table[i].regval)) in stv0900_get_rf_level()
623 rf_lvl = (s32)agc_gain - lookup->table[imin].regval; in stv0900_get_rf_level()
624 rf_lvl *= (lookup->table[imax].realval - in stv0900_get_rf_level()
625 lookup->table[imin].realval); in stv0900_get_rf_level()
626 rf_lvl /= (lookup->table[imax].regval - in stv0900_get_rf_level()
627 lookup->table[imin].regval); in stv0900_get_rf_level()
628 rf_lvl += lookup->table[imin].realval; in stv0900_get_rf_level()
629 } else if (agc_gain > lookup->table[0].regval) in stv0900_get_rf_level()
631 else if (agc_gain < lookup->table[lookup->size-1].regval) in stv0900_get_rf_level()
659 const struct stv0900_table *lookup) in stv0900_carr_get_quality() argument
684 if ((lookup != NULL) && lookup->size) { in stv0900_carr_get_quality()
697 imax = lookup->size - 1; in stv0900_carr_get_quality()
698 if (INRANGE(lookup->table[imin].regval, in stv0900_carr_get_quality()
700 lookup->table[imax].regval)) { in stv0900_carr_get_quality()
703 if (INRANGE(lookup->table[imin].regval, in stv0900_carr_get_quality()
705 lookup->table[i].regval)) in stv0900_carr_get_quality()
711 c_n = ((regval - lookup->table[imin].regval) in stv0900_carr_get_quality()
712 * (lookup->table[imax].realval in stv0900_carr_get_quality()
713 - lookup->table[imin].realval) in stv0900_carr_get_quality()
714 / (lookup->table[imax].regval in stv0900_carr_get_quality()
715 - lookup->table[imin].regval)) in stv0900_carr_get_quality()
716 + lookup->table[imin].realval; in stv0900_carr_get_quality()
717 } else if (regval < lookup->table[imin].regval) in stv0900_carr_get_quality()