Lines Matching refs:cnt

316 	for(cnt=0; cnt<IXJMAX; cnt++)  in ixj_alloc()
318 if(ixj[cnt] == NULL || !ixj[cnt]->DSPbase) in ixj_alloc()
323 ixj[cnt] = j; in ixj_alloc()
367 int cnt; in ixj_alloc() local
368 for(cnt=0; cnt<IXJMAX; cnt++) in ixj_alloc()
370 if(!ixj[cnt].DSPbase) in ixj_alloc()
372 return &ixj[cnt]; in ixj_alloc()
797 int cnt; in ixj_register() local
802 for (cnt = 0; cnt < IXJMAX; cnt++) { in ixj_register()
803 IXJ *j = get_ixj(cnt); in ixj_register()
804 while(test_and_set_bit(cnt, (void *)&j->busyflags) != 0) { in ixj_register()
809 clear_bit(cnt, &j->busyflags); in ixj_register()
814 for (cnt = 0; cnt < IXJMAX; cnt++) { in ixj_register()
815 IXJ *j = get_ixj(cnt); in ixj_register()
816 while(test_and_set_bit(cnt, (void *)&j->busyflags) != 0) { in ixj_register()
821 clear_bit(cnt, &j->busyflags); in ixj_register()
2265 int cnt; in ixj_release() local
2419 for (cnt = 0; cnt < 4; cnt++) in ixj_release()
2420 j->cadence_f[cnt].enable = 0; in ixj_release()
2456 for (cnt = 0; cnt < 35; cnt++) in ixj_release()
2457 j->ixj_signals[cnt] = SIGIO; in ixj_release()
2472 unsigned short fc, cnt, trg; in read_filters() local
2493 for (cnt = 0; cnt < 4; cnt++) { in read_filters()
2494 if (ixj_WriteDSPCommand(0x5154 + cnt, j)) { in read_filters()
2496 printk(KERN_INFO "Select Filter %d failed!\n", cnt); in read_filters()
2502 printk(KERN_INFO "Read Filter History %d failed!\n", cnt); in read_filters()
2506 j->filter_hist[cnt] = j->ssr.high << 8 | j->ssr.low; in read_filters()
2508 if (j->cadence_f[cnt].enable) { in read_filters()
2509 if (j->filter_hist[cnt] & 3 && !(j->filter_hist[cnt] & 12)) { in read_filters()
2510 if (j->cadence_f[cnt].state == 0) { in read_filters()
2511 j->cadence_f[cnt].state = 1; in read_filters()
2512 …j->cadence_f[cnt].on1min = jiffies + (long)((j->cadence_f[cnt].on1 * (hertz * (100 - var)) / 10000… in read_filters()
2513 j->cadence_f[cnt].on1dot = jiffies + (long)((j->cadence_f[cnt].on1 * (hertz * (100)) / 10000)); in read_filters()
2514 …j->cadence_f[cnt].on1max = jiffies + (long)((j->cadence_f[cnt].on1 * (hertz * (100 + var)) / 10000… in read_filters()
2515 } else if (j->cadence_f[cnt].state == 2 && in read_filters()
2516 (time_after(jiffies, j->cadence_f[cnt].off1min) && in read_filters()
2517 time_before(jiffies, j->cadence_f[cnt].off1max))) { in read_filters()
2518 if (j->cadence_f[cnt].on2) { in read_filters()
2519 j->cadence_f[cnt].state = 3; in read_filters()
2520 …j->cadence_f[cnt].on2min = jiffies + (long)((j->cadence_f[cnt].on2 * (hertz * (100 - var)) / 10000… in read_filters()
2521 … j->cadence_f[cnt].on2dot = jiffies + (long)((j->cadence_f[cnt].on2 * (hertz * (100)) / 10000)); in read_filters()
2522 …j->cadence_f[cnt].on2max = jiffies + (long)((j->cadence_f[cnt].on2 * (hertz * (100 + var)) / 10000… in read_filters()
2524 j->cadence_f[cnt].state = 7; in read_filters()
2526 } else if (j->cadence_f[cnt].state == 4 && in read_filters()
2527 (time_after(jiffies, j->cadence_f[cnt].off2min) && in read_filters()
2528 time_before(jiffies, j->cadence_f[cnt].off2max))) { in read_filters()
2529 if (j->cadence_f[cnt].on3) { in read_filters()
2530 j->cadence_f[cnt].state = 5; in read_filters()
2531 …j->cadence_f[cnt].on3min = jiffies + (long)((j->cadence_f[cnt].on3 * (hertz * (100 - var)) / 10000… in read_filters()
2532 … j->cadence_f[cnt].on3dot = jiffies + (long)((j->cadence_f[cnt].on3 * (hertz * (100)) / 10000)); in read_filters()
2533 …j->cadence_f[cnt].on3max = jiffies + (long)((j->cadence_f[cnt].on3 * (hertz * (100 + var)) / 10000… in read_filters()
2535 j->cadence_f[cnt].state = 7; in read_filters()
2538 j->cadence_f[cnt].state = 0; in read_filters()
2540 } else if (j->filter_hist[cnt] & 12 && !(j->filter_hist[cnt] & 3)) { in read_filters()
2541 if (j->cadence_f[cnt].state == 1) { in read_filters()
2542 if(!j->cadence_f[cnt].on1) { in read_filters()
2543 j->cadence_f[cnt].state = 7; in read_filters()
2544 } else if((time_after(jiffies, j->cadence_f[cnt].on1min) && in read_filters()
2545 time_before(jiffies, j->cadence_f[cnt].on1max))) { in read_filters()
2546 if(j->cadence_f[cnt].off1) { in read_filters()
2547 j->cadence_f[cnt].state = 2; in read_filters()
2548 …j->cadence_f[cnt].off1min = jiffies + (long)((j->cadence_f[cnt].off1 * (hertz * (100 - var)) / 100… in read_filters()
2549 … j->cadence_f[cnt].off1dot = jiffies + (long)((j->cadence_f[cnt].off1 * (hertz * (100)) / 10000)); in read_filters()
2550 …j->cadence_f[cnt].off1max = jiffies + (long)((j->cadence_f[cnt].off1 * (hertz * (100 + var)) / 100… in read_filters()
2552 j->cadence_f[cnt].state = 7; in read_filters()
2555 j->cadence_f[cnt].state = 0; in read_filters()
2557 } else if (j->cadence_f[cnt].state == 3) { in read_filters()
2558 if((time_after(jiffies, j->cadence_f[cnt].on2min) && in read_filters()
2559 time_before(jiffies, j->cadence_f[cnt].on2max))) { in read_filters()
2560 if(j->cadence_f[cnt].off2) { in read_filters()
2561 j->cadence_f[cnt].state = 4; in read_filters()
2562 …j->cadence_f[cnt].off2min = jiffies + (long)((j->cadence_f[cnt].off2 * (hertz * (100 - var)) / 100… in read_filters()
2563 … j->cadence_f[cnt].off2dot = jiffies + (long)((j->cadence_f[cnt].off2 * (hertz * (100)) / 10000)); in read_filters()
2564 …j->cadence_f[cnt].off2max = jiffies + (long)((j->cadence_f[cnt].off2 * (hertz * (100 + var)) / 100… in read_filters()
2566 j->cadence_f[cnt].state = 7; in read_filters()
2569 j->cadence_f[cnt].state = 0; in read_filters()
2571 } else if (j->cadence_f[cnt].state == 5) { in read_filters()
2572 if ((time_after(jiffies, j->cadence_f[cnt].on3min) && in read_filters()
2573 time_before(jiffies, j->cadence_f[cnt].on3max))) { in read_filters()
2574 if(j->cadence_f[cnt].off3) { in read_filters()
2575 j->cadence_f[cnt].state = 6; in read_filters()
2576 …j->cadence_f[cnt].off3min = jiffies + (long)((j->cadence_f[cnt].off3 * (hertz * (100 - var)) / 100… in read_filters()
2577 … j->cadence_f[cnt].off3dot = jiffies + (long)((j->cadence_f[cnt].off3 * (hertz * (100)) / 10000)); in read_filters()
2578 …j->cadence_f[cnt].off3max = jiffies + (long)((j->cadence_f[cnt].off3 * (hertz * (100 + var)) / 100… in read_filters()
2580 j->cadence_f[cnt].state = 7; in read_filters()
2583 j->cadence_f[cnt].state = 0; in read_filters()
2586 j->cadence_f[cnt].state = 0; in read_filters()
2589 switch(j->cadence_f[cnt].state) { in read_filters()
2591 if(time_after(jiffies, j->cadence_f[cnt].on1dot) && in read_filters()
2592 !j->cadence_f[cnt].off1 && in read_filters()
2593 !j->cadence_f[cnt].on2 && !j->cadence_f[cnt].off2 && in read_filters()
2594 !j->cadence_f[cnt].on3 && !j->cadence_f[cnt].off3) { in read_filters()
2595 j->cadence_f[cnt].state = 7; in read_filters()
2599 if(time_after(jiffies, j->cadence_f[cnt].on2dot) && in read_filters()
2600 !j->cadence_f[cnt].off2 && in read_filters()
2601 !j->cadence_f[cnt].on3 && !j->cadence_f[cnt].off3) { in read_filters()
2602 j->cadence_f[cnt].state = 7; in read_filters()
2606 if(time_after(jiffies, j->cadence_f[cnt].on3dot) && in read_filters()
2607 !j->cadence_f[cnt].off3) { in read_filters()
2608 j->cadence_f[cnt].state = 7; in read_filters()
2615 …printk(KERN_INFO "IXJ Tone Cadence state = %d /dev/phone%d at %ld\n", j->cadence_f[cnt].state, j->… in read_filters()
2616 switch(j->cadence_f[cnt].state) { in read_filters()
2622 …j->cadence_f[cnt].on1, j->cadence_f[cnt].on1min, j->cadence_f[cnt].on1dot, j->cadence_f[cnt].on1ma… in read_filters()
2625 …FO "IXJ /dev/phone%d Next Tone Cadence state at %ld - %ld\n", j->board, j->cadence_f[cnt].off1min, in read_filters()
2626 j->cadence_f[cnt].off1max); in read_filters()
2629 …INFO "IXJ /dev/phone%d Next Tone Cadence state at %ld - %ld\n", j->board, j->cadence_f[cnt].on2min, in read_filters()
2630 j->cadence_f[cnt].on2max); in read_filters()
2633 …NFO "IXJ /dev/phone%d Next Tone Cadence state at %ld - %ld\n", j->board, j->cadence_f[cnt].off2min, in read_filters()
2634 j->cadence_f[cnt].off2max); in read_filters()
2637 …INFO "IXJ /dev/phone%d Next Tone Cadence state at %ld - %ld\n", j->board, j->cadence_f[cnt].on3min, in read_filters()
2638 j->cadence_f[cnt].on3max); in read_filters()
2641 …NFO "IXJ /dev/phone%d Next Tone Cadence state at %ld - %ld\n", j->board, j->cadence_f[cnt].off3min, in read_filters()
2642 j->cadence_f[cnt].off3max); in read_filters()
2647 if (j->cadence_f[cnt].state == 7) { in read_filters()
2648 j->cadence_f[cnt].state = 0; in read_filters()
2649 if (j->cadence_f[cnt].enable == 1) in read_filters()
2650 j->cadence_f[cnt].enable = 0; in read_filters()
2651 switch (cnt) { in read_filters()
2682 if (j->filter_en[cnt] && ((j->filter_hist[cnt] & 3 && !(j->filter_hist[cnt] & 12)) || in read_filters()
2683 (j->filter_hist[cnt] & 12 && !(j->filter_hist[cnt] & 3)))) { in read_filters()
2684 if((j->filter_hist[cnt] & 3 && !(j->filter_hist[cnt] & 12))) { in read_filters()
2686 } else if((j->filter_hist[cnt] & 12 && !(j->filter_hist[cnt] & 3))) { in read_filters()
2689 switch (cnt) { in read_filters()
3030 int cnt, dly; in ixj_read_frame() local
3033 for (cnt = 0; cnt < j->rec_frame_size * 2; cnt += 2) { in ixj_read_frame()
3034 if (!(cnt % 16) && !IsRxReady(j)) { in ixj_read_frame()
3045 if (j->rec_codec == G729 && (cnt == 0 || cnt == 10 || cnt == 20)) { in ixj_read_frame()
3049 *(j->read_buffer + cnt) = inb_p(j->DSPbase + 0x0E); in ixj_read_frame()
3050 *(j->read_buffer + cnt + 1) = inb_p(j->DSPbase + 0x0F); in ixj_read_frame()
3055 for (cnt = 0; cnt < j->rec_frame_size * 2; cnt += 2) { in ixj_read_frame()
3056 if (!(cnt % 16) && !IsTxReady(j)) { in ixj_read_frame()
3066 outb_p(*(j->read_buffer + cnt), get_ixj(j->intercom)->DSPbase + 0x0C); in ixj_read_frame()
3067 outb_p(*(j->read_buffer + cnt + 1), get_ixj(j->intercom)->DSPbase + 0x0D); in ixj_read_frame()
3176 int cnt; in ixj_write_cid_seize() local
3178 for (cnt = 0; cnt < 150; cnt++) { in ixj_write_cid_seize()
3182 for (cnt = 0; cnt < 180; cnt++) { in ixj_write_cid_seize()
3189 int cnt; in ixj_write_cidcw_seize() local
3191 for (cnt = 0; cnt < 80; cnt++) { in ixj_write_cidcw_seize()
3198 int cnt; in ixj_write_cid_string() local
3200 for (cnt = 0; cnt < strlen(s); cnt++) { in ixj_write_cid_string()
3201 ixj_write_cid_byte(j, s[cnt]); in ixj_write_cid_string()
3202 checksum = (checksum + s[cnt]); in ixj_write_cid_string()
3209 int cnt; in ixj_pad_fsk() local
3211 for (cnt = 0; cnt < pad; cnt++) { in ixj_pad_fsk()
3215 for (cnt = 0; cnt < 720; cnt++) { in ixj_pad_fsk()
3580 int cnt, frame_count, dly; in ixj_write_frame() local
3586 for(cnt = 0; cnt < 480; cnt++) { in ixj_write_frame()
3587 if (!(cnt % 16) && !IsTxReady(j)) { in ixj_write_frame()
3600 cnt++; in ixj_write_frame()
3643 for (cnt = 0; cnt < 16; cnt++) { in ixj_write_frame()
3644 if (!(cnt % 16) && !IsTxReady(j)) { in ixj_write_frame()
3659 for (cnt = 0; cnt < 24; cnt++) { in ixj_write_frame()
3660 if(cnt == 12) { in ixj_write_frame()
3667 if (!(cnt % 16) && !IsTxReady(j)) { in ixj_write_frame()
3682 for (cnt = 0; cnt < j->play_frame_size * 2; cnt += 2) { in ixj_write_frame()
3683 if (!(cnt % 16) && !IsTxReady(j)) { in ixj_write_frame()
3694 if (j->play_codec == G729 && (cnt == 0 || cnt == 10 || cnt == 20)) { in ixj_write_frame()
3695 …if(j->write_buffer_rp + cnt == 0 && j->write_buffer_rp + cnt + 1 == 0 && j->write_buffer_rp + cnt in ixj_write_frame()
3696 …j->write_buffer_rp + cnt + 3 == 0 && j->write_buffer_rp + cnt + 4 == 0 && j->write_buffer_rp + cnt in ixj_write_frame()
3697 …j->write_buffer_rp + cnt + 6 == 0 && j->write_buffer_rp + cnt + 7 == 0 && j->write_buffer_rp + cnt in ixj_write_frame()
3698 j->write_buffer_rp + cnt + 9 == 0) { in ixj_write_frame()
3708 outb_p(*(j->write_buffer_rp + cnt), j->DSPbase + 0x0C); in ixj_write_frame()
3709 outb_p(*(j->write_buffer_rp + cnt + 1), j->DSPbase + 0x0D); in ixj_write_frame()
3710 *(j->write_buffer_rp + cnt) = 0; in ixj_write_frame()
3711 *(j->write_buffer_rp + cnt + 1) = 0; in ixj_write_frame()
3752 int cnt; in set_base_frame() local
3757 for (cnt = 0; cnt < 10; cnt++) { in set_base_frame()
4762 int cnt; in SCI_WaitHighSCI() local
4766 for (cnt = 0; cnt < 10; cnt++) { in SCI_WaitHighSCI()
4782 int cnt; in SCI_WaitLowSCI() local
4786 for (cnt = 0; cnt < 10; cnt++) { in SCI_WaitLowSCI()
6195 int cnt; in capabilities_check() local
6197 for (cnt = 0; cnt < j->caps; cnt++) { in capabilities_check()
6198 if (pcreq->captype == j->caplist[cnt].captype in capabilities_check()
6199 && pcreq->cap == j->caplist[cnt].cap) { in capabilities_check()
6873 int cnt; in ixj_selfprobe() local
7197 for (cnt = 0; cnt < 4; cnt++) in ixj_selfprobe()
7198 j->cadence_f[cnt].enable = 0; in ixj_selfprobe()
7203 for (cnt = 0; cnt < 35; cnt++) in ixj_selfprobe()
7204 j->ixj_signals[cnt] = SIGIO; in ixj_selfprobe()
7249 int cnt; in ixj_get_status_proc() local
7261 for (cnt = 0; cnt < IXJMAX; cnt++) { in ixj_get_status_proc()
7262 j = get_ixj(cnt); in ixj_get_status_proc()
7266 len += sprintf(buf + len, "\nCard Num %d", cnt); in ixj_get_status_proc()
7555 int cnt; in cleanup() local
7558 for (cnt = 0; cnt < IXJMAX; cnt++) { in cleanup()
7559 j = get_ixj(cnt); in cleanup()
7562 printk(KERN_INFO "IXJ: Deleting timer for /dev/phone%d\n", cnt); in cleanup()
7574 printk(KERN_INFO "IXJ: Releasing XILINX address for /dev/phone%d\n", cnt); in cleanup()
7578 printk(KERN_INFO "IXJ: Releasing XILINX address for /dev/phone%d\n", cnt); in cleanup()
7588 printk(KERN_INFO "IXJ: Unregistering /dev/phone%d from LTAPI\n", cnt); in cleanup()
7591 printk(KERN_INFO "IXJ: Releasing DSP address for /dev/phone%d\n", cnt); in cleanup()
7595 printk(KERN_INFO "IXJ: Freeing memory for /dev/phone%d\n", cnt); in cleanup()
7597 ixj[cnt] = NULL; in cleanup()
7707 int __init ixj_probe_isapnp(int *cnt) in ixj_probe_isapnp() argument
7763 j->board = *cnt; in ixj_probe_isapnp()
7780 ++*cnt; in ixj_probe_isapnp()
7793 int __init ixj_probe_isa(int *cnt) in ixj_probe_isa() argument
7802 if ((result = check_region(ixj[*cnt].DSPbase, 16)) < 0) { in ixj_probe_isa()
7803 printk(KERN_INFO "ixj: can't get I/O address 0x%x\n", ixj[*cnt].DSPbase); in ixj_probe_isa()
7815 j->board = *cnt; in ixj_probe_isa()
7818 ++*cnt; in ixj_probe_isa()
7824 int __init ixj_probe_pci(int *cnt) in ixj_probe_pci() argument
7834 for (i = 0; i < IXJMAX - *cnt; i++) { in ixj_probe_pci()
7856 j->board = *cnt; in ixj_probe_pci()
7860 ++*cnt; in ixj_probe_pci()
7867 int cnt = 0; in ixj_init() local
7870 cnt = 0; in ixj_init()
7873 if ((probe = ixj_probe_isapnp(&cnt)) < 0) { in ixj_init()
7876 if ((probe = ixj_probe_isa(&cnt)) < 0) { in ixj_init()
7880 if ((probe = ixj_probe_pci(&cnt)) < 0) { in ixj_init()
10564 int cnt, max; in ixj_init_filter() local
10607 for (cnt = 0; cnt < max; cnt++) { in ixj_init_filter()
10608 if (ixj_WriteDSPCommand(tone_table[jf->freq - 12][cnt], j)) in ixj_init_filter()
10619 int cnt, max; in ixj_init_filter_raw() local
10654 for (cnt = 0; cnt < max; cnt++) { in ixj_init_filter_raw()
10655 if (ixj_WriteDSPCommand(jfr->coeff[cnt], j)) in ixj_init_filter_raw()