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

📄 ixjuser.h

📁 mgcp协议源代码。支持多种编码:g711
💻 H
📖 第 1 页 / 共 2 页
字号:
} IXJ_CADENCE_ELEMENT;typedef enum {	PLAY_ONCE,	REPEAT_LAST_ELEMENT,	REPEAT_ALL} IXJ_CADENCE_TERM;typedef struct {	int elements_used;	IXJ_CADENCE_TERM termination;	IXJ_CADENCE_ELEMENT *ce;} IXJ_CADENCE;#define IXJCTL_TONE_CADENCE		_IOW ('q', 0xCA, IXJ_CADENCE *)/******************************************************************************** This group of IOCTLs deal with the playback settings of the DSP*******************************************************************************/#define IXJCTL_PLAY_CODEC               PHONE_PLAY_CODEC#define IXJCTL_PLAY_START               PHONE_PLAY_START#define IXJCTL_PLAY_STOP                PHONE_PLAY_STOP#define IXJCTL_PLAY_DEPTH		PHONE_PLAY_DEPTH#define IXJCTL_PLAY_VOLUME		PHONE_PLAY_VOLUME#define IXJCTL_PLAY_LEVEL		PHONE_PLAY_LEVEL/******************************************************************************** This group of IOCTLs deal with the Acoustic Echo Cancellation settings* of the DSP** Issueing the IXJCTL_AEC_START command with a value of AEC_OFF has the* same effect as IXJCTL_AEC_STOP.  This is to simplify slider bar* controls.  IXJCTL_AEC_GET_LEVEL returns the current setting of the AEC.******************************************************************************/#define IXJCTL_AEC_START		_IOW ('q', 0xCB, int)#define IXJCTL_AEC_STOP			_IO  ('q', 0xCC)#define IXJCTL_AEC_GET_LEVEL		_IO  ('q', 0xCD)#define AEC_OFF   0#define AEC_LOW   1#define AEC_MED   2#define AEC_HIGH  3#define AEC_AUTO  4/******************************************************************************** Call Progress Tones, DTMF, etc.* IXJCTL_DTMF_OOB determines if dtmf signaling is sent as Out-Of-Band* only.  If you pass a 1, dtmf is suppressed from the audio stream.* 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		PHONE_DTMF_READY#define IXJCTL_GET_DTMF                 PHONE_GET_DTMF#define IXJCTL_GET_DTMF_ASCII           PHONE_GET_DTMF_ASCII#define IXJCTL_DTMF_OOB			PHONE_DTMF_OOB#define IXJCTL_EXCEPTION		PHONE_EXCEPTION#define IXJCTL_PLAY_TONE		PHONE_PLAY_TONE#define IXJCTL_SET_TONE_ON_TIME		PHONE_SET_TONE_ON_TIME#define IXJCTL_SET_TONE_OFF_TIME	PHONE_SET_TONE_OFF_TIME#define IXJCTL_GET_TONE_ON_TIME		PHONE_GET_TONE_ON_TIME#define IXJCTL_GET_TONE_OFF_TIME	PHONE_GET_TONE_OFF_TIME#define IXJCTL_GET_TONE_STATE		PHONE_GET_TONE_STATE#define IXJCTL_BUSY			PHONE_BUSY#define IXJCTL_RINGBACK			PHONE_RINGBACK#define IXJCTL_DIALTONE			PHONE_DIALTONE#define IXJCTL_CPT_STOP			PHONE_CPT_STOP/******************************************************************************* 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', 0xCE, int)#define IXJCTL_MIXER			_IOW ('q', 0xCF, int)/******************************************************************************* * The master volume controls use attenuation with 32 levels from 0 to -62dB* with steps of 2dB each, the defines should be OR'ed together then sent* as the parameter to the mixer command to change the mixer settings.* ******************************************************************************/#define MIXER_MASTER_L		0x0100#define MIXER_MASTER_R		0x0200#define ATT00DB			0x00#define ATT02DB			0x01#define ATT04DB			0x02#define ATT06DB			0x03#define ATT08DB			0x04#define ATT10DB			0x05#define ATT12DB			0x06#define ATT14DB			0x07#define ATT16DB			0x08#define ATT18DB			0x09#define ATT20DB			0x0A#define ATT22DB			0x0B#define ATT24DB			0x0C#define ATT26DB			0x0D#define ATT28DB			0x0E#define ATT30DB			0x0F#define ATT32DB			0x10#define ATT34DB			0x11#define ATT36DB			0x12#define ATT38DB			0x13#define ATT40DB			0x14#define ATT42DB			0x15#define ATT44DB			0x16#define ATT46DB			0x17#define ATT48DB			0x18#define ATT50DB			0x19#define ATT52DB			0x1A#define ATT54DB			0x1B#define ATT56DB			0x1C#define ATT58DB			0x1D#define ATT60DB			0x1E#define ATT62DB			0x1F#define MASTER_MUTE		0x80/******************************************************************************* * The input volume controls use gain with 32 levels from +12dB to -50dB* with steps of 2dB each, the defines should be OR'ed together then sent* as the parameter to the mixer command to change the mixer settings.* ******************************************************************************/#define MIXER_PORT_CD_L		0x0600#define MIXER_PORT_CD_R		0x0700#define MIXER_PORT_LINE_IN_L	0x0800#define MIXER_PORT_LINE_IN_R	0x0900#define MIXER_PORT_POTS_REC	0x0C00#define MIXER_PORT_MIC		0x0E00#define GAIN12DB		0x00#define GAIN10DB		0x01#define GAIN08DB		0x02#define GAIN06DB		0x03#define GAIN04DB		0x04#define GAIN02DB		0x05#define GAIN00DB		0x06#define GAIN_02DB		0x07#define GAIN_04DB		0x08#define GAIN_06DB		0x09#define GAIN_08DB		0x0A#define GAIN_10DB		0x0B#define GAIN_12DB		0x0C#define GAIN_14DB		0x0D#define GAIN_16DB		0x0E#define GAIN_18DB		0x0F#define GAIN_20DB		0x10#define GAIN_22DB		0x11#define GAIN_24DB		0x12#define GAIN_26DB		0x13#define GAIN_28DB		0x14#define GAIN_30DB		0x15#define GAIN_32DB		0x16#define GAIN_34DB		0x17#define GAIN_36DB		0x18#define GAIN_38DB		0x19#define GAIN_40DB		0x1A#define GAIN_42DB		0x1B#define GAIN_44DB		0x1C#define GAIN_46DB		0x1D#define GAIN_48DB		0x1E#define GAIN_50DB		0x1F#define INPUT_MUTE		0x80/******************************************************************************* * The POTS volume control use attenuation with 8 levels from 0dB to -28dB* with steps of 4dB each, the defines should be OR'ed together then sent* as the parameter to the mixer command to change the mixer settings.* ******************************************************************************/#define MIXER_PORT_POTS_PLAY	0x0F00#define POTS_ATT_00DB		0x00#define POTS_ATT_04DB		0x01#define POTS_ATT_08DB		0x02#define POTS_ATT_12DB		0x03#define POTS_ATT_16DB		0x04#define POTS_ATT_20DB		0x05#define POTS_ATT_24DB		0x06#define POTS_ATT_28DB		0x07#define POTS_MUTE		0x80/******************************************************************************* * The DAA controls the interface to the PSTN port.  The driver loads the* US coefficients by default, so if you live in a different country you* need to load the set for your countries phone system.* ******************************************************************************/#define IXJCTL_DAA_COEFF_SET		_IOW ('q', 0xD0, int)#define DAA_US 		1	//PITA 8kHz#define DAA_UK 		2	//ISAR34 8kHz#define DAA_FRANCE 	3	//#define DAA_GERMANY	4#define DAA_AUSTRALIA	5#define DAA_JAPAN	6/******************************************************************************* * Use IXJCTL_PORT to set or query the port the card is set to.  If the* argument is set to PORT_QUERY, the return value of the ioctl will* indicate which port is currently in use, otherwise it will change the* port.* ******************************************************************************/#define IXJCTL_PORT			_IOW ('q', 0xD1, int)#define PORT_QUERY	0#define PORT_POTS	1#define PORT_PSTN	2#define PORT_SPEAKER	3#define PORT_HANDSET	4#define IXJCTL_PSTN_SET_STATE		PHONE_PSTN_SET_STATE#define IXJCTL_PSTN_GET_STATE		PHONE_PSTN_GET_STATE#define PSTN_ON_HOOK	0#define PSTN_RINGING	1#define PSTN_OFF_HOOK	2#define PSTN_PULSE_DIAL	3/******************************************************************************* * The DAA Analog GAIN sets 2 parameters at one time, the recieve gain (AGRR), * and the transmit gain (AGX).  OR together the components and pass them* as the parameter to IXJCTL_DAA_AGAIN.  The default setting is both at 0dB.* ******************************************************************************/#define IXJCTL_DAA_AGAIN		_IOW ('q', 0xD2, int)#define AGRR00DB	0x00	// Analog gain in recieve direction 0dB#define AGRR3_5DB	0x10	// Analog gain in recieve direction 3.5dB#define AGRR06DB	0x30	// Analog gain in recieve direction 6dB#define AGX00DB		0x00	// Analog gain in transmit direction 0dB#define AGX_6DB		0x04	// Analog gain in transmit direction -6dB#define AGX3_5DB	0x08	// Analog gain in transmit direction 3.5dB#define AGX_2_5B	0x0C	// Analog gain in transmit direction -2.5dB#define IXJCTL_PSTN_LINETEST		_IO  ('q', 0xD3)typedef struct {	char month[3];	char day[3];	char hour[3];	char min[3];	int numlen;	char number[11];	int namelen;	char name[80];} IXJ_CID;#define IXJCTL_CID			_IOR ('q', 0xD4, IXJ_CID *)/******************************************************************************* * The wink duration is tunable with this ioctl.  The default wink duration  * is 320ms.  You do not need to use this ioctl if you do not require a* different wink duration.* ******************************************************************************/#define IXJCTL_WINK_DURATION		PHONE_WINK_DURATION/******************************************************************************* * This ioctl will connect the POTS port to the PSTN port on the LineJACK* In order for this to work properly the port selection should be set to* the PSTN port with IXJCTL_PORT prior to calling this ioctl.  This will* enable conference calls between PSTN callers and network callers.* Passing a 1 to this ioctl enables the POTS<->PSTN connection while* passing a 0 turns it back off.* ******************************************************************************/#define IXJCTL_POTS_PSTN		_IOW ('q', 0xD5, int)/******************************************************************************** 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)#define IXJCTL_FRAMES_READ		_IOR ('q', 0xE2, unsigned long)#define IXJCTL_FRAMES_WRITTEN		_IOR ('q', 0xE3, unsigned long)#define IXJCTL_READ_WAIT		_IOR ('q', 0xE4, unsigned long)#define IXJCTL_WRITE_WAIT		_IOR ('q', 0xE5, unsigned long)#define IXJCTL_DRYBUFFER_READ		_IOR ('q', 0xE6, unsigned long)#define IXJCTL_DRYBUFFER_CLEAR		_IO  ('q', 0xE7)/******************************************************************************** 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', 0xFD, int)#define IXJCTL_INTERCOM_STOP  		_IOW ('q', 0xFE, int)

⌨️ 快捷键说明

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