Lines Matching refs:dsp
40 void dsp_dtmf_goertzel_init(struct dsp *dsp) in dsp_dtmf_goertzel_init() argument
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()
50 void dsp_dtmf_hardware(struct dsp *dsp) in dsp_dtmf_hardware() argument
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()
118 *dsp_dtmf_goertzel_decode(struct dsp *dsp, u8 *data, int len, int fmt) in dsp_dtmf_goertzel_decode() argument
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()
155 return dsp->dtmf.digits; 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()
188 buf = dsp->dtmf.buffer; in dsp_dtmf_goertzel_decode()
214 if (result[i] > dsp->dtmf.treshold) { 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()
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()