Lines Matching +full:is +full:- +full:dual

1 // SPDX-License-Identifier: GPL-2.0-or-later
9 #include "cx88-reg.h"
77 return -int_cos(x - INT_PI); in int_cos()
80 return -int_cos(INT_PI / 2 - (x % (INT_PI / 2))); in int_cos()
82 * Now x is between 0 and INT_PI/2. in int_cos()
89 ret = 32768 - t2 + t4 - t6 + t8; in int_cos()
108 s32 s = x[i] + ((s64)coeff * s_prev / 32768) - s_prev2; in int_goertzel()
114 tmp = (s64)s_prev2 * s_prev2 + (s64)s_prev * s_prev - in int_goertzel()
143 x += (N - 192); in noise_magnitude()
147 freq_step = (freq_end - freq_start) / (samples - 1); in noise_magnitude()
159 s32 carrier, stereo, dual, noise; in detect_a2_a2m_eiaj() local
163 switch (core->tvaudio) { in detect_a2_a2m_eiaj()
182 core->tvaudio, __func__); in detect_a2_a2m_eiaj()
188 dual = freq_magnitude(x, N, dual_freq); in detect_a2_a2m_eiaj()
192 "detect a2/a2m/eiaj: carrier=%d, stereo=%d, dual=%d, noise=%d\n", in detect_a2_a2m_eiaj()
193 carrier, stereo, dual, noise); in detect_a2_a2m_eiaj()
195 if (stereo > dual) in detect_a2_a2m_eiaj()
200 if (core->tvaudio == WW_EIAJ) { in detect_a2_a2m_eiaj()
202 if ((carrier > max(stereo, dual) * 2) && in detect_a2_a2m_eiaj()
203 (carrier < max(stereo, dual) * 6) && in detect_a2_a2m_eiaj()
205 (max(stereo, dual) > min(stereo, dual))) { in detect_a2_a2m_eiaj()
207 * For EIAJ the carrier is always present, in detect_a2_a2m_eiaj()
213 if ((carrier > max(stereo, dual) * 2) && in detect_a2_a2m_eiaj()
214 (carrier < max(stereo, dual) * 8) && in detect_a2_a2m_eiaj()
217 (max(stereo, dual) > min(stereo, dual) * 2)) { in detect_a2_a2m_eiaj()
229 s32 dual = freq_magnitude(x, N, FREQ_BTSC_DUAL); in detect_btsc() local
231 dprintk(1, "detect btsc: dual_ref=%d, dual=%d, sap_ref=%d, sap=%d\n", in detect_btsc()
232 dual_ref, dual, sap_ref, sap); in detect_btsc()
243 unsigned int bpl = srch->fifo_size / AUD_RDS_LINES; in read_rds_samples()
245 unsigned int sample_count = spl * (AUD_RDS_LINES - 1); in read_rds_samples()
247 u32 current_address = cx_read(srch->ptr1_reg); in read_rds_samples()
248 u32 offset = (current_address - srch->fifo_start + bpl); in read_rds_samples()
253 current_address - srch->fifo_start, sample_count, in read_rds_samples()
263 samples[i] = cx_read(srch->fifo_start + offset); in read_rds_samples()
278 /* If audio RDS fifo is disabled, we can't read the samples */ in cx88_dsp_detect_stereo_sap()
285 if (time_before(jiffies, core->last_change + msecs_to_jiffies(500))) in cx88_dsp_detect_stereo_sap()
293 switch (core->tvaudio) { in cx88_dsp_detect_stereo_sap()
318 (ret & V4L2_TUNER_SUB_LANG2) ? " dual" : ""); in cx88_dsp_detect_stereo_sap()