Lines Matching refs:p
113 struct dtv_frontend_properties *p) in cx22700_set_tps() argument
121 if (p->code_rate_HP < FEC_1_2 || p->code_rate_HP > FEC_7_8) in cx22700_set_tps()
124 if (p->code_rate_LP < FEC_1_2 || p->code_rate_LP > FEC_7_8) in cx22700_set_tps()
127 if (p->code_rate_HP == FEC_4_5 || p->code_rate_LP == FEC_4_5) in cx22700_set_tps()
130 if ((int)p->guard_interval < GUARD_INTERVAL_1_32 || in cx22700_set_tps()
131 p->guard_interval > GUARD_INTERVAL_1_4) in cx22700_set_tps()
134 if (p->transmission_mode != TRANSMISSION_MODE_2K && in cx22700_set_tps()
135 p->transmission_mode != TRANSMISSION_MODE_8K) in cx22700_set_tps()
138 if (p->modulation != QPSK && in cx22700_set_tps()
139 p->modulation != QAM_16 && in cx22700_set_tps()
140 p->modulation != QAM_64) in cx22700_set_tps()
143 if ((int)p->hierarchy < HIERARCHY_NONE || in cx22700_set_tps()
144 p->hierarchy > HIERARCHY_4) in cx22700_set_tps()
147 if (p->bandwidth_hz > 8000000 || p->bandwidth_hz < 6000000) in cx22700_set_tps()
150 if (p->bandwidth_hz == 7000000) in cx22700_set_tps()
155 val = qam_tab[p->modulation - QPSK]; in cx22700_set_tps()
156 val |= p->hierarchy - HIERARCHY_NONE; in cx22700_set_tps()
160 if (p->code_rate_HP - FEC_1_2 >= sizeof(fec_tab) || in cx22700_set_tps()
161 p->code_rate_LP - FEC_1_2 >= sizeof(fec_tab)) in cx22700_set_tps()
163 val = fec_tab[p->code_rate_HP - FEC_1_2] << 3; in cx22700_set_tps()
164 val |= fec_tab[p->code_rate_LP - FEC_1_2]; in cx22700_set_tps()
168 val = (p->guard_interval - GUARD_INTERVAL_1_32) << 2; in cx22700_set_tps()
169 val |= p->transmission_mode - TRANSMISSION_MODE_2K; in cx22700_set_tps()
180 struct dtv_frontend_properties *p) in cx22700_get_tps() argument
196 p->hierarchy = HIERARCHY_AUTO; in cx22700_get_tps()
198 p->hierarchy = HIERARCHY_NONE + (val & 0x7); in cx22700_get_tps()
201 p->modulation = QAM_AUTO; in cx22700_get_tps()
203 p->modulation = qam_tab[(val >> 3) & 0x3]; in cx22700_get_tps()
208 p->code_rate_HP = FEC_AUTO; in cx22700_get_tps()
210 p->code_rate_HP = fec_tab[(val >> 3) & 0x07]; in cx22700_get_tps()
213 p->code_rate_LP = FEC_AUTO; in cx22700_get_tps()
215 p->code_rate_LP = fec_tab[val & 0x07]; in cx22700_get_tps()
219 p->guard_interval = GUARD_INTERVAL_1_32 + ((val >> 6) & 0x3); in cx22700_get_tps()
220 p->transmission_mode = TRANSMISSION_MODE_2K + ((val >> 5) & 0x1); in cx22700_get_tps()