Lines Matching refs:cnt
322 for(cnt=0; cnt<IXJMAX; cnt++) in ixj_alloc()
324 if(ixj[cnt] == NULL || !ixj[cnt]->DSPbase) in ixj_alloc()
329 ixj[cnt] = j; in ixj_alloc()
371 int cnt; in ixj_alloc() local
372 for(cnt=0; cnt<IXJMAX; cnt++) { in ixj_alloc()
373 if(!ixj[cnt].DSPbase) in ixj_alloc()
374 return &ixj[cnt]; in ixj_alloc()
2152 int cnt; in ixj_release() local
2304 for (cnt = 0; cnt < 4; cnt++) in ixj_release()
2305 j->cadence_f[cnt].enable = 0; in ixj_release()
2340 for (cnt = 0; cnt < 35; cnt++) in ixj_release()
2341 j->ixj_signals[cnt] = SIGIO; in ixj_release()
2355 unsigned short fc, cnt, trg; in read_filters() local
2376 for (cnt = 0; cnt < 4; cnt++) { in read_filters()
2377 if (ixj_WriteDSPCommand(0x5154 + cnt, j)) { in read_filters()
2379 printk(KERN_INFO "Select Filter %d failed!\n", cnt); in read_filters()
2385 printk(KERN_INFO "Read Filter History %d failed!\n", cnt); in read_filters()
2389 j->filter_hist[cnt] = j->ssr.high << 8 | j->ssr.low; in read_filters()
2391 if (j->cadence_f[cnt].enable) { in read_filters()
2392 if (j->filter_hist[cnt] & 3 && !(j->filter_hist[cnt] & 12)) { in read_filters()
2393 if (j->cadence_f[cnt].state == 0) { in read_filters()
2394 j->cadence_f[cnt].state = 1; in read_filters()
2395 …j->cadence_f[cnt].on1min = jiffies + (long)((j->cadence_f[cnt].on1 * (hertz * (100 - var)) / 10000… in read_filters()
2396 j->cadence_f[cnt].on1dot = jiffies + (long)((j->cadence_f[cnt].on1 * (hertz * (100)) / 10000)); in read_filters()
2397 …j->cadence_f[cnt].on1max = jiffies + (long)((j->cadence_f[cnt].on1 * (hertz * (100 + var)) / 10000… in read_filters()
2398 } else if (j->cadence_f[cnt].state == 2 && in read_filters()
2399 (time_after(jiffies, j->cadence_f[cnt].off1min) && in read_filters()
2400 time_before(jiffies, j->cadence_f[cnt].off1max))) { in read_filters()
2401 if (j->cadence_f[cnt].on2) { in read_filters()
2402 j->cadence_f[cnt].state = 3; in read_filters()
2403 …j->cadence_f[cnt].on2min = jiffies + (long)((j->cadence_f[cnt].on2 * (hertz * (100 - var)) / 10000… in read_filters()
2404 … j->cadence_f[cnt].on2dot = jiffies + (long)((j->cadence_f[cnt].on2 * (hertz * (100)) / 10000)); in read_filters()
2405 …j->cadence_f[cnt].on2max = jiffies + (long)((j->cadence_f[cnt].on2 * (hertz * (100 + var)) / 10000… in read_filters()
2407 j->cadence_f[cnt].state = 7; in read_filters()
2409 } else if (j->cadence_f[cnt].state == 4 && in read_filters()
2410 (time_after(jiffies, j->cadence_f[cnt].off2min) && in read_filters()
2411 time_before(jiffies, j->cadence_f[cnt].off2max))) { in read_filters()
2412 if (j->cadence_f[cnt].on3) { in read_filters()
2413 j->cadence_f[cnt].state = 5; in read_filters()
2414 …j->cadence_f[cnt].on3min = jiffies + (long)((j->cadence_f[cnt].on3 * (hertz * (100 - var)) / 10000… in read_filters()
2415 … j->cadence_f[cnt].on3dot = jiffies + (long)((j->cadence_f[cnt].on3 * (hertz * (100)) / 10000)); in read_filters()
2416 …j->cadence_f[cnt].on3max = jiffies + (long)((j->cadence_f[cnt].on3 * (hertz * (100 + var)) / 10000… in read_filters()
2418 j->cadence_f[cnt].state = 7; in read_filters()
2421 j->cadence_f[cnt].state = 0; in read_filters()
2423 } else if (j->filter_hist[cnt] & 12 && !(j->filter_hist[cnt] & 3)) { in read_filters()
2424 if (j->cadence_f[cnt].state == 1) { in read_filters()
2425 if(!j->cadence_f[cnt].on1) { in read_filters()
2426 j->cadence_f[cnt].state = 7; in read_filters()
2427 } else if((time_after(jiffies, j->cadence_f[cnt].on1min) && in read_filters()
2428 time_before(jiffies, j->cadence_f[cnt].on1max))) { in read_filters()
2429 if(j->cadence_f[cnt].off1) { in read_filters()
2430 j->cadence_f[cnt].state = 2; in read_filters()
2431 …j->cadence_f[cnt].off1min = jiffies + (long)((j->cadence_f[cnt].off1 * (hertz * (100 - var)) / 100… in read_filters()
2432 … j->cadence_f[cnt].off1dot = jiffies + (long)((j->cadence_f[cnt].off1 * (hertz * (100)) / 10000)); in read_filters()
2433 …j->cadence_f[cnt].off1max = jiffies + (long)((j->cadence_f[cnt].off1 * (hertz * (100 + var)) / 100… in read_filters()
2435 j->cadence_f[cnt].state = 7; in read_filters()
2438 j->cadence_f[cnt].state = 0; in read_filters()
2440 } else if (j->cadence_f[cnt].state == 3) { in read_filters()
2441 if((time_after(jiffies, j->cadence_f[cnt].on2min) && in read_filters()
2442 time_before(jiffies, j->cadence_f[cnt].on2max))) { in read_filters()
2443 if(j->cadence_f[cnt].off2) { in read_filters()
2444 j->cadence_f[cnt].state = 4; in read_filters()
2445 …j->cadence_f[cnt].off2min = jiffies + (long)((j->cadence_f[cnt].off2 * (hertz * (100 - var)) / 100… in read_filters()
2446 … j->cadence_f[cnt].off2dot = jiffies + (long)((j->cadence_f[cnt].off2 * (hertz * (100)) / 10000)); in read_filters()
2447 …j->cadence_f[cnt].off2max = jiffies + (long)((j->cadence_f[cnt].off2 * (hertz * (100 + var)) / 100… in read_filters()
2449 j->cadence_f[cnt].state = 7; in read_filters()
2452 j->cadence_f[cnt].state = 0; in read_filters()
2454 } else if (j->cadence_f[cnt].state == 5) { in read_filters()
2455 if ((time_after(jiffies, j->cadence_f[cnt].on3min) && in read_filters()
2456 time_before(jiffies, j->cadence_f[cnt].on3max))) { in read_filters()
2457 if(j->cadence_f[cnt].off3) { in read_filters()
2458 j->cadence_f[cnt].state = 6; in read_filters()
2459 …j->cadence_f[cnt].off3min = jiffies + (long)((j->cadence_f[cnt].off3 * (hertz * (100 - var)) / 100… in read_filters()
2460 … j->cadence_f[cnt].off3dot = jiffies + (long)((j->cadence_f[cnt].off3 * (hertz * (100)) / 10000)); in read_filters()
2461 …j->cadence_f[cnt].off3max = jiffies + (long)((j->cadence_f[cnt].off3 * (hertz * (100 + var)) / 100… in read_filters()
2463 j->cadence_f[cnt].state = 7; in read_filters()
2466 j->cadence_f[cnt].state = 0; in read_filters()
2469 j->cadence_f[cnt].state = 0; in read_filters()
2472 switch(j->cadence_f[cnt].state) { in read_filters()
2474 if(time_after(jiffies, j->cadence_f[cnt].on1dot) && in read_filters()
2475 !j->cadence_f[cnt].off1 && in read_filters()
2476 !j->cadence_f[cnt].on2 && !j->cadence_f[cnt].off2 && in read_filters()
2477 !j->cadence_f[cnt].on3 && !j->cadence_f[cnt].off3) { in read_filters()
2478 j->cadence_f[cnt].state = 7; in read_filters()
2482 if(time_after(jiffies, j->cadence_f[cnt].on2dot) && in read_filters()
2483 !j->cadence_f[cnt].off2 && in read_filters()
2484 !j->cadence_f[cnt].on3 && !j->cadence_f[cnt].off3) { in read_filters()
2485 j->cadence_f[cnt].state = 7; in read_filters()
2489 if(time_after(jiffies, j->cadence_f[cnt].on3dot) && in read_filters()
2490 !j->cadence_f[cnt].off3) { in read_filters()
2491 j->cadence_f[cnt].state = 7; in read_filters()
2498 …printk(KERN_INFO "IXJ Tone Cadence state = %d /dev/phone%d at %ld\n", j->cadence_f[cnt].state, j->… in read_filters()
2499 switch(j->cadence_f[cnt].state) { in read_filters()
2505 …j->cadence_f[cnt].on1, j->cadence_f[cnt].on1min, j->cadence_f[cnt].on1dot, j->cadence_f[cnt].on1ma… in read_filters()
2508 …FO "IXJ /dev/phone%d Next Tone Cadence state at %ld - %ld\n", j->board, j->cadence_f[cnt].off1min, in read_filters()
2509 j->cadence_f[cnt].off1max); in read_filters()
2512 …INFO "IXJ /dev/phone%d Next Tone Cadence state at %ld - %ld\n", j->board, j->cadence_f[cnt].on2min, in read_filters()
2513 j->cadence_f[cnt].on2max); in read_filters()
2516 …NFO "IXJ /dev/phone%d Next Tone Cadence state at %ld - %ld\n", j->board, j->cadence_f[cnt].off2min, in read_filters()
2517 j->cadence_f[cnt].off2max); in read_filters()
2520 …INFO "IXJ /dev/phone%d Next Tone Cadence state at %ld - %ld\n", j->board, j->cadence_f[cnt].on3min, in read_filters()
2521 j->cadence_f[cnt].on3max); in read_filters()
2524 …NFO "IXJ /dev/phone%d Next Tone Cadence state at %ld - %ld\n", j->board, j->cadence_f[cnt].off3min, in read_filters()
2525 j->cadence_f[cnt].off3max); in read_filters()
2530 if (j->cadence_f[cnt].state == 7) { in read_filters()
2531 j->cadence_f[cnt].state = 0; in read_filters()
2532 if (j->cadence_f[cnt].enable == 1) in read_filters()
2533 j->cadence_f[cnt].enable = 0; in read_filters()
2534 switch (cnt) { in read_filters()
2565 if (j->filter_en[cnt] && ((j->filter_hist[cnt] & 3 && !(j->filter_hist[cnt] & 12)) || in read_filters()
2566 (j->filter_hist[cnt] & 12 && !(j->filter_hist[cnt] & 3)))) { in read_filters()
2567 if((j->filter_hist[cnt] & 3 && !(j->filter_hist[cnt] & 12))) { in read_filters()
2569 } else if((j->filter_hist[cnt] & 12 && !(j->filter_hist[cnt] & 3))) { in read_filters()
2572 switch (cnt) { in read_filters()
2913 int cnt, dly; in ixj_read_frame() local
2916 for (cnt = 0; cnt < j->rec_frame_size * 2; cnt += 2) { in ixj_read_frame()
2917 if (!(cnt % 16) && !IsRxReady(j)) { in ixj_read_frame()
2928 if (j->rec_codec == G729 && (cnt == 0 || cnt == 10 || cnt == 20)) { in ixj_read_frame()
2932 *(j->read_buffer + cnt) = inb_p(j->DSPbase + 0x0E); in ixj_read_frame()
2933 *(j->read_buffer + cnt + 1) = inb_p(j->DSPbase + 0x0F); in ixj_read_frame()
2938 for (cnt = 0; cnt < j->rec_frame_size * 2; cnt += 2) { in ixj_read_frame()
2939 if (!(cnt % 16) && !IsTxReady(j)) { in ixj_read_frame()
2949 outb_p(*(j->read_buffer + cnt), get_ixj(j->intercom)->DSPbase + 0x0C); in ixj_read_frame()
2950 outb_p(*(j->read_buffer + cnt + 1), get_ixj(j->intercom)->DSPbase + 0x0D); in ixj_read_frame()
3059 int cnt; in ixj_write_cid_seize() local
3061 for (cnt = 0; cnt < 150; cnt++) { in ixj_write_cid_seize()
3065 for (cnt = 0; cnt < 180; cnt++) { in ixj_write_cid_seize()
3072 int cnt; in ixj_write_cidcw_seize() local
3074 for (cnt = 0; cnt < 80; cnt++) { in ixj_write_cidcw_seize()
3081 int cnt; in ixj_write_cid_string() local
3083 for (cnt = 0; cnt < strlen(s); cnt++) { in ixj_write_cid_string()
3084 ixj_write_cid_byte(j, s[cnt]); in ixj_write_cid_string()
3085 checksum = (checksum + s[cnt]); in ixj_write_cid_string()
3092 int cnt; in ixj_pad_fsk() local
3094 for (cnt = 0; cnt < pad; cnt++) { in ixj_pad_fsk()
3098 for (cnt = 0; cnt < 720; cnt++) { in ixj_pad_fsk()
3451 int cnt, frame_count, dly; in ixj_write_frame() local
3456 for(cnt = 0; cnt < 480; cnt++) { in ixj_write_frame()
3457 if (!(cnt % 16) && !IsTxReady(j)) { in ixj_write_frame()
3470 cnt++; in ixj_write_frame()
3516 for (cnt = 0; cnt < 16; cnt++) { in ixj_write_frame()
3517 if (!(cnt % 16) && !IsTxReady(j)) { in ixj_write_frame()
3532 for (cnt = 0; cnt < 24; cnt++) { in ixj_write_frame()
3535 if(cnt == 12) { in ixj_write_frame()
3542 if (!(cnt % 16) && !IsTxReady(j)) { in ixj_write_frame()
3557 for (cnt = 0; cnt < j->play_frame_size * 2; cnt += 2) { in ixj_write_frame()
3558 if (!(cnt % 16) && !IsTxReady(j)) { in ixj_write_frame()
3569 if (j->play_codec == G729 && (cnt == 0 || cnt == 10 || cnt == 20)) { in ixj_write_frame()
3570 if (j->write_buffer_rp[cnt] == 0 && in ixj_write_frame()
3571 j->write_buffer_rp[cnt + 1] == 0 && in ixj_write_frame()
3572 j->write_buffer_rp[cnt + 2] == 0 && in ixj_write_frame()
3573 j->write_buffer_rp[cnt + 3] == 0 && in ixj_write_frame()
3574 j->write_buffer_rp[cnt + 4] == 0 && in ixj_write_frame()
3575 j->write_buffer_rp[cnt + 5] == 0 && in ixj_write_frame()
3576 j->write_buffer_rp[cnt + 6] == 0 && in ixj_write_frame()
3577 j->write_buffer_rp[cnt + 7] == 0 && in ixj_write_frame()
3578 j->write_buffer_rp[cnt + 8] == 0 && in ixj_write_frame()
3579 j->write_buffer_rp[cnt + 9] == 0) { in ixj_write_frame()
3589 outb_p(*(j->write_buffer_rp + cnt), j->DSPbase + 0x0C); in ixj_write_frame()
3590 outb_p(*(j->write_buffer_rp + cnt + 1), j->DSPbase + 0x0D); in ixj_write_frame()
3591 *(j->write_buffer_rp + cnt) = 0; in ixj_write_frame()
3592 *(j->write_buffer_rp + cnt + 1) = 0; in ixj_write_frame()
3633 int cnt; in set_base_frame() local
3638 for (cnt = 0; cnt < 10; cnt++) { in set_base_frame()
4635 int cnt; in SCI_WaitHighSCI() local
4639 for (cnt = 0; cnt < 10; cnt++) { in SCI_WaitHighSCI()
4655 int cnt; in SCI_WaitLowSCI() local
4659 for (cnt = 0; cnt < 10; cnt++) { in SCI_WaitLowSCI()
6083 int cnt; in capabilities_check() local
6085 for (cnt = 0; cnt < j->caps; cnt++) { in capabilities_check()
6086 if (pcreq->captype == j->caplist[cnt].captype in capabilities_check()
6087 && pcreq->cap == j->caplist[cnt].cap) { in capabilities_check()
6769 int cnt; in ixj_selfprobe() local
7073 for (cnt = 0; cnt < 4; cnt++) in ixj_selfprobe()
7074 j->cadence_f[cnt].enable = 0; in ixj_selfprobe()
7079 for (cnt = 0; cnt < 35; cnt++) in ixj_selfprobe()
7080 j->ixj_signals[cnt] = SIGIO; in ixj_selfprobe()
7125 int cnt; in ixj_get_status_proc() local
7134 for (cnt = 0; cnt < IXJMAX; cnt++) { in ixj_get_status_proc()
7135 j = get_ixj(cnt); in ixj_get_status_proc()
7139 len += sprintf(buf + len, "\nCard Num %d", cnt); in ixj_get_status_proc()
7428 int cnt; in cleanup() local
7431 for (cnt = 0; cnt < IXJMAX; cnt++) { in cleanup()
7432 j = get_ixj(cnt); in cleanup()
7435 printk(KERN_INFO "IXJ: Deleting timer for /dev/phone%d\n", cnt); in cleanup()
7447 printk(KERN_INFO "IXJ: Releasing XILINX address for /dev/phone%d\n", cnt); in cleanup()
7451 printk(KERN_INFO "IXJ: Releasing XILINX address for /dev/phone%d\n", cnt); in cleanup()
7459 printk(KERN_INFO "IXJ: Unregistering /dev/phone%d from LTAPI\n", cnt); in cleanup()
7462 printk(KERN_INFO "IXJ: Releasing DSP address for /dev/phone%d\n", cnt); in cleanup()
7466 printk(KERN_INFO "IXJ: Freeing memory for /dev/phone%d\n", cnt); in cleanup()
7468 ixj[cnt] = NULL; in cleanup()
7595 static int __init ixj_probe_isapnp(int *cnt) in ixj_probe_isapnp() argument
7645 j->board = *cnt; in ixj_probe_isapnp()
7662 ++*cnt; in ixj_probe_isapnp()
7675 static int __init ixj_probe_isa(int *cnt) in ixj_probe_isa() argument
7690 j->board = *cnt; in ixj_probe_isa()
7693 ++*cnt; in ixj_probe_isa()
7699 static int __init ixj_probe_pci(int *cnt) in ixj_probe_pci() argument
7705 for (i = 0; i < IXJMAX - *cnt; i++) { in ixj_probe_pci()
7720 j->board = *cnt; in ixj_probe_pci()
7724 ++*cnt; in ixj_probe_pci()
7732 int cnt = 0; in ixj_init() local
7735 cnt = 0; in ixj_init()
7738 if ((probe = ixj_probe_isapnp(&cnt)) < 0) { in ixj_init()
7741 if ((probe = ixj_probe_isa(&cnt)) < 0) { in ixj_init()
7744 if ((probe = ixj_probe_pci(&cnt)) < 0) { in ixj_init()
10427 int cnt, max; in ixj_init_filter() local
10470 for (cnt = 0; cnt < max; cnt++) { in ixj_init_filter()
10471 if (ixj_WriteDSPCommand(tone_table[jf->freq - 12][cnt], j)) in ixj_init_filter()
10482 int cnt, max; in ixj_init_filter_raw() local
10517 for (cnt = 0; cnt < max; cnt++) { in ixj_init_filter_raw()
10518 if (ixj_WriteDSPCommand(jfr->coeff[cnt], j)) in ixj_init_filter_raw()