Lines Matching refs:p
110 struct dtv_frontend_properties *p = &fe->dtv_property_cache; in apply_frontend_param() local
129 switch (p->bandwidth_hz) { in apply_frontend_param()
148 if (p->inversion != INVERSION_ON && in apply_frontend_param()
149 p->inversion != INVERSION_OFF) in apply_frontend_param()
152 if (p->code_rate_HP != FEC_1_2 && p->code_rate_HP != FEC_2_3 && in apply_frontend_param()
153 p->code_rate_HP != FEC_3_4 && p->code_rate_HP != FEC_5_6 && in apply_frontend_param()
154 p->code_rate_HP != FEC_7_8) in apply_frontend_param()
157 if (p->hierarchy != HIERARCHY_NONE && in apply_frontend_param()
158 (p->code_rate_LP != FEC_1_2 && p->code_rate_LP != FEC_2_3 && in apply_frontend_param()
159 p->code_rate_LP != FEC_3_4 && p->code_rate_LP != FEC_5_6 && in apply_frontend_param()
160 p->code_rate_LP != FEC_7_8)) in apply_frontend_param()
163 if (p->modulation != QPSK && p->modulation != QAM_16 && in apply_frontend_param()
164 p->modulation != QAM_64) in apply_frontend_param()
167 if (p->transmission_mode != TRANSMISSION_MODE_2K && in apply_frontend_param()
168 p->transmission_mode != TRANSMISSION_MODE_8K) in apply_frontend_param()
171 if ((int)p->guard_interval < GUARD_INTERVAL_1_32 || in apply_frontend_param()
172 p->guard_interval > GUARD_INTERVAL_1_4) in apply_frontend_param()
175 if ((int)p->hierarchy < HIERARCHY_NONE || in apply_frontend_param()
176 p->hierarchy > HIERARCHY_4) in apply_frontend_param()
190 spi_bias *= qam_tab[p->modulation]; in apply_frontend_param()
191 spi_bias /= p->code_rate_HP + 1; in apply_frontend_param()
192 spi_bias /= (guard_tab[p->guard_interval] + 32); in apply_frontend_param()
195 spi_bias *= p->code_rate_HP; in apply_frontend_param()
197 val0x04 = (p->transmission_mode << 2) | p->guard_interval; in apply_frontend_param()
198 val0x05 = fec_tab[p->code_rate_HP]; in apply_frontend_param()
200 if (p->hierarchy != HIERARCHY_NONE) in apply_frontend_param()
201 val0x05 |= (p->code_rate_LP - FEC_1_2) << 3; in apply_frontend_param()
203 val0x06 = (p->hierarchy << 2) | p->modulation; in apply_frontend_param()
213 p->transmission_mode == TRANSMISSION_MODE_2K ? 1 : 3); in apply_frontend_param()
221 (p->inversion == INVERSION_ON ? 0x80 : 0x00)); in apply_frontend_param()
235 struct dtv_frontend_properties *p) in get_frontend() argument
244 p->guard_interval = GUARD_INTERVAL_1_32; in get_frontend()
247 p->guard_interval = GUARD_INTERVAL_1_16; in get_frontend()
250 p->guard_interval = GUARD_INTERVAL_1_8; in get_frontend()
253 p->guard_interval = GUARD_INTERVAL_1_4; in get_frontend()
258 p->transmission_mode = TRANSMISSION_MODE_2K; in get_frontend()
261 p->transmission_mode = TRANSMISSION_MODE_8K; in get_frontend()
270 p->code_rate_HP = FEC_1_2; in get_frontend()
273 p->code_rate_HP = FEC_2_3; in get_frontend()
276 p->code_rate_HP = FEC_3_4; in get_frontend()
279 p->code_rate_HP = FEC_5_6; in get_frontend()
282 p->code_rate_HP = FEC_7_8; in get_frontend()
289 p->code_rate_LP = FEC_1_2; in get_frontend()
292 p->code_rate_LP = FEC_2_3; in get_frontend()
295 p->code_rate_LP = FEC_3_4; in get_frontend()
298 p->code_rate_LP = FEC_5_6; in get_frontend()
301 p->code_rate_LP = FEC_7_8; in get_frontend()
310 p->modulation = QPSK; in get_frontend()
313 p->modulation = QAM_16; in get_frontend()
316 p->modulation = QAM_64; in get_frontend()
323 p->hierarchy = HIERARCHY_NONE; in get_frontend()
326 p->hierarchy = HIERARCHY_1; in get_frontend()
329 p->hierarchy = HIERARCHY_2; in get_frontend()
332 p->hierarchy = HIERARCHY_4; in get_frontend()
340 p->inversion = (tmp & 0x80) ? INVERSION_ON : INVERSION_OFF; in get_frontend()
345 p->frequency += tmp; in get_frontend()