Lines Matching refs:dsp
15 #include "dsp.h"
40 void dsp_dtmf_goertzel_init(struct dsp *dsp)
42 dsp->dtmf.size = 0;
43 dsp->dtmf.lastwhat = '\0';
44 dsp->dtmf.lastdigit = '\0';
45 dsp->dtmf.count = 0;
50 void dsp_dtmf_hardware(struct dsp *dsp)
54 if (!dsp->dtmf.enable)
57 if (!dsp->features.hfc_dtmf)
61 if (dsp->tx_volume) {
63 printk(KERN_DEBUG "%s dsp %s cannot do hardware DTMF, "
65 __func__, dsp->name);
68 if (dsp->rx_volume) {
70 printk(KERN_DEBUG "%s dsp %s cannot do hardware DTMF, "
72 __func__, dsp->name);
76 if (dsp->bf_enable) {
78 printk(KERN_DEBUG "%s dsp %s cannot do hardware DTMF, "
80 __func__, dsp->name);
84 if (dsp->pipeline.inuse) {
86 printk(KERN_DEBUG "%s dsp %s cannot do hardware DTMF, "
88 __func__, dsp->name);
92 dsp->dtmf.hardware = hardware;
93 dsp->dtmf.software = !hardware;
118 *dsp_dtmf_goertzel_decode(struct dsp *dsp, u8 *data, int len, int fmt)
130 dsp->dtmf.digits[0] = '\0';
137 size = dsp->dtmf.size;
138 buf = dsp->dtmf.buffer;
155 return dsp->dtmf.digits;
176 dsp->dtmf.size = size;
179 return dsp->dtmf.digits;
181 dsp->dtmf.size = 0;
188 buf = dsp->dtmf.buffer;
214 if (result[i] > dsp->dtmf.treshold) {
287 if (dsp->dtmf.lastwhat != what)
288 dsp->dtmf.count = 0;
291 if (dsp->dtmf.count == 2) {
292 if (dsp->dtmf.lastdigit != what) {
293 dsp->dtmf.lastdigit = what;
298 if ((strlen(dsp->dtmf.digits) + 1)
299 < sizeof(dsp->dtmf.digits)) {
300 dsp->dtmf.digits[strlen(
301 dsp->dtmf.digits) + 1] = '\0';
302 dsp->dtmf.digits[strlen(
303 dsp->dtmf.digits)] = what;
308 dsp->dtmf.count++;
310 dsp->dtmf.lastwhat = what;