/linux/drivers/media/dvb-frontends/ |
H A D | or51211.c | 52 u32 snr; /* Result of last SNR calculation */ member 255 /* Calculate SNR estimation (scaled by 2^24) 257 8-VSB SNR equation from Oren datasheets 260 SNR[dB] = 10 * log10(219037.9454 / MSE^2 ) 262 We re-write the snr equation as: 263 SNR * 2^24 = 10*(c - 2*intlog10(MSE)) 273 /* Negative SNR, which is possible, but realisticly the in calculate_snr() 281 static int or51211_read_snr(struct dvb_frontend* fe, u16* snr) in or51211_read_snr() argument 287 /* SNR after Equalizer */ in or51211_read_snr() 293 pr_warn("error writing snr reg\n"); in or51211_read_snr() [all …]
|
H A D | lgdt330x.c | 57 u32 snr; /* Result of last SNR calculation */ member 452 * Calculate SNR estimation (scaled by 2^24) 454 * 8-VSB SNR equations from LGDT3302 and LGDT3303 datasheets, QAM 467 * SNR = 10 * log10( 688128 / MSEQAM) 469 * SNR = 10 * log10( 696320 / MSEQAM) 471 * We re-write the snr equation as: 472 * SNR * 2^24 = 10*(c - intlog10(MSE)) 483 * Negative SNR, which is possible, but realisticly the in calculate_snr() 497 u32 c; /* per-modulation SNR calculation constant */ in lgdt3302_read_snr() 504 /* SNR for ranges from -15.61 to +41.58 */ in lgdt3302_read_snr() [all …]
|
H A D | or51132.c | 52 u32 snr; /* Result of last SNR calculation */ member 422 /* Calculate SNR estimation (scaled by 2^24) 424 8-VSB SNR and QAM equations from Oren datasheets 427 SNR[dB] = 10 * log10(897152044.8282 / MSE^2 ) - K 433 SNR[dB] = 10 * log10(897152044.8282 / MSE^2 ) 436 SNR[dB] = 10 * log10(907832426.314266 / MSE^2 ) 438 We re-write the snr equation as: 439 SNR * 2^24 = 10*(c - 2*intlog10(MSE)) 450 /* Negative SNR, which is possible, but realisticly the in calculate_snr() 458 static int or51132_read_snr(struct dvb_frontend* fe, u16* snr) in or51132_read_snr() argument [all …]
|
H 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 105 /* snr is reported in dBu*256 */ in gp8psk_fe_read_snr() 106 *snr = st->snr; in gp8psk_fe_read_snr() 114 /* snr is reported in dBu*256 */ in gp8psk_fe_read_signal_strength() 115 /* snr / 38.4 ~= 100% strength */ in gp8psk_fe_read_signal_strength() 116 /* snr * 17 returns 100% strength as 65535 */ in gp8psk_fe_read_signal_strength() 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()
|
H A D | au8522_dig.c | 32 /* VSB SNR lookup table */ 66 /* QAM64 SNR lookup table */ 147 /* QAM256 SNR lookup table */ 216 u16 *snr) in au8522_mse2snr_lookup() argument 223 *snr = tab[i].data; in au8522_mse2snr_lookup() 228 dprintk("%s() snr=%d\n", __func__, *snr); in au8522_mse2snr_lookup() 692 static int au8522_led_status(struct au8522_state *state, const u16 *snr) in au8522_led_status() argument 711 if (*snr >= strong) in au8522_led_status() 717 (((strong < *snr) ? (*snr - strong) : (strong - *snr)) <= 10)) in au8522_led_status() 718 /* snr didn't change enough to bother in au8522_led_status() [all …]
|
H A D | s5h1409.c | 104 /* VSB SNR lookup table */ 151 /* QAM64 SNR lookup table */ 223 /* QAM256 SNR lookup table */ 798 static int s5h1409_qam256_lookup_snr(struct dvb_frontend *fe, u16 *snr, u16 v) in s5h1409_qam256_lookup_snr() argument 805 *snr = qam256_snr_tab[i].data; in s5h1409_qam256_lookup_snr() 813 static int s5h1409_qam64_lookup_snr(struct dvb_frontend *fe, u16 *snr, u16 v) in s5h1409_qam64_lookup_snr() argument 820 *snr = qam64_snr_tab[i].data; in s5h1409_qam64_lookup_snr() 828 static int s5h1409_vsb_lookup_snr(struct dvb_frontend *fe, u16 *snr, u16 v) in s5h1409_vsb_lookup_snr() argument 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() [all …]
|
H A D | s5h1411.c | 132 /* VSB SNR lookup table */ 177 /* QAM64 SNR lookup table */ 250 /* QAM256 SNR lookup table */ 712 static int s5h1411_qam256_lookup_snr(struct dvb_frontend *fe, u16 *snr, u16 v) in s5h1411_qam256_lookup_snr() argument 719 *snr = qam256_snr_tab[i].data; in s5h1411_qam256_lookup_snr() 727 static int s5h1411_qam64_lookup_snr(struct dvb_frontend *fe, u16 *snr, u16 v) in s5h1411_qam64_lookup_snr() argument 734 *snr = qam64_snr_tab[i].data; in s5h1411_qam64_lookup_snr() 742 static int s5h1411_vsb_lookup_snr(struct dvb_frontend *fe, u16 *snr, u16 v) in s5h1411_vsb_lookup_snr() argument 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() [all …]
|
H A D | lgdt3305.c | 51 u32 snr; member 975 /* Negative SNR, which is possible, but realisticly the in calculate_snr() 983 static int lgdt3305_read_snr(struct dvb_frontend *fe, u16 *snr) in lgdt3305_read_snr() argument 987 u32 c; /* per-modulation SNR calculation constant */ in lgdt3305_read_snr() 993 /* SNR for ranges from -13.11 to +44.08 */ in lgdt3305_read_snr() 1000 /* SNR for ranges from -16.12 to +44.08 */ in lgdt3305_read_snr() 1019 state->snr = calculate_snr(noise, c); in lgdt3305_read_snr() 1020 /* report SNR in dB * 10 */ in lgdt3305_read_snr() 1021 *snr = (state->snr / ((1 << 24) / 10)); in lgdt3305_read_snr() 1022 lg_dbg("noise = 0x%08x, snr = %d.%02d dB\n", noise, in lgdt3305_read_snr() [all …]
|
H 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() 1235 *snr = ((snr1 >> 4) * 100) + ((snr1 & 0x0f) * 10) + (snr2 >> 4); 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() 1263 *snr = ((snr1 >> 4) * 100) + ((snr1 & 0x0f) * 10) + (snr2 & 0x0f); in lg2161_read_snr() 1274 * Calculate strength from SNR up to 35dB in lg216x_read_signal_strength() [all …]
|
H A D | as102_fe.c | 349 * - in AS102 SNR=MER 350 * - the SNR will be returned in linear terms, i.e. not in dB 351 * - the accuracy equals ±2dB for a SNR range from 4dB to 30dB 352 * - the accuracy is >2dB for SNR values outside this range 354 static int as102_fe_read_snr(struct dvb_frontend *fe, u16 *snr) in as102_fe_read_snr() argument 358 *snr = state->demod_stats.mer; in as102_fe_read_snr()
|
H A D | lgdt3306a.c | 71 u32 snr; member 1111 /* SNR is over 18dB and no ghosting */ in lgdt3306a_monitor_vsb() 1288 /* SNR of Frame sync */ in lgdt3306a_pre_monitoring() 1512 u32 snr; in lgdt3306a_vsb_lock_poll() local 1526 snr = lgdt3306a_calculate_snr_x100(state); in lgdt3306a_vsb_lock_poll() 1527 dbg_info("cnt=%d errors=%d snr=%d\n", cnt, packet_error, snr); in lgdt3306a_vsb_lock_poll() 1529 if ((snr >= 1500) && (packet_error < 0xff)) 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() 1554 dbg_info("cnt=%d errors=%d snr=%d\n", cnt, packet_error, snr); in lgdt3306a_qam_lock_poll() [all …]
|
/linux/Documentation/devicetree/bindings/sound/ |
H A D | ti,pcm6240.yaml | 39 digital converter (ADC) with 106-dB SNR. 41 ti,adc5120: 2-Channel, 768-kHz, Burr-Brown™ Audio ADC with 120-dB SNR. 44 digital converter (ADC) with 123-dB SNR. 49 ti,pcm1690: Automotive Catalog 113dB SNR 8-Channel Audio DAC with 52 ti,pcm3120: Automotive, stereo, 106-dB SNR, 768-kHz, low-power 56 with 106-dB SNR. 58 ti,pcm5120: Automotive, stereo, 120-dB SNR, 768-kHz, low-power 62 with 120-dB SNR. 64 ti,pcm6120: Automotive, stereo, 123-dB SNR, 768-kHz, low-power 68 with 123-dB SNR.
|
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/bios/ |
H 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()
|
H 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()
|
H 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()
|
H 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()
|
H 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()
|
/linux/include/linux/mfd/ |
H A D | si476x-reports.h | 27 * @snrhint: SNR Detect High. 32 * @snrlint: SNR Detect Low. 50 * @snr_ready: SNR measurement in progress. 55 * snr < FM_VALID_SNR_THRESHOLD 60 * @snr: RF SNR Indicator(dB). 83 __s8 snr; member
|
/linux/drivers/media/usb/dvb-usb-v2/ |
H A D | mxl111sf-demod.c | 398 u16 *snr) in mxl111sf_demod_calc_snr() argument 403 *snr = 0; in mxl111sf_demod_calc_snr() 412 *snr = CALCULATE_SNR(val1 | ((val2 & 0x03) << 8)); in mxl111sf_demod_calc_snr() 417 static int mxl111sf_demod_read_snr(struct dvb_frontend *fe, u16 *snr) in mxl111sf_demod_read_snr() argument 421 int ret = mxl111sf_demod_calc_snr(state, snr); in mxl111sf_demod_read_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() [all …]
|
/linux/drivers/media/dvb-frontends/cxd2880/ |
H 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() 445 *snr = intlog10(reg_value) - intlog10(5350 - reg_value); 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() 482 cxd2880_tnrdmd_dvbt_mon_snr_diver(tnr_dmd, snr, &snr_main, in cxd2880_tnrdmd_dvbt_mon_snr() 490 *tnr_dmd, int *snr, in cxd2880_tnrdmd_dvbt_mon_snr_diver() argument [all …]
|
/linux/Documentation/userspace-api/media/dvb/ |
H 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/phy/ |
H A D | dp83td510.c | 44 /* Register values are converted to SNR(dB) as suggested by 46 * SNR(dB) = -10 * log10 (VAL/2^17) - 1.76 dB. 52 0x044c, /* 18dB =< SNR < 19dB */ 53 0x0369, /* 19dB =< SNR < 20dB */ 54 0x02b6, /* 20dB =< SNR < 21dB */ 55 0x0227, /* 21dB =< SNR < 22dB */ 56 0x01b6, /* 22dB =< SNR < 23dB */ 57 0x015b, /* 23dB =< SNR < 24dB */ 58 0x0000 /* 24dB =< SNR */
|
/linux/Documentation/admin-guide/media/ |
H A D | si476x.rst | 121 0x02 snrhint 0 - received signal's SNR has not 123 1 - received signal's SNR has 130 0x07 snr_ready Indicates that SNR metrics is ready 140 0x16 snr Signed RF SNR in dB
|
/linux/drivers/net/wireless/marvell/mwifiex/ |
H A D | util.c | 346 "TDLS discovery response %pM nf=%d, snr=%d\n", in mwifiex_parse_mgmt_packet() 347 addr2, rx_pd->nf, rx_pd->snr); in mwifiex_parse_mgmt_packet() 350 rx_pd->snr, in mwifiex_parse_mgmt_packet() 527 CAL_RSSI(rx_pd->snr, rx_pd->nf), skb->data, pkt_len, in mwifiex_process_mgmt_packet() 790 u8 rx_rate, s8 snr, s8 nflr) in mwifiex_hist_data_add() argument 796 mwifiex_hist_data_set(priv, rx_rate, snr, nflr); in mwifiex_hist_data_add() 800 void mwifiex_hist_data_set(struct mwifiex_private *priv, u8 rx_rate, s8 snr, in mwifiex_hist_data_set() argument 805 s8 rssi = snr - nflr; in mwifiex_hist_data_set() 809 atomic_inc(&phist_data->snr[snr + 128]); in mwifiex_hist_data_set() 824 atomic_set(&phist_data->snr[ix], 0); in mwifiex_hist_data_reset()
|
/linux/drivers/media/usb/dvb-usb/ |
H 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()
|