patch-2.2.15 linux/drivers/telephony/ixj.c
Next file: linux/drivers/telephony/phonedev.c
Previous file: linux/drivers/sound/vidc_audio.c
Back to the patch index
Back to the overall index
- Lines: 59
- Date:
Fri Apr 21 12:46:37 2000
- Orig file:
v2.2.14/drivers/telephony/ixj.c
- Orig date:
Tue Jan 4 21:18:59 2000
diff -u --new-file --recursive --exclude-from ../../exclude v2.2.14/drivers/telephony/ixj.c linux/drivers/telephony/ixj.c
@@ -507,7 +507,7 @@
j->flags.cringing = 0;
ixj_ring_off(board);
} else {
- if (jiffies - j->ring_cadence_jif >= (.5 * hertz)) {
+ if (jiffies - j->ring_cadence_jif >= (hertz/2)) {
j->ring_cadence_t--;
if (j->ring_cadence_t == -1)
j->ring_cadence_t = 15;
@@ -1974,7 +1974,7 @@
ixj_WriteDSPCommand(0x0700, board);
}
- if (ixj[board].play_mode != -1 && ixj[board].rec_mode != -1);
+ if (ixj[board].play_mode != -1 && ixj[board].rec_mode != -1)
{
ixj_WriteDSPCommand(0xB002, board); // AEC Stop
@@ -3800,6 +3800,32 @@
case PHONE_CPT_STOP:
ixj_cpt_stop(board);
break;
+ case PHONE_QUERY_CODEC:
+ {
+ struct phone_codec_data pd;
+ int val;
+ int proto_size[] = {
+ -1,
+ 12, 10, 16, 9, 8, 48, 5,
+ 40, 40, 80, 40, 40
+ };
+ if(copy_from_user(&pd, (void *)arg, sizeof(pd)))
+ return -EFAULT;
+ if(pd.type<1 || pd.type>12)
+ return -EPROTONOSUPPORT;
+ if(pd.type<G729)
+ val=proto_size[pd.type];
+ else switch(j->baseframe.low)
+ {
+ case 0xA0:val=2*proto_size[pd.type];break;
+ case 0x50:val=proto_size[pd.type];break;
+ default:val=proto_size[pd.type]*3;break;
+ }
+ pd.buf_min=pd.buf_max=pd.buf_opt=val;
+ if(copy_to_user((void *)arg, &pd, sizeof(pd)))
+ return -EFAULT;
+ return 0;
+ }
case IXJCTL_DSP_IDLE:
idle(board);
break;
@@ -3840,6 +3866,7 @@
ixj_daa_cr4(board, arg | 0x02);
break;
case IXJCTL_PSTN_LINETEST:
+ case PHONE_PSTN_LINETEST:
retval = ixj_linetest(board);
break;
case IXJCTL_CID:
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)