Lines Matching +full:3 +full:- +full:d

24 	/* k << 15 (source: hfc-4s/8s documentation (www.colognechip.de)) */
31 {'1', '2', '3', 'A'},
34 {'*', '0', '#', 'D'}
42 dsp->dtmf.size = 0; in dsp_dtmf_goertzel_init()
43 dsp->dtmf.lastwhat = '\0'; in dsp_dtmf_goertzel_init()
44 dsp->dtmf.lastdigit = '\0'; in dsp_dtmf_goertzel_init()
45 dsp->dtmf.count = 0; in dsp_dtmf_goertzel_init()
54 if (!dsp->dtmf.enable) in dsp_dtmf_hardware()
57 if (!dsp->features.hfc_dtmf) in dsp_dtmf_hardware()
61 if (dsp->tx_volume) { in dsp_dtmf_hardware()
65 __func__, dsp->name); in dsp_dtmf_hardware()
68 if (dsp->rx_volume) { in dsp_dtmf_hardware()
72 __func__, dsp->name); in dsp_dtmf_hardware()
76 if (dsp->bf_enable) { in dsp_dtmf_hardware()
80 __func__, dsp->name); in dsp_dtmf_hardware()
84 if (dsp->pipeline.inuse) { in dsp_dtmf_hardware()
88 __func__, dsp->name); in dsp_dtmf_hardware()
92 dsp->dtmf.hardware = hardware; in dsp_dtmf_hardware()
93 dsp->dtmf.software = !hardware; in dsp_dtmf_hardware()
112 * dtmf - points to a structure of the current dtmf state
113 * spl and len - the sample
114 * fmt - 0 = alaw, 1 = ulaw, 2 = coefficients from HFC DTMF hw-decoder
130 dsp->dtmf.digits[0] = '\0'; in dsp_dtmf_goertzel_decode()
137 size = dsp->dtmf.size; in dsp_dtmf_goertzel_decode()
138 buf = dsp->dtmf.buffer; in dsp_dtmf_goertzel_decode()
144 len--; in dsp_dtmf_goertzel_decode()
153 "size. (is=%d < must=%d)\n", in dsp_dtmf_goertzel_decode()
155 return dsp->dtmf.digits; in dsp_dtmf_goertzel_decode()
161 if (sk > 32767 || sk < -32767 || sk2 > 32767 in dsp_dtmf_goertzel_decode()
162 || sk2 < -32767) in dsp_dtmf_goertzel_decode()
164 "DTMF-Detection overflow\n"); in dsp_dtmf_goertzel_decode()
167 (sk * sk) - in dsp_dtmf_goertzel_decode()
172 len -= 64; in dsp_dtmf_goertzel_decode()
176 dsp->dtmf.size = size; in dsp_dtmf_goertzel_decode()
179 return dsp->dtmf.digits; in dsp_dtmf_goertzel_decode()
181 dsp->dtmf.size = 0; in dsp_dtmf_goertzel_decode()
183 /* now we have a full buffer of signed long samples - we do goertzel */ in dsp_dtmf_goertzel_decode()
188 buf = dsp->dtmf.buffer; in dsp_dtmf_goertzel_decode()
191 sk = ((cos2pik_ * sk1) >> 15) - sk2 + (*buf++); in dsp_dtmf_goertzel_decode()
197 if (sk > 32767 || sk < -32767 || sk2 > 32767 || sk2 < -32767) in dsp_dtmf_goertzel_decode()
198 printk(KERN_WARNING "DTMF-Detection overflow\n"); in dsp_dtmf_goertzel_decode()
201 (sk * sk) - in dsp_dtmf_goertzel_decode()
214 if (result[i] > dsp->dtmf.treshold) { in dsp_dtmf_goertzel_decode()
231 "tresh(%d) too small set tresh/100 to 1\n", in dsp_dtmf_goertzel_decode()
234 printk(KERN_DEBUG "a %3d %3d %3d %3d %3d %3d %3d %3d" in dsp_dtmf_goertzel_decode()
235 " tr:%3d r %3d %3d %3d %3d %3d %3d %3d %3d\n", in dsp_dtmf_goertzel_decode()
237 result[3] / 10000, result[4] / 10000, result[5] / 10000, in dsp_dtmf_goertzel_decode()
240 result[2] / (tresh_100), result[3] / (tresh_100), in dsp_dtmf_goertzel_decode()
246 lowgroup = -1; in dsp_dtmf_goertzel_decode()
247 highgroup = -1; in dsp_dtmf_goertzel_decode()
248 treshl = tresh >> 3; /* tones which are not on, must be below 9 dB */ in dsp_dtmf_goertzel_decode()
254 lowgroup = -1; in dsp_dtmf_goertzel_decode()
255 highgroup = -1; in dsp_dtmf_goertzel_decode()
263 lowgroup = -1; in dsp_dtmf_goertzel_decode()
271 highgroup = -1; in dsp_dtmf_goertzel_decode()
274 highgroup = i - (NCOEFF / 2); in dsp_dtmf_goertzel_decode()
287 if (dsp->dtmf.lastwhat != what) in dsp_dtmf_goertzel_decode()
288 dsp->dtmf.count = 0; in dsp_dtmf_goertzel_decode()
290 /* the tone (or no tone) must remain 3 times without change */ in dsp_dtmf_goertzel_decode()
291 if (dsp->dtmf.count == 2) { in dsp_dtmf_goertzel_decode()
292 if (dsp->dtmf.lastdigit != what) { in dsp_dtmf_goertzel_decode()
293 dsp->dtmf.lastdigit = what; in dsp_dtmf_goertzel_decode()
298 if ((strlen(dsp->dtmf.digits) + 1) in dsp_dtmf_goertzel_decode()
299 < sizeof(dsp->dtmf.digits)) { in dsp_dtmf_goertzel_decode()
300 dsp->dtmf.digits[strlen( in dsp_dtmf_goertzel_decode()
301 dsp->dtmf.digits) + 1] = '\0'; in dsp_dtmf_goertzel_decode()
302 dsp->dtmf.digits[strlen( in dsp_dtmf_goertzel_decode()
303 dsp->dtmf.digits)] = what; in dsp_dtmf_goertzel_decode()
308 dsp->dtmf.count++; in dsp_dtmf_goertzel_decode()
310 dsp->dtmf.lastwhat = what; in dsp_dtmf_goertzel_decode()