/linux/drivers/media/dvb-frontends/ |
A D | au8522_dig.c | 216 u16 *snr) in au8522_mse2snr_lookup() argument 223 *snr = tab[i].data; in au8522_mse2snr_lookup() 711 if (*snr >= strong) in au8522_led_status() 717 (((strong < *snr) ? (*snr - strong) : (strong - *snr)) <= 10)) in au8522_led_status() 736 snr); in au8522_read_snr() 741 snr); in au8522_read_snr() 746 snr); in au8522_read_snr() 749 au8522_led_status(state, snr); in au8522_read_snr() 764 u16 snr; in au8522_read_signal_strength() local 766 int ret = au8522_read_snr(fe, &snr); in au8522_read_signal_strength() [all …]
|
A D | lgdt330x.c | 526 state->snr = 0; in lgdt3302_read_snr() 531 state->snr = calculate_snr(noise, c); in lgdt3302_read_snr() 534 state->snr >> 24, (((state->snr >> 8) & 0xffff) * 100) >> 16); in lgdt3302_read_snr() 572 state->snr = 0; in lgdt3303_read_snr() 576 state->snr = calculate_snr(noise, c); in lgdt3303_read_snr() 579 state->snr >> 24, (((state->snr >> 8) & 0xffff) * 100) >> 16); in lgdt3303_read_snr() 588 *snr = (state->snr) >> 16; /* Convert from 8.24 fixed-point to 8.8 */ in lgdt330x_read_snr() 601 u16 snr; in lgdt330x_read_signal_strength() local 604 ret = fe->ops.read_snr(fe, &snr); in lgdt330x_read_signal_strength() 609 if (state->snr >= 8960 * 0x10000) in lgdt330x_read_signal_strength() [all …]
|
A D | or51132.c | 52 u32 snr; /* Result of last SNR calculation */ member 458 static int or51132_read_snr(struct dvb_frontend* fe, u16* snr) in or51132_read_snr() argument 501 state->snr = calculate_snr(noise, c) - usK; in or51132_read_snr() 502 *snr = (state->snr) >> 16; in or51132_read_snr() 505 state->snr >> 24, (((state->snr>>8) & 0xffff) * 100) >> 16); in or51132_read_snr() 516 u16 snr; in or51132_read_signal_strength() local 519 ret = fe->ops.read_snr(fe, &snr); in or51132_read_signal_strength() 524 if (state->snr >= 8960 * 0x10000) in or51132_read_signal_strength() 527 *strength = state->snr / 8960; in or51132_read_signal_strength()
|
A D | or51211.c | 52 u32 snr; /* Result of last SNR calculation */ member 281 static int or51211_read_snr(struct dvb_frontend* fe, u16* snr) in or51211_read_snr() argument 301 state->snr = calculate_snr(rec_buf[0], 89599047); in or51211_read_snr() 302 *snr = (state->snr) >> 16; in or51211_read_snr() 305 state->snr >> 24, (((state->snr>>8) & 0xffff) * 100) >> 16); in or51211_read_snr() 316 u16 snr; in or51211_read_signal_strength() local 319 ret = fe->ops.read_snr(fe, &snr); in or51211_read_signal_strength() 324 if (state->snr >= 8960 * 0x10000) in or51211_read_signal_strength() 327 *strength = state->snr / 8960; in or51211_read_signal_strength()
|
A D | s5h1411.c | 719 *snr = qam256_snr_tab[i].data; in s5h1411_qam256_lookup_snr() 734 *snr = qam64_snr_tab[i].data; in s5h1411_qam64_lookup_snr() 749 *snr = vsb_snr_tab[i].data; in s5h1411_vsb_lookup_snr() 754 dprintk("%s() snr=%d\n", __func__, *snr); in s5h1411_vsb_lookup_snr() 758 static int s5h1411_read_snr(struct dvb_frontend *fe, u16 *snr) in s5h1411_read_snr() argument 767 return s5h1411_qam64_lookup_snr(fe, snr, reg); in s5h1411_read_snr() 770 return s5h1411_qam256_lookup_snr(fe, snr, reg); in s5h1411_read_snr() 774 return s5h1411_vsb_lookup_snr(fe, snr, reg); in s5h1411_read_snr() 792 u16 snr; in s5h1411_read_signal_strength() local 794 int ret = s5h1411_read_snr(fe, &snr); in s5h1411_read_signal_strength() [all …]
|
A D | s5h1409.c | 805 *snr = qam256_snr_tab[i].data; in s5h1409_qam256_lookup_snr() 820 *snr = qam64_snr_tab[i].data; in s5h1409_qam64_lookup_snr() 835 *snr = vsb_snr_tab[i].data; in s5h1409_vsb_lookup_snr() 840 dprintk("%s() snr=%d\n", __func__, *snr); in s5h1409_vsb_lookup_snr() 844 static int s5h1409_read_snr(struct dvb_frontend *fe, u16 *snr) in s5h1409_read_snr() argument 853 return s5h1409_qam64_lookup_snr(fe, snr, reg); in s5h1409_read_snr() 856 return s5h1409_qam256_lookup_snr(fe, snr, reg); in s5h1409_read_snr() 859 return s5h1409_vsb_lookup_snr(fe, snr, reg); in s5h1409_read_snr() 877 u16 snr; in s5h1409_read_signal_strength() local 879 int ret = s5h1409_read_snr(fe, &snr); in s5h1409_read_signal_strength() [all …]
|
A D | gp8psk-fe.c | 34 u16 snr; member 61 st->snr = (buf[1]) << 8 | buf[0]; in gp8psk_fe_update_status() 101 static int gp8psk_fe_read_snr(struct dvb_frontend* fe, u16 *snr) in gp8psk_fe_read_snr() argument 106 *snr = st->snr; in gp8psk_fe_read_snr() 117 if (st->snr > 0xf00) in gp8psk_fe_read_signal_strength() 120 *strength = (st->snr << 4) + st->snr; /* snr*17 */ in gp8psk_fe_read_signal_strength()
|
A D | lgdt3306a.c | 71 u32 snr; member 1512 u32 snr; in lgdt3306a_vsb_lock_poll() local 1526 snr = lgdt3306a_calculate_snr_x100(state); in lgdt3306a_vsb_lock_poll() 1542 u32 snr; in lgdt3306a_qam_lock_poll() local 1553 snr = lgdt3306a_calculate_snr_x100(state); in lgdt3306a_qam_lock_poll() 1629 *snr = state->snr/10; in lgdt3306a_read_snr() 1642 u16 snr; /* snr_x10 */ in lgdt3306a_read_signal_strength() local 1670 ret = fe->ops.read_snr(fe, &snr); in lgdt3306a_read_signal_strength() 1674 if (state->snr <= (ref_snr - 100)) in lgdt3306a_read_signal_strength() 1676 else if (state->snr <= ref_snr) in lgdt3306a_read_signal_strength() [all …]
|
A D | lg2160.c | 1215 static int lg2160_read_snr(struct dvb_frontend *fe, u16 *snr) in lg2160_read_snr() argument 1221 *snr = 0; in lg2160_read_snr() 1232 *snr = 0; in lg2160_read_snr() 1237 *snr = (snr2 | (snr1 << 8)); in lg2160_read_snr() 1243 static int lg2161_read_snr(struct dvb_frontend *fe, u16 *snr) in lg2161_read_snr() argument 1249 *snr = 0; in lg2161_read_snr() 1260 *snr = 0; in lg2161_read_snr() 1280 u16 snr; in lg216x_read_signal_strength() 1285 ret = fe->ops.read_snr(fe, &snr); in lg216x_read_signal_strength() 1290 if (state->snr >= 8960 * 0x10000) in lg216x_read_signal_strength() [all …]
|
A D | ds3000.c | 533 static int ds3000_read_snr(struct dvb_frontend *fe, u16 *snr) in ds3000_read_snr() argument 566 *snr = 0x0000; in ds3000_read_snr() 573 *snr = snr_value * 8 * 655; in ds3000_read_snr() 576 snr_reading, *snr); in ds3000_read_snr() 584 *snr = 0x0000; in ds3000_read_snr() 591 *snr = 0xffff; in ds3000_read_snr() 601 *snr = snr_value * 5 * 655; in ds3000_read_snr() 606 *snr = -(dvbs2_snr_tab[snr_reading - 1] / 1000); in ds3000_read_snr() 609 snr_reading, *snr); in ds3000_read_snr()
|
A D | lgdt3305.c | 51 u32 snr; member 983 static int lgdt3305_read_snr(struct dvb_frontend *fe, u16 *snr) in lgdt3305_read_snr() argument 1019 state->snr = calculate_snr(noise, c); in lgdt3305_read_snr() 1021 *snr = (state->snr / ((1 << 24) / 10)); in lgdt3305_read_snr() 1023 state->snr >> 24, (((state->snr >> 8) & 0xffff) * 100) >> 16); in lgdt3305_read_snr() 1039 u16 snr; in lgdt3305_read_signal_strength() local 1044 ret = fe->ops.read_snr(fe, &snr); in lgdt3305_read_signal_strength() 1049 if (state->snr >= 8960 * 0x10000) in lgdt3305_read_signal_strength() 1052 *strength = state->snr / 8960; in lgdt3305_read_signal_strength()
|
/linux/drivers/media/usb/dvb-usb-v2/ |
A D | mxl111sf-demod.c | 398 u16 *snr) in mxl111sf_demod_calc_snr() argument 403 *snr = 0; in mxl111sf_demod_calc_snr() 425 *snr /= 10; /* 0.1 dB */ in mxl111sf_demod_read_snr() 472 u16 snr; in mxl111sf_demod_read_signal_strength() local 474 ret = mxl111sf_demod_calc_snr(state, &snr); in mxl111sf_demod_read_signal_strength() 483 *signal_strength = (snr >= 1300) ? in mxl111sf_demod_read_signal_strength() 484 min(65535, snr * 44) : snr * 38; in mxl111sf_demod_read_signal_strength() 487 *signal_strength = (snr >= 1500) ? in mxl111sf_demod_read_signal_strength() 488 min(65535, snr * 38) : snr * 33; in mxl111sf_demod_read_signal_strength() 491 *signal_strength = (snr >= 2000) ? in mxl111sf_demod_read_signal_strength() [all …]
|
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/bios/ |
A D | M0205.c | 30 u8 *ver, u8 *hdr, u8 *cnt, u8 *len, u8 *snr, u8 *ssz) in nvbios_M0205Te() argument 45 *snr = nvbios_rd08(bios, data + 0x04); in nvbios_M0205Te() 59 u8 *ver, u8 *hdr, u8 *cnt, u8 *len, u8 *snr, u8 *ssz, in nvbios_M0205Tp() argument 62 u32 data = nvbios_M0205Te(bios, ver, hdr, cnt, len, snr, ssz); in nvbios_M0205Tp() 78 u8 snr, ssz; in nvbios_M0205Ee() local 79 u32 data = nvbios_M0205Te(bios, ver, hdr, cnt, len, &snr, &ssz); in nvbios_M0205Ee() 81 data = data + *hdr + idx * (*len + (snr * ssz)); in nvbios_M0205Ee() 83 *cnt = snr; in nvbios_M0205Ee()
|
A D | perf.c | 31 u8 *cnt, u8 *len, u8 *snr, u8 *ssz) in nvbios_perf_table() argument 45 *snr = nvbios_rd08(bios, perf + 4); in nvbios_perf_table() 52 *snr = nvbios_rd08(bios, perf + 4); in nvbios_perf_table() 68 *snr = 0; in nvbios_perf_table() 82 u8 snr, ssz; in nvbios_perf_entry() local 83 u32 perf = nvbios_perf_table(bios, ver, hdr, cnt, len, &snr, &ssz); in nvbios_perf_entry() 85 perf = perf + *hdr + (idx * (*len + (snr * ssz))); in nvbios_perf_entry() 87 *cnt = snr; in nvbios_perf_entry() 205 u8 ver, hdr, cnt, len, snr, ssz; in nvbios_perf_fan_parse() local 206 u32 perf = nvbios_perf_table(bios, &ver, &hdr, &cnt, &len, &snr, &ssz); in nvbios_perf_fan_parse()
|
A D | boost.c | 30 u8 *ver, u8 *hdr, u8 *cnt, u8 *len, u8 *snr, u8 *ssz) in nvbios_boostTe() argument 46 *snr = nvbios_rd08(bios, boost + 4); in nvbios_boostTe() 62 u8 snr, ssz; in nvbios_boostEe() local 63 u32 data = nvbios_boostTe(bios, ver, hdr, cnt, len, &snr, &ssz); in nvbios_boostEe() 65 data = data + *hdr + (idx * (*len + (snr * ssz))); in nvbios_boostEe() 67 *cnt = snr; in nvbios_boostEe()
|
A D | M0209.c | 30 u8 *ver, u8 *hdr, u8 *cnt, u8 *len, u8 *snr, u8 *ssz) in nvbios_M0209Te() argument 45 *snr = 1; in nvbios_M0209Te() 61 u8 snr, ssz; in nvbios_M0209Ee() local 62 u32 data = nvbios_M0209Te(bios, ver, hdr, cnt, len, &snr, &ssz); in nvbios_M0209Ee() 64 data = data + *hdr + idx * (*len + (snr * ssz)); in nvbios_M0209Ee() 66 *cnt = snr; in nvbios_M0209Ee()
|
A D | timing.c | 30 u8 *ver, u8 *hdr, u8 *cnt, u8 *len, u8 *snr, u8 *ssz) in nvbios_timingTe() argument 49 *snr = 0; in nvbios_timingTe() 56 *snr = nvbios_rd08(bios, timing + 4); in nvbios_timingTe() 72 u8 snr, ssz; in nvbios_timingEe() local 73 u32 timing = nvbios_timingTe(bios, ver, hdr, cnt, len, &snr, &ssz); in nvbios_timingEe() 75 timing += *hdr + idx * (*len + (snr * ssz)); in nvbios_timingEe() 77 *cnt = snr; in nvbios_timingEe()
|
A D | rammap.c | 30 u8 *cnt, u8 *len, u8 *snr, u8 *ssz) in nvbios_rammapTe() argument 47 *snr = nvbios_rd08(bios, rammap + 4); in nvbios_rammapTe() 63 u8 snr, ssz; in nvbios_rammapEe() local 64 u32 rammap = nvbios_rammapTe(bios, ver, hdr, cnt, len, &snr, &ssz); in nvbios_rammapEe() 66 rammap = rammap + *hdr + (idx * (*len + (snr * ssz))); in nvbios_rammapEe() 68 *cnt = snr; in nvbios_rammapEe()
|
/linux/drivers/media/dvb-frontends/cxd2880/ |
A D | cxd2880_tnrdmd_dvbt_mon.c | 434 u32 reg_value, int *snr) in dvbt_calc_snr() argument 436 if (!tnr_dmd || !snr) in dvbt_calc_snr() 446 *snr = (*snr + 839) / 1678 + 28500; in dvbt_calc_snr() 452 int *snr) in cxd2880_tnrdmd_dvbt_mon_snr() argument 457 if (!tnr_dmd || !snr) in cxd2880_tnrdmd_dvbt_mon_snr() 460 *snr = -1000 * 1000; in cxd2880_tnrdmd_dvbt_mon_snr() 476 ret = dvbt_calc_snr(tnr_dmd, reg_value, snr); in cxd2880_tnrdmd_dvbt_mon_snr() 490 *tnr_dmd, int *snr, in cxd2880_tnrdmd_dvbt_mon_snr_diver() argument 497 if (!tnr_dmd || !snr || !snr_main || !snr_sub) in cxd2880_tnrdmd_dvbt_mon_snr_diver() 500 *snr = -1000 * 1000; in cxd2880_tnrdmd_dvbt_mon_snr_diver() [all …]
|
A D | cxd2880_tnrdmd_dvbt_mon.h | 57 int *snr); 60 *tnr_dmd, int *snr,
|
A D | cxd2880_tnrdmd_dvbt2_mon.c | 1281 u32 reg_value, int *snr) in dvbt2_calc_snr() argument 1283 if (!tnr_dmd || !snr) in dvbt2_calc_snr() 1293 *snr = (*snr + 839) / 1678 + 32000; in dvbt2_calc_snr() 1299 int *snr) in cxd2880_tnrdmd_dvbt2_mon_snr() argument 1304 if (!tnr_dmd || !snr) in cxd2880_tnrdmd_dvbt2_mon_snr() 1307 *snr = -1000 * 1000; in cxd2880_tnrdmd_dvbt2_mon_snr() 1323 ret = dvbt2_calc_snr(tnr_dmd, reg_value, snr); in cxd2880_tnrdmd_dvbt2_mon_snr() 1337 *tnr_dmd, int *snr, in cxd2880_tnrdmd_dvbt2_mon_snr_diver() argument 1344 if (!tnr_dmd || !snr || !snr_main || !snr_sub) in cxd2880_tnrdmd_dvbt2_mon_snr_diver() 1347 *snr = -1000 * 1000; in cxd2880_tnrdmd_dvbt2_mon_snr_diver() [all …]
|
/linux/Documentation/userspace-api/media/dvb/ |
A D | fe-read-snr.rst | 22 ``int ioctl(int fd, FE_READ_SNR, int16_t *snr)`` 30 ``snr`` 31 The signal-to-noise ratio is stored into \*snr.
|
/linux/drivers/net/wireless/marvell/mwifiex/ |
A D | util.c | 359 addr2, rx_pd->nf, rx_pd->snr); in mwifiex_parse_mgmt_packet() 362 rx_pd->snr, in mwifiex_parse_mgmt_packet() 429 CAL_RSSI(rx_pd->snr, rx_pd->nf), skb->data, pkt_len, in mwifiex_process_mgmt_packet() 692 u8 rx_rate, s8 snr, s8 nflr) in mwifiex_hist_data_add() argument 698 mwifiex_hist_data_set(priv, rx_rate, snr, nflr); in mwifiex_hist_data_add() 702 void mwifiex_hist_data_set(struct mwifiex_private *priv, u8 rx_rate, s8 snr, in mwifiex_hist_data_set() argument 707 s8 rssi = snr - nflr; in mwifiex_hist_data_set() 711 atomic_inc(&phist_data->snr[snr + 128]); in mwifiex_hist_data_set() 726 atomic_set(&phist_data->snr[ix], 0); in mwifiex_hist_data_reset()
|
/linux/drivers/media/usb/dvb-usb/ |
A D | cinergyT2-fe.c | 198 static int cinergyt2_fe_read_snr(struct dvb_frontend *fe, u16 *snr) in cinergyt2_fe_read_snr() argument 202 *snr = (state->status.snr << 8) | state->status.snr; in cinergyt2_fe_read_snr()
|
A D | vp702x-fe.c | 32 u8 snr; member 51 st->snr = buf[0]; in vp702x_fe_refresh_state() 117 static int vp702x_fe_read_snr(struct dvb_frontend* fe, u16 *snr) in vp702x_fe_read_snr() argument 123 _snr = (st->snr & 0x1f) * 0xff / 0x1f; in vp702x_fe_read_snr() 124 *snr = (_snr << 8) | _snr; in vp702x_fe_read_snr()
|