Lines Matching refs:N
93 static u32 int_goertzel(s16 x[], u32 N, u32 freq) in int_goertzel() argument
107 for (i = 0; i < N; i++) { in int_goertzel()
121 divisor = N * N; in int_goertzel()
127 static u32 freq_magnitude(s16 x[], u32 N, u32 freq) in freq_magnitude() argument
129 u32 sum = int_goertzel(x, N, freq); in freq_magnitude()
134 static u32 noise_magnitude(s16 x[], u32 N, u32 freq_start, u32 freq_end) in noise_magnitude() argument
141 if (N > 192) { in noise_magnitude()
143 x += (N - 192); in noise_magnitude()
144 N = 192; in noise_magnitude()
150 sum += int_goertzel(x, N, freq_start); in noise_magnitude()
157 static s32 detect_a2_a2m_eiaj(struct cx88_core *core, s16 x[], u32 N) in detect_a2_a2m_eiaj() argument
186 carrier = freq_magnitude(x, N, carrier_freq); in detect_a2_a2m_eiaj()
187 stereo = freq_magnitude(x, N, stereo_freq); in detect_a2_a2m_eiaj()
188 dual = freq_magnitude(x, N, dual_freq); in detect_a2_a2m_eiaj()
189 noise = noise_magnitude(x, N, FREQ_NOISE_START, FREQ_NOISE_END); in detect_a2_a2m_eiaj()
224 static s32 detect_btsc(struct cx88_core *core, s16 x[], u32 N) in detect_btsc() argument
226 s32 sap_ref = freq_magnitude(x, N, FREQ_BTSC_SAP_REF); in detect_btsc()
227 s32 sap = freq_magnitude(x, N, FREQ_BTSC_SAP); in detect_btsc()
228 s32 dual_ref = freq_magnitude(x, N, FREQ_BTSC_DUAL_REF); in detect_btsc()
229 s32 dual = freq_magnitude(x, N, FREQ_BTSC_DUAL); in detect_btsc()
237 static s16 *read_rds_samples(struct cx88_core *core, u32 *N) in read_rds_samples() argument
259 *N = sample_count; in read_rds_samples()
275 u32 N = 0; in cx88_dsp_detect_stereo_sap() local
288 samples = read_rds_samples(core, &N); in cx88_dsp_detect_stereo_sap()
298 ret = detect_a2_a2m_eiaj(core, samples, N); in cx88_dsp_detect_stereo_sap()
301 ret = detect_btsc(core, samples, N); in cx88_dsp_detect_stereo_sap()