⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ixjuser.h

📁 mgcp协议源代码。支持多种编码:g711
💻 H
字号:
/******************************************************************************$Id: ixjuser.h,v 1.1.1.1 1999/08/05 21:17:32 luan Exp $$Log: ixjuser.h,v $Revision 1.1.1.1  1999/08/05 21:17:32  luannew quicknet v0.1.39 driversRevision 1.21  1999/08/04 22:53:43  rootAdded levels to AECRevision 1.20  1999/07/28 20:32:23  rootAdded non-blocking ringsAdded ring cadenceRevision 1.19  1999/07/14 21:08:10  rootfixed rcsidRevision 1.18  1999/07/14 21:03:33  rootadded rcsidRevision 1.17  1999/07/12 20:20:00  rootContinuing work on 20ms and 10ms linear modes.Revision 1.16  1999/07/09 19:13:50  rootAdded IXJCTL_RATE to set the rate the DSP is polled.Added 20ms and 10ms linear modes for LineJack and PhoneJack Lite.Revision 1.15  1999/07/08 02:21:20  rootAsync Notification on hookswitch changes.Added IXJ_EXCEPTION bitfield structure for select exception setsAdded IXJCTL_DTMFASCII ioctlRevision 1.14  1999/07/06 23:20:52  root*** empty log message ***Revision 1.14  1999/07/06 21:48:38  rootFixed lockups in linear modes during write.Revision 1.13  1999/06/28 18:30:44  rootAdded buffer depth commands to reduce latency in compressed modes.Revision 1.12  1999/06/25 21:03:18  rootClose device properly.Started Mixer code for LineJackRevision 1.11  1999/06/24 21:51:21  rootbug fixesRevision 1.10  1999/06/17 18:23:16  rootAdded tone generation.Fixed LineJack hookswitch again.Revision 1.9  1999/06/09 14:18:15  rootFixed duplicate IOCTL numbersRevision 1.8  1999/06/09 14:13:29  rootAdded DTMF Recognition with Async NotificationRevision 1.7  1999/06/03 16:50:43  rootAdded IXJCTL_HZ to allow changing the HZ value the driver uses.Revision 1.6  1999/05/31 17:56:07  rootAll linear modes now work properly.Revision 1.5  1999/05/25 14:05:44  rootAdded multiple codec selections.Revision 1.4  1999/04/28 03:43:52  rootMore work on echo cancellationRevision 1.3  1999/04/27 17:17:12  rootadded AECRevision 1.2  1999/04/22 11:43:52  rootFixed stability problemsRevision 1.1  1999/03/25 21:52:42  rootInitial revision** IOCTL's used for the Quicknet Cards** If you use the IXJCTL_TESTRAM command, the card must be power cycled to* reset the SRAM values before futher use.*******************************************************************************/static char ixjuser_h_rcsid[] = "$Id: ixjuser.h,v 1.1.1.1 1999/08/05 21:17:32 luan Exp $";#define IXJCTL_DSP_RESET 		_IO  ('q', 0x00)#define IXJCTL_DSP_SYNC                 _IO  ('q', 0x01)#define IXJCTL_RING                     _IO  ('q', 0x02)#define IXJCTL_HOOKSTATE                _IO  ('q', 0x03)#define IXJCTL_MAXRINGS			_IOW ('q', 0x04, char)#define IXJCTL_RING_CADENCE		_IOW ('q', 0x05, int)#define IXJCTL_RING_START		_IOW ('q', 0x06, int)#define IXJCTL_RING_STOP		_IO  ('q', 0x07)#define IXJCTL_DSP_TYPE                 _IOR ('q', 0x0C, int)#define IXJCTL_DSP_VERSION              _IOR ('q', 0x0D, int)#define IXJCTL_DSP_IDLE			_IO  ('q', 0x0E)#define IXJCTL_TESTRAM			_IO  ('q', 0x0F)/******************************************************************************** This group of IOCTLs deal with the record settings of the DSP** The IXJCTL_REC_DEPTH command sets the internal buffer depth of the DSP.* Setting a lower depth reduces latency, but increases the demand of the* application to service the driver without frame loss.  The DSP has 480* bytes of physical buffer memory for the record channel so the true* maximum limit is determined by how many frames will fit in the buffer.** 1 uncompressed (480 byte) 16-bit linear frame.* 2 uncompressed (240 byte) 8-bit A-law/mu-law frames.* 15 TrueSpeech 8.5 frames.* 20 TrueSpeech 6.3,5.3,4.8 or 4.1 frames.** The default in the driver is currently set to 2 frames.*******************************************************************************/#define IXJCTL_REC_CODEC                _IOW ('q', 0x10, int)#define IXJCTL_REC_SYNC                 _IOW ('q', 0x11, int)#define IXJCTL_REC_START                _IO  ('q', 0x12)#define IXJCTL_REC_STOP                 _IO  ('q', 0x13)#define IXJCTL_REC_DEPTH		_IOW ('q', 0x14, int)#define IXJCTL_FRAME			_IOW ('q', 0x15, int)/******************************************************************************** This group of IOCTLs deal with the playback settings of the DSP*******************************************************************************/#define IXJCTL_PLAY_CODEC               _IOW ('q', 0x20, int)#define IXJCTL_PLAY_SYNC                _IOW ('q', 0x21, int)#define IXJCTL_PLAY_START               _IO  ('q', 0x22)#define IXJCTL_PLAY_STOP                _IO  ('q', 0x23)#define IXJCTL_PLAY_DEPTH		_IOW ('q', 0x24, int)/******************************************************************************** This group of IOCTLs deal with the Acoustic Echo Cancellation settings* of the DSP*******************************************************************************/#define IXJCTL_AEC_START		_IOW ('q', 0x34, int)#define IXJCTL_AEC_STOP			_IO  ('q', 0x35)#define AEC_LOW   1#define AEC_MED   2#define AEC_HIGH  3/******************************************************************************** Call Progress Tones, DTMF, etc.* Tone on and off times are in 250 microsecond intervals so* ioctl(ixj1, IXJCTL_SET_TONE_ON_TIME, 360);* will set the tone on time of board ixj1 to 360 * 250us = 90ms* the default values of tone on and off times is 840 or 210ms******************************************************************************/#define IXJCTL_DTMF_READY		_IOR ('q', 0x40, int)#define IXJCTL_GET_DTMF                 _IOR ('q', 0x41, int)#define IXJCTL_GET_DTMF_ASCII           _IOR ('q', 0x42, int)#define IXJCTL_GET_DTMFSYNCMODE		_IOR ('q', 0x43, int)#define IXJCTL_EXCEPTION		_IOR ('q', 0x44, int)#define IXJCTL_GET_TONESYNCMODE		_IOR ('q', 0x45, int)#define IXJCTL_PLAY_TONE		_IOW ('q', 0x46, char)#define IXJCTL_SET_TONE_ON_TIME		_IOW ('q', 0x47, int)#define IXJCTL_SET_TONE_OFF_TIME	_IOW ('q', 0x48, int)#define IXJCTL_GET_TONE_ON_TIME		_IO  ('q', 0x49)#define IXJCTL_GET_TONE_OFF_TIME	_IO  ('q', 0x4A)#define IXJCTL_GET_TONE_STATE		_IO  ('q', 0x4B)#define IXJCTL_BUSY			_IO  ('q', 0x4C)#define IXJCTL_RINGBACK			_IO  ('q', 0x4D)#define IXJCTL_DIALTONE			_IO  ('q', 0x4E)// This IOCTL replaced both IXJCTL_BUSY_STOP and IXJCTL_RINGBACK_STOP and// should be used from now on to stop all Call Progress Tones.  It will// actually abort any tone, regardless of time left in the tone_on_time// and tone_off_time counters.#define IXJCTL_CPT_STOP			_IO  ('q', 0x4F)/******************************************************************************* LineJack specific IOCTLs** The lsb 4 bits of the LED argument represent the state of each of the 4* LED's on the LineJack******************************************************************************/#define IXJCTL_SET_LED			_IOW ('q', 0x50, int)#define IXJCTL_MIXER			_IOW ('q', 0x51, int) //Do not use yet/******************************************************************************** IOCTLs added by request.** IXJCTL_HZ sets the value your Linux kernel uses for HZ as defined in*           /usr/include/asm/param.h, this determines the fundamental*           frequency of the clock ticks on your Linux system.  The kernel*           must be rebuilt if you change this value, also all modules you*           use (except this one) must be recompiled.  The default value*           is 100, and you only need to use this IOCTL if you use some*           other value.*** IXJCTL_RATE sets the number of times per second that the driver polls*             the DSP.  This value cannot be larger than HZ.  By*             increasing both of these values, you may be able to reduce*             latency because the max hang time that can exist between the*             driver and the DSP will be reduced.*******************************************************************************/#define IXJCTL_HZ                       _IOW ('q', 0xE0, int)#define IXJCTL_RATE                     _IOW ('q', 0xE1, int)/******************************************************************************** The defined CODECs that can be used with the IXJCTL_REC_RATE and* IXJ_PLAY_RATE IOCTLs.** PCM uLaw mode is a "pass through" mode.** 16 bit linear data is signed integer (2's complement form), positive* full scale is 7FFFH, negative full scale is 8000H, zero is 0000H** 8 bit linear data is signed byte (2's complement form), positive* full scale is 7FH, negative full scale is 80H, zero is 00H** 8 bit linear WSS data is unsigned byte, positive full scale is FFH,* negative full scale is 00H, zero is 80H.  This is the format used for* 8-bit WAVE format data (Windows Sound System).  Data can be converted* between the two 8-bit formats by simply inverting the ms bit. ********************************************************************************/				// Bytes per 30ms audio frame#define G723_63		1	// 24#define G723_53		2 	// 20#define TS85		3	// 32 Does not currently work on LineJack#define	TS48		4	// 18#define TS41		5	// 16#define G728		6	// 96 not implemented DO NOT USE!#define	G729		7	// 36 not implemented DO NOT USE!#define	ULAW		8	// 240#define	ALAW		9	// 240 not implemented DO NOT USE!#define LINEAR16	10	// 480#define LINEAR8		11	// 240#define WSS		12	// 240/******************************************************************************** The intercom IOCTL's short the output from one card to the input of the* other and vice versa (actually done in the DSP read function).  It is only* necessary to execute the IOCTL on one card, but it is necessary to have* both devices open to be able to detect hook switch changes.  The record* codec and rate of each card must match the playback codec and rate of* the other card for this to work properly.*******************************************************************************/#define IXJCTL_INTERCOM_START _IOW ('q', 0xEE, int)#define IXJCTL_INTERCOM_STOP  _IOW ('q', 0xEF, int) /******************************************************************************** This IOCTL will decrement the module usage counter so you can force* the module to unload after a program bombs.*******************************************************************************/#define IXJCTL_MODRESET		        _IO  ('q', 0xFF)/******************************************************************************** Various Defines used for the Quicknet Cards*******************************************************************************/#define SYNC_MODE_CODEC         0#define SYNC_MODE_DATA          1#define SYNC_MODE_POLL          2#define SYNC_MODE_HOST          3#define RECORD_SYNC_MODE        0x5100#define PLAYBACK_SYNC_MODE      0x5200#define USA_RING_CADENCE	0xC0C0typedef struct{  unsigned int dtmf_ready:1;  unsigned int hookstate:1;  unsigned int reserved:30;}IXJ_EXCEPT;typedef union{  IXJ_EXCEPT bits;  unsigned int bytes;}IXJ_EXCEPTION;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -