Home
73M1866B/73M1966B Infineon TAPI High-Level Driver
Contents
1. Parameters Data Type Name Description int chan_fd Channel descriptor int IFX_TAPI_EVENT_ENABLE I O control identifier for this operation unsigned long param NA Return Values Data Type Description int IFX_ERROR Failed to enable event detection IFX_SUCCESS Successful 3 8 IFX_TAPI_EVENT_DISABLE Description Disable detection of FXO events define IFX_TAPI EVENT _DISABLE _IO IFX_TAPI_IOC_MAGIC 0xC2 Prototype int ioctl int chan_fd int IFX_TAPI_EVENT_DISABLE unsigned long param Parameters Data Type Name Description int chan_fd Channel descriptor int IFX_TAPI_EVENT_DISABLE MO control identifier for this operation unsigned long param N A Return Values Data Type Description int IFX_ERROR Failed to disable event detection IFX_SUCCESS Successful 14 Rev 2 2 UG_1x66B_021 73M1 866B 73M1966B TAPI High Level Driver User Guide 3 9 IFX_TAPILEVENT_GET Description Read FXO event from the driver define IFX_TAPI_EVENT_GET _IO IFX_TAPI_IOC_MAGIC 0xC0 Prototype int ioctl int dev_fd int IFX_TAPI_EVENT_GET unsigned long param Parameters
2. Parameters Data Type Name Description int chan_fd Channel descriptor int IFX_TAPI_PHONE_VOLUME_SET I O control identifier for this operation unsigned long param The parameter points to an IFX_TAPI_LINE_VOLUME_t structure Return Values Data Type Description int IFX_ERROR Failed to set volume IFX_SUCCESS Successful 3 14 IFX_TAPI_FXO_HOOK_SET Description Issues on off hook in the fxo interface define IFX_TAPI_FXO_HOOK_SET _TOW IFX_TAPI_TOC_MAGIC Prototype int ioctl int chan_fd int IFX_TAPI_FXO_HOOK_SET unsigned long param OxDB int Parameters Data Type Name Description int chan_fd Channel descriptor int IFX_TAPI_FXO_HOOK_SET I O control identifier for this operation unsigned long param Hook requested Return Values Data Type Description int IFX_ERROR Failed to perform hook switch IFX_SUCEESS Successful 18 Rev 2 2 UG_1x66B_021 73M1 866B 73M1966B TAPI High Level Driver User Guide 3 15 IFX_TAPI_FXO_FLASH_SET Description Issues flash hook in the FXO interface define IFX_TAPI_FXO_FLASH_SET _TOW IFX_TAPI_IOC_MAGIC OxDC int Prototype int ioctl int chan_fd int IFX_TAPI_FXO_FLASH_SET unsigned long param Parameters Data Type Name Description int chan_fd Channel descriptor int IFX_TAPI_FXO_F
3. Parameters Data Type Name Description IFX_TAPI_PCM_IF_MODE_t nOpMode PCM interface mode master or slave mode IFX_TAPI_PCM_IF_DCLFREQ_t nDCLFreq DCL frequency to be used in master and or slave mode IFX_operation_t nDoubleClk Activation deactivation of the double clock mode FX_DISABLE single clocking is used FX_ENABLE double clocking is used IFX_TAPI_PCM_IF_SLOPE_t nS lopeTX Slope to be considered for the PCM transmit direction IFX_TAPI_PCM_IF_SLOPE_t nS LopeRX Slope to be considered for the PCM receive direction IFX_TAPI_PCM_IF_OFFSET_t nOffsetTX Transmit bit offset IFX_TAPI_PCM_IF_OFFSET_t nOffsetRX Receive bit offset IFX_TAPI_PCM_IF_DRIVE_t nDrive Drive mode for bit 0 IFX_operation_t nshift Enable disable shift access edge Shift the access edges by one clock cycle IFX_DISABLE no shift takes place e IFX_ENABLE shift takes place Note This setting is defined only in double clock mode IFX_uint8_t nMCTS Reserved PCM chip specific settings Set this field to 0x00 if not advised otherwise by the IFX support team Rev 2 2 27 73M1866B 73M1966B TAPI High Level Driver User Guide UG_1x66B_021 4 3 Description IFX_TAPI_PCM_CFG_t Structure for PCM channel configuration Prototype typedef struct unsigned unsigned unsigned unsigned long n long n long long IFX_TAPI_PCM_CFG_t TimeslotRX TimeslotTX nHighway nResolu
4. Data Type Name Description IFX_TAPI_FXO_HOOK_ONHOOK 0 On hook IFX_TAPI_FXO_HOOK_OFFHOOK 1 Off hook 4 9 IFX_TAPI_FXO_ FLASH _CFG_t Description Hook configuration for FXO used in IFX_TAPI_FXO_FLASH_CFG_SET Prototype typedef struct IFX_uint32_t nFlashTime IFX_TAPI_FXO FLASH _CFG_t Data Type Name Description IFX_uint32_t nFlashTime Duration of a flash hook Default 100 ms 30 Rev 2 2 UG_1x66B_ 021 73M1 866B 73M1966B TAPI High Level Driver User Guide 4 10 IFX_TAPI_EVENT_ID t Description List of event IDs These are the define macros of the FXO event identification Prototype typedef enum I IFX_TAPI_EVENT_NONE IFX_TAPI_EVEN TYPE_NONE 0x0000 IFX_TAPT_EVENT_FXO_BAT_FEEDED IFX_TAPI_EVEN1 YPE_FXO 0x0001 IFX_TAPI_EVENT_FXO_BAT DROPPED IFX_TAPI_EVENT YPE_FXO 0x0002 IFX_TAPI_EVENT_FXO_POLARITY IFX_TAPI_EVEN TYPE FXO 0x0003 IFX_TAPI_EVENT_FXO_RING_START IFX_TAPI_EVENT YPE_FXO 0x0004 IFX_TAPI_EVENT_FXO_RING_STOP IFX_TAPI_EVEN TYPE _ FXO 0x0005 IFX_TAPI_EVENT_FXO_OSI IFX_TAPI_EVEN TYPE _ FXO 0x0006 IFX_TAPI_EVENT_FXO_APOH IFX_TAPI_EVEN YPE_FXO 0x0007 IFX_TAPI_EVENT_F
5. _IOW IFX_TAPI_IOC_MAGIC OxEO int Parameters Data Type Name Description int chan_fd Channel descriptor int IFX_TAPI_FXO_RING_GET MO control identifier for this operation unsigned long param Points to IFX_boolean_t type indicating the ringing status of the FXO line e IFX_TRUE the line is ringing e IFX_FALSE the line is not ringing Return Values Data Type Description int IFX_ERROR Failed to read ring status IFX_SUCCESS Successful 22 Rev 2 2 UG_1x66B_021 73M1 866B 73M1966B TAPI High Level Driver User Guide 3 20 IFX_TAPI_FXO_POLARITY_ GET Description Receives line polarity status from the FXO interface define IFX_TAPI_FXO_POLARITY_GET _TOW IFX_TAPI_IOC_MAGIC 0xEl int Prototype int ioctl int chan_fd int IFX_TAPI_FXO_POLARITY_GET unsigned long param Parameters Data Type Name Description int chan_fd Channel descriptor int IFX_TAPI_FXO_POLARITY_GET MO control identifier for this operation unsigned long param Points to IFX_boolean_t type IFX_TRUE reflects normal polarity IFX_FALSE reflects reversed polarity Return Values Data Type Description int IFX_ERROR Failed to read polarity status IFX_SUCCESS Successful Rev 2 2 23 73M1866B 73M1966B TAPI High Level Driver User Guide UG_1x66B 021 3 21 IFX_TAPI_LASTERR Description This service returns the
6. 7 SEMICONDUCTOR CORP Simplifying System Integration 73M1866B 73M1966B Infineon TAPI High Level Driver User Guide July 2010 Rev 2 2 UG_1x66B_021 73M1 866B 73M1966B TAPI High Level Driver User Guide UG_1x66B_ 021 2010 Teridian Semiconductor Corporation All rights reserved Teridian Semiconductor Corporation is a registered trademark of Teridian Semiconductor Corporation Simplifying System Integration is a trademark of Teridian Semiconductor Corporation Linux is a registered trademark of Linus Torvalds Asterisk is a registered trademark of Digium Inc All other trademarks are the property of their respective owners Teridian Semiconductor Corporation makes no warranty for the use of its products other than expressly contained in the Company s warranty detailed in the Teridian Semiconductor Corporation standard Terms and Conditions The company assumes no responsibility for any errors which may appear in this document reserves the right to change devices or specifications detailed herein at any time without notice and does not make any commitment to update the information contained herein Accordingly the reader is cautioned to verify that this document is current by comparing it to the latest version on http Awww teridian com or by checking with your sales representative Teridian Semiconductor Corp 6440 Oak Canyon Suite 100 Irvine CA 92618 TEL 714 508 8800 FAX 714 508 8877 http www teridian com 2
7. M1966_DEBUG_TRACE_MASK Return Values Data Type Description int IFX_ERROR Failed to set debug report IFX_SUCCESS Successful 16 Rev 2 2 UG_1x66B_021 73M1 866B 73M1966B TAPI High Level Driver User Guide 3 12 IFX_TAPI_LINE_TYPE_SET Description This service configures the line type Please note that this command only accept FXO line type IFX_TAPI_LINE_TYPE_FXO define IFX_TAPI_LINE_TYPE_SET _TOW IFX_TAPI_IOC_MAGIC 0x47 int Prototype int Oct Ley int chan_fd int IFX_TAPI_LINE_TYPE_SET unsigned long param Parameters Data Type Name Description int chan_fd Channel descriptor int IFX_TAPI_LINE_TYPE_SET MO control identifier for this operation unsigned long param The parameter is a pointer to an IFX_TAPI_LINE_TYPE_CFG_t struct Return Values Data Type Description int IFX_ERROR Failed to set line type IFX_SUCCESS Successful Rev 2 2 17 73M1866B 73M1966B TAPI High Level Driver User Guide UG_1x66B_021 3 13 IFX_TAPI PHONE VOLUME_SET Description Sets the speaker phone and microphone volume settings define IFX_TAPI_PHONE_VOLUME_SET _ITOW IFX_TAPI_IOC_MAGIC Prototype int ioctl int chan_fd int IFX_TAPI_PHONE_VOLUME_SE unsigned long param 0x42 int
8. Rev 2 2 UG_1x66B_021 73M1 866B 73M1966B TAPI High Level Driver User Guide Table of Contents 1 Nod C O iii a iia 5 TA Purpose and Scope aa Ao 5 1 2 Conventions Used in this Guide ccccoocccccconccncononcnnnnnoncnnnnononnnnnononnnnnnncnnnnnnonnnonnananononnnannnnnos 6 T3 GACKONYIM Siss sais cx NN 6 2 Driver Service INtertace A cossdvasceadacucdasedeasdvdsaeusuctuebaauabes 7 2 1 LINUX Operating System krsi Aaa 7 2 2 Other Operating Systems cnn nan nn nn cnn nn n rana n rn nn cnn nn rn nn rana rra 7 3 IFXTAPIlOCTL Commands DescriptiON oooconnnnnnnnnnnnnnccnnnnnnannrrrnnnnnccrrrrrc rr 8 Sok MEE TAREA AAN E ae is 9 3 2 IFX_TAPI_PCM_IF CFG_SET ccccccccccccsccscsseccsscscescssuseuscecuseueesauceseusaceuseucuseseesaucesenseusauens 10 3 3 IFX_TAPI_PCM_CFG_SET oooocccccnnnnncnnnnconnnnnnnnnnnnnnnnnnnnnnnnnononnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnns 11 34 EX TAP PEMIGEG GE atte 11 3 5 IFX_TAPI_PCM_ACTIVATION SET 12 3 6 IFX_TAPI_PCM_ACTIVATION_ GET 4 13 S7 FX TAP EVENT ENABLE coria r ar rA ia ensalada 14 3 9 TEX TAPIL EVENT DISABLE Guarani 14 39 TIEXSTAP EVENTEGE iaa Riedie iiavien A 15 3 T0 FX TAPI VERSION GET saat 15 3 11 IFX_TAPL DEBUG REPORT SET oocccccnnnccccnnnnoncnnnoncnnnonannnnonononnnononnnnnnonannnnnnnnnnnnnnnrnnnanannns 16 3 12 EX TAR LINE TYPE SE diosa aa 17 3 13 IFX_TAPIL_PHONE _ VOLUME _ SET 18 3 14 TEX TAPL FXO
9. _CNTRY_CODE_AR 0 Argentina define M1966_CNTRY_CODE_AU 1 Australia define M1966 CNTRY CODE AT 2 Austria define M1966_CNTRY_CODE_BH 3 Bahrain define M1966 CNTRY CODE _ BE 4 Belgium define M1966 CNTRY CODE BR 5 Brazil define M1966_CNTRY_CODE_BG 6 Bulgaria define M1966_CNTRY_CODE_CA 7 Canada define M1966 CNTRY CODE CL 8 Chile define M1966 CNTRY CODE Cl 9 ChineData define M1966_CNTRY_CODE_C2 10 ChinaVoice define M1966 _CNTRY_CODE_CO 11 Columbia define M1966 CNTRY CODE _HR 12 Croatia define M1966 CNTRY CODE TB 13 TBR 21 define M1966 CNTRY CODE CY 14 Cyprus define M1966 CNTRY CODE CZ 15 Czech Rep define M1966_CNTRY_CODE_DK 16 Denmark define M1966 _CNTRY_CODE_EC 17 Equador define M1966 CNTRY CODE _ EG 18 Egypt define M1966_CNTRY_CODE_SV 19 El Salvador define M1966 CNTRY CODE FI 20 Finland define M1966_CNTRY_CODE_FR 21 France define M1966_CNTRY_CODE_DE 22 Germany define M1966_CNTRY_CODE_GR 23 Greece define M1966 _CNTRY_CODE_GU 24 Guam define M1966 _CNTRY_CODE_HK 25 Hong Kong define M1966_CNTRY_CODE_HU 26 Hungary define M1966_CNTRY_CODE_IS 27 Iceland define M1966 CNTRY CODE_IN 28 India define M1966_CNTRY_CODE_ID 29 Indonesia define M1966 _CNTRY_CODE_IE 30 Ireland define M1966 _CNTRY_CO
10. activation status 0 deactivate the time slot 1 activate the time slot Return Values Data Type Description int IFX_ERROR Failed to perform PCM activation set IFX_SUCCESS Successful 12 Rev 2 2 UG_1x66B_021 73M1 866B 73M1966B TAPI High Level Driver User Guide 3 6 IFX_TAPI_PCM_ACTIVATION_GET Description This service gets the activation status of the PCM time slots configured for this channel define IFX_TAPI_PCM_ACTIVATION_GET _IO IFX_TAPI_IOC_MAGIC 0x07 Prototype int ioctl int chan_fd int IFX_TAPI_PCM_ACTIVATION_GET unsigned long param Parameters Data Type Name Description int chan_fd Channel descriptor int IFX_TAPI_PCM_ACTIVATION_GET I O control identifier for this operation unsigned long param The parameter points to an integer which returns the status 0 The time slot is deactivate or 1 The time slot is active Return Values Data Type Description int IFX_ERROR Failed to retrieve PCM channel activation status IFX_SUCCESS Successful Rev 2 2 13 73M1 866B 73M1966B TAPI High Level Driver User Guide UG_1x66B_ 021 3 7 IFX_TAPI_EVENT_ENABLE Description Enable detection of FXO events define IFX_TAPI EVENT _ENABLE _IO IFX_TAPI_IOC_MAGIC 0xC1 Prototype int ioctl int chan_fd int IFX_TAPI_EVENT_ENABLE unsigned long param
11. the battery status e IFX_TRUE if the FXO port is disconnected from the PSTN battery absent e IFX_FALSE if the FXO port is connected to the PSTN battery present Return Values Data Type Description int IFX_ERROR Failed to read battery status IFX_SUCCESS Successful 20 Rev 2 2 UG_1x66B_021 73M1 866B 73M1966B TAPI High Level Driver User Guide 3 18 IFX_TAPI_FXO_APOH_ GET Description Retrieves APOH another phone off hook status of the fxo interface define IFX_TAPI_FXO_APOH_GET Prototype int ioctl int chan_fd int IFX_TAPI_FXO_APOH_GI unsigned long param ET _IOW IFX_TAPI_IOC_MAGIC OxDF int Parameters Data Type Name Description int chan_fd Channel descriptor int IFX_TAPI_FXO_APOH_GET I O control identifier for this operation unsigned long param Points to IFX_boolean_t type indicating APOH status IFX_TRUE if APOH condition is verified IFX_FALSE otherwise Return Values Data Type Description int IFX_ERROR Failed to read APOH status IFX_SUCCESS Successful Rev 2 2 21 73M1866B 73M1966B TAPI High Level Driver User Guide UG_1x66B_ 021 3 19 IFX_TAPI_FXO_RING_ GET Description Receives ring status from the FXO interface define IFX_TAPI_FXO_RING_GET Prototype int ioctl int chan_fd int IFX_TAPI_FXO_RING_GET unsigned long param
12. API_LINE_TYPE_t lineType Must be IFX_TAPI_LINE_TYPE_FXO TFX_uint8_t nDaaCh N A 4 6 IFX_TAPI_FXO_LINE MODES t Description This data type enumerates possible FXO channel management commands used by the IFX_TAPI_LINE_TYPE_SET ioctl Prototype Defines the possible line modes for fxo used in IFX_TAPI_FXO_LINE_MODES_t typedef enum Disabled IFX_TAPI_FXO_LINE MODE DISABLED 0 Active IFX_TAPI_FXO_LINE MODE ACTIVE 1 IFX_TAPI_FXO_LINE_MODES_t Data Type Name Description IFX_TAPI_FXO_LINE_MODE_DISABLED 0 Disable FXO channel IFX_TAPI_FXO_LINE MODE ACTIVE 1 Enable FXO channel Rev 2 2 29 73M1866B 73M1966B TAPI High Level Driver User Guide UG_1x66B_021 4 7 IFX TAPI LINE VOLUME t Description Structure used to configure phone volume settings Prototype typedef struct int nGainRx int nGainTx IFX_TAPI_LINE_VOLUME_t Data Type Name Description int nGainRx Volume setting for the receiving path int nGainTx Volume setting for the transmitting path 4 8 IFX_TAPI_FXO_ HOOK t Description Defines the possible hook status for fxo used in IFX_TAP I_FXO_HOOK_SET Prototype typedef enum IFX_TAPI_FXO_HOOK_ONHOOK 0 TFX_TAPT_FXO_HOOK_OFFHOOK 1 IFX_TAPTI_FXO_HOOK_t
13. CODE SG M1966 CNTRY CODE SK M1966 CNTRY CODE SI M1966 CNTRY CODE ZA M1966 CNTRY CODE KR M1966 CNTRY CODE ES M1966 CNTRY CODE SE M1966 CNTRY CODE CH M1966 CNTRY CODE SY M1966 CNTRY CODE TW M1966 CNTRY CODE TH M1966 CNTRY CODE M1966 CNTRY CODE UK M1966 CNTRY CODE US M1966 CNTRY CODE YE 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 Oman Pakistan Peru Philippines Poland Portugal Romainia Russia Saudi Arabia Singapore Slovakia Slovenia S Africa S Korea Spain Sweden Switzerland Syria Taiwan Thailand UAE UK USA Yemen El ay wy 7 El 7 ay xf Rev 2 2 33 73M1866B 73M1966B TAPI High Level Driver User Guide UG_1x66B_ 021 5 Related Documentation The following 73M1x66B documents are available from Teridian Semiconductor Corporation 73M1866B 73M1966B Reference Driver User Manual 73M1866B 73M1966B Data Sheet 73M1866B 73M1966B Demo Board User Manual 73M1866B 73M1966B GUI User Guide 73M1866B 73M1966B Layout Guidelines 73M1x66 Worldwide Design Gu
14. DE_IL 31 Israel define M1966 CNTRY CODE IT 32 Italy define M1966_CNTRY_CODE_JP 33 Japan define M1966 _CNTRY_CODE_JO 34 Jordan define M1966 _CNTRY_ CODE KZ 35 Kazakhstan define M1966_CNTRY_ CODE _ KW 36 Kuwait define M1966 CNTRY CODE LV 37 Latvia define M1966_CNTRY CODE _LB 38 Lebanon define M1966_CNTRY_CODE_LU 39 Luxembourg define M1966_CNTRY_CODE_MO 40 Macao define M1966_CNTRY_CODE_MY 41 Malaysia define M1966_CNTRY_CODE_MT 42 Malta define M1966_CNTRY_CODE_MX 43 Mexico define M1966_CNTRY_CODE_MA 44 Morocco define M1966_CNTRY_CODE_NL 45 Netherlands define M1966_CNTRY_CODE_NZ 46 New Zealand define M1966_CNTRY_CODE_NG 47 Nigeria define M1966_CNTRY_CODE_NO 48 Norway 32 Rev 2 2 UG_1x66B_021 73M1 866B 73M1966B TAPI High Level Driver User Guide define define define define define define define define define define define define define define define define define define define define define define define define M1966 CNTRY CODE OM M1966 CNTRY CODE PK M1966 CNTRY CODE PR M1966 CNTRY CODE PH M1966 CNTRY CODE PL M1966 CNTRY CODE PT M1966 CNTRY CODE RO M1966 CNTRY CODE RU M1966 CNTRY CODE SA M1966 CNTRY
15. Data Type Name Description int dev_fd Device descriptor int IFX_TAPI_EVENT_GET MO control identifier for this operation unsigned long param Pointer to an IFX_TAPI_EVENT_t structure Return Values Data Type Description int IFX_ERROR Failed to read event IFX_SUCCESS Successful 3 10 IFX_TAPI_VERSION_GET Description Retrieves the TAPI Driver version string define IFX_TAPI_VERSION_GET _IO IFX_TAPI_IOC_MAGIC 0x00 Prototype int ioctl int dev_fd int IFX_TAPI_VERSION_GET unsigned long param Parameters Data Type Name Description int dev_fd Device descriptor int IFX_TAPI_EVENT_GET MO control identifier for this operation unsigned long param Pointer to version character string Return Values Data Type Description int IFX_ERROR Failed to get TAPI version IFX_SUCCESS Successful Rev 2 2 15 73M1 866B 73M1966B TAPI High Level Driver User Guide UG_1x66B 021 3 11 IFX_TAPI_DEBUG_REPORT_SET Description Set the driver trace mask to enable or disable run time trace messages Multiple trace masks can define IFX_TAPI_DEBUG_REPORT_SET _IO IFX_TAPI_IOC_MAGIC 0x12 Prototype int ioctl int dev_fd int IFX_TAPI_DEBUG_REPORT_SET unsigned long param Parameters Data Type Name Description int dev_fd Device descriptor int IFX_TAPI_DEBUG_REPORT_SET I O control identifier for this operation unsigned long param Debug trace mask
16. Driver Architect te iii Tables Table 1 Summary of IFX TAPI IOCTLS occccccnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnoos Table 2 Summary of Types and Structure Definitions Rev 2 2 UG_1x66B_021 73M1866B 73M1966B TAPI High Level Driver User Guide 1 Introduction This document describes the functionalities of the 73M1866B 73M1966B TAPI Driver This driver software is provided as part of the Infineon BSP package for Danube Vinax and AR9 platforms Its design and implementation is tightly integrated with Infineon TAPI architecture therefore its sole purpose is to be used in Infineon TAPI environment In addition to this TAPI driver the Teredian 73M1866B 73M1966B Reference Driver is also required as for interface to the 73M1x66 chip set The 73M1x66B TAPI driver is built as a loadable module It will be brought into operation by a user application or by an operating system startup script For Linux the insmod command is used to insert the driver into the kernel The insmod command invokes the module_init macro which in turn runs the one time initialization function of the driver 1 1 Purpose and Scope IFX TAPI is the API layer used by Infineon This version of the Teridian TAPI driver is compliant to IFX TAPI Version 3 8 3 This specification is available from Infineon The 73M1x66B TAPI Driver provides the necessary system interfaces for the control and management of the 73M1x66B The driver supports ioctl call
17. ENT_DISABLE Disable FXO event detection Channel IFX_TAPI_EVENT_GET Retrieve FXO event Device IFX_TAPI_VERSION_GET Retrieve driver version number Device IFX_TAPI_DEBUG_REPORT_SE Set driver debug message trace mask Device IFX_TAPI_LINE_TYPE_SET Set line type must be FXO only Channel IFX_TAPI_PHONE_VOLUME_SET Set speaker phone micro phone volume Channel IFX_TAPI_FXO_HOOK_SET Issue on off hook Channel IFX_TAPI_FXO_FLASH_SET Issue flash hook Channel IFX_TAPI_FXO_FLASH_CFG_SET Configure FXO hook flash parameter Channel IFX_TAPI_FXO_BAT_ GET Retrieve battery status Channel IFX_TAPI_FXO_APOH_ GET Retrieve APOH status Channel IFX_TAPI_FXO_RING_ GET Retrieve ring status Channel IFX_TAPI_FXO_POLARITY_ GET Retrieve line polarity status Channel IFX_TAPI_LASTERR Retrieve driver last error code Device IFX_TAPI_FXO_LINE_MODE_SET Enable Disable FXO channel Channel 8 Rev 2 2 UG_1x66B_021 73M1 866B 73M1966B TAPI High Level Driver User Guide 3 1 IFX_TAPI_CH_INIT Description Perform all 73M1x66 channel initialization This includes initialize all default registers and country specific threshold parameters define IFX_TAPI_CH_INIT _IO IFX_TAPI_IOC_MAGIC 0x0F Prototype int ioctl int chan_fd int IFX_TAPI_CH_INIT unsigned long param Parameters Data Type Name Description int chan_fd Channel descriptor int IFX_TAPI_CH_INIT 1 O control identifier for this operation unsigned long param
18. LASH_SET MO control identifier for this operation unsigned long param Parameter is not required Return Values Data Type Description int IFX_ERROR Failed to perform hook flash IFX_SUCCESS Successful 3 16 IFX_TAPI_FXO FLASH _CFG_SET Description Configuration of the fxo hook define IFX_TAPI_FXO_FLASH_CFG_SET _IOW IFX_TAPI_IOC_MAGIC 0xD7 int Prototype int Oct int chan_fd int IFX_TAPI_FXO_FLASH_CFG_SET unsigned long param Parameters Data Type Name Description int chan_fd Channel descriptor int IFX_TAPI_FXO_FLASH_CFG_SET O control identifier for this operation unsigned long param Points to an IFX_TAPI_FXO_FLASH_CFG_t structure Return Values Data Type Description int IFX_ERROR Failed to set hook flash config IFX_SUCCESS Successful Rev 2 2 19 73M1866B 73M1966B TAPI High Level Driver User Guide UG_1x66B_ 021 3 17 IFX_TAPI_FXO_BAT_GET Description Receives battery status from the FXO interface define IFX_TAPI_FXO_BAT_GET _TOW IFX_TAPI_IOC_MAGIC OxDD int Prototype int ioctl int chan_fd int IFX_TAPI_FXO_BAT_GET unsigned long param Parameters Data Type Name Description int chan_fd Channel descriptor int IFX_TAPI_FXO_BAT_GET I O control identifier for this operation unsigned long param Points to IFX_boolean_t type indicating
19. S HOOK SE Tia aaa 18 315 EX TAPIA FXO FLASH SET a A A A A A aa 19 3 16 IFX_TAPI_FXO_FLASH_CFG_SETooccccccncccnnccccnnnnnnnnonconnnnnnnnnnnnononnnnnnnnnnnnnonnnnnnnnnnnnnnnnnonanananns 19 3 17 EX TAPI EXO BAT GET AA A A a 20 3 18 1EXTAPISEXOAPOH GERE 000 aia 21 3 19 1EX TAPIEFXO RING GEN aa 22 3 20 IFX_TAPI FXO POLARITY GET 23 3 21 TEX TAP LASTER R rn ata dint tht wud kn a 24 3 22 IFX_TAPI FXO_LINE MODE SET a A E AE AEAT E 25 4 Type and Structure DefinitioNsS ccoccccccccccccncccncnnnnnonononononnnnnnnnnnnnnnnnrrrrrnnn rra 26 T EX TAPIA AN Tita aa 26 42 EX TAP POM IE CRG EE id 27 AMES TAPE PCM CG etdateveaveriunnavess 28 4A MEX TAPLEVEN Titania 28 45 IFEX TAPE EINE TYPE GEG diia a aE AAE arab 29 4 6 IFX_TAPL FXO_LINE MO DE Goi cccccccceeeeceeseeeeeeceeeceeeeeeeceeeueseeeeaeeeeeeaeneeeeaeeeeeaaes 29 4 amp 7 EX TAP LINE VOLUME Escocia cosa AE AEEA EAA AA E ENN 30 4 8 IEX TAP EXO HOOK Ea 30 4 9 1FX TAPI FXO FLASH CFG tevceris cee cess yess ssc vere seed vayasseseasasecdvsdarseieisasesssassssvaesbasedsssdaccisvdeesd 30 4 40 JEX TAPIA EVENT ID diia 31 4 11 M1966 DEBUG_ TRACE _MAS 4 31 412 M1966 CNTRY CODE XX 32 5 Related Documentatio iiias soci cece en a dectobeadanadevadanacsweduan Chweduattededuaanedsaacducdcevascedatea 34 6 COntact INPOMM NO 34 ROVISION HISTO V ic raras 35 Rev 2 2 3 73M1866B 73M1966B TAPI High Level Driver User Guide UG_1x66B_021 Figures Figure 1
20. The parameter points to a IFX_TAPI_CH_INIT_t structure Return Values Data Type Description int IFX_ERROR Failed perform channel initialization IFX_SUCCESS Successful Rev 2 2 9 73M1866B 73M1966B TAPI High Level Driver User Guide UG_1x66B_021 3 2 IFX_TAPI_PCM_IF_CFG_SET Description This ioctl configures the PCM interface define IFX_TAPI_PCM_IF_CFG_SET Prototype int ioctl int dev_fd int IFX_TAPI_PCM_IF_CFG_SET unsigned long param _TO IFX_TAPI_IOC_MAGIC 0x11 Parameters Data Type Name Description int dev_fd Device descriptor int IFX_TAPI_PCM_IF_CFG_SET MO control identifier for this operation unsigned long param The parameter points to a IFX_TAPI_PCM_IF_CFG_SET_t structure Return Values Data Type Description int IFX_ERROR Failed to configure PCM interface IFX_SUCCESS Successful 10 Rev 2 2 UG_1x66B_021 73M1 866B 73M1966B TAPI High Level Driver User Guide 3 3 IFX_TAPIL PCM CFG_SET Description This ioctl configure the time slot for the PCM channel define IFX_TAPI_PCM_CFG_SET _TO IFX_TAPI_IOC_MAGIC 0x04 Prototype int ioctl int chan_fd int IFX_TAPI_PCM_CFG_SET unsigned long param Parameters Data Type Name Description int chan_fd Channel descriptor int IFX_TAPI_PCM_CFG_SET I O control identifier for this operation unsigned long
21. XO_NOPOH IFX_TAPI_EVENT YPE_FXO 0x0008 IFX_TAPI_EVENT_ID_t 4 11 M1966 DEBUG_TRACE_MASK Description Trace macros used by ioctl IFX_TAPI_DEBUG_REPORT_SET Prototype define M1966_DEBUG_EVENT 0x00000001 define M1966_DEBUG_INIT 0x00000002 define M1966_DEBUG_RING_PATH 0x00000004 define M1966_DEBUG_TRACE 0x00000008 define M1966_DEBUG_COUNTRY_CODE 0x00000010 define M1966_DEBUG_CLIP 0x00000020 define M1966_DEBUG_LINE_STATE 0x00000040 define M1966_DEBUG_IOCTL 0x00000080 define M1966_DEBUG_PCM 0x00000100 define M1966_DEBUG_BARRIER 0x00000200 define M1966_DEBUG_INT 0x00000400 define M1966_DEBUG_PHU 0x00000800 define M1966_DEBUG_TAPI 0x00001000 define M1966_DEBUG_KPROC 0x00002000 define M1966_DEBUG_SPI 0x00004000 define M1966_DEBUG_ERROR 0x80000000 Rev 2 2 31 73M1866B 73M1966B TAPI High Level Driver User Guide UG_1x66B_ 021 4 12 M1966 CNTRY_CODE_XX Description Country code macros used by ioctl IFX_TAPI_CH_INIT Prototype BR RK KKK RARA KK KKK KKK HK IK KKK KKK IKK KKK KKK KKK ARK ARK A KKK KK KK k k 73M1966 Country code List Internet Country Codes HH KK KK KKK KKK HK HK IK KKK HK KK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KK KKK define M1966
22. X_TAPI_FXO_FLASH_CFG_SET IFX_TAPI_EVENT_ID_t List of event IDs M1966_DEBUG_TRACE_MASK Trace macros used by ioctl IFX_TAPI_DEBUG_REPORT_SET M1966_CNTRY_CODE_XX Country code macros used by ioctl IFX_1 TAPI_CH_INIT 4 1 IFX_TAPI_CH_INIT t Description TAPI initialization structure used by IFX_TAPI_CH_INIT Prototype typedef struct u nsigned char nMode unsigned char nCountry Vv oid pProc IFX_TAPI_CH_INIT_t Parameters Data Type Name Description Unsigned char nMode N A Unsigned char nCountry Country code as defined in M1966_CNTRY_CODE_XX Void pProc For details see the 73M1866 73M1966 Reference Driver User Guide 26 Rev 2 2 UG_1x66B_021 73M1 866B 73M1966B TAPI High Level Driver User Guide 4 2 IFX_TAPI_PCM_IF_CFG_t Description Structure for PCM interface configuration used by IFX_TAPI_PCM_IF_CFG_SET Prototype typedef struct IFX_TAPI_PCM_IF_MODE_t nOpMode IFX_TAPI_PCM_IF_DCLFREQ_t nDCLFreq IFX_operation_t nDoubleClk IFX_TAPI_PCM_IF_SLOPE_t nSlopeTX IFX_TAPI_PCM_IF_SLOPE_t nSlopeRx IFX_TAPI_PCM_IF_OFFSET_t nOffsetTX IFX_TAPI_PCM_IF_OFFSET_t nOffsetRX IFX_TAPI_PCM_IF_DRIVE_t nDrive IFX_operation_t nShift IFX_uint8_t nMCTS IFX_TAPI_PCM_IF_CFG_t
23. arameter points to a IFX_TAPI_FXO_LINE_MODES_t structure Return Values Data Type Description int IFX_ERROR Failed to set line mode IFX_SUCCESS Successful Rev 2 2 25 73M1 866B 73M1966B TAPI High Level Driver User Guide UG_1x66B_021 4 Type and Structure Definitions This section describes the type definitions data types and structures used in the 73M1x66B TAPI driver Table 2 Summary of Types and Structure Definitions Structure Type Name Description IFX_TAPI_CH_INIT_t TAPI initialization structure used by IFX_TAPI_CH_INIT IFX_TAPI_PCM_IF_CFG_t PCM interface configuration structure used by IFX_TAPI_PCM_IF_CFG_SET IFX_TAPI_PCM_ CFG_t Structure for PCM channel configuration IFX_TAPI_EVENT_t Structure reported by an IFX_TAPI_EVENT_GET ioctl IFX_TAPI_LINE_TYPE_CFG_t Line type configuration used by IFX_TAPI_LINE_TYPE_SET IFX_TAPI_FXO_LINE_MODES_t Enumerates possible FXO channel management commands used by the IFX_TAPI_LINE_TYPE_SET ioctl IFX_TAPI_LINE_VOLUME_t Configures phone volume settings IFX_TAPI_FXO_HOOK_t Defines the possible hook status for FXO used in IFX_TAPI_FXO_HOOK_SET IFX_TAPI_FXO_FLASH_CFG_t FXO hook configuration used in IF
24. ide TAPI V3 Users Manual available from Infineon 6 Contact Information For more information about Teridian Semiconductor products or to check the availability of the 73M1866B and 73M1966B contact us at 6440 Oak Canyon Road Suite 100 Irvine CA 92618 5201 Telephone 714 508 8800 FAX 714 508 8878 Email modem support teridian com For a complete list of worldwide sales offices go to http www teridian com 34 Rev 2 2 UG_1x66B_021 73M1 866B 73M1966B TAPI High Level Driver User Guide Revision History Revision Date Description 1 0 10 28 2008 First publication 2 0 3 20 2009 Provided detail IOCTL interface Removed redundant implementation description those should be referred to the 73M1866B 73M1966B Reference Driver User Guide Restructured document to conform to Teridian standard format 2 2 7 16 2010 Added FXO line enable disable OCTLs Rev 2 2 35
25. last error code occurred in the TAPI driver or the low level driver define IFX_TAPI_LASTERR _TOW IFX_TAPI_IOC_MAGIC 0x48 int Prototype int ioctl int dev_fd int IFX_TAPI_LASTERR unsigned long param Parameters Data Type Name Description int dev_fd Device descriptor int IFX_TAPI_LASTERR I O control identifier for this operation unsigned long param The parameter points to a IFX_TAPI_ErrorLine_t structure Return Values Data Type Description int IFX_ERROR Failed to read last error code IFX_SUCCESS Successful 24 Rev 2 2 UG_1x66B_021 73M1 866B 73M1966B TAPI High Level Driver User Guide 3 22 IFX_TAPI_FXO_LINE MODE_SET Description This service is used to manage enable disable the FXO channel When disabled the FXO channel is inoperative and it does not monitor the physical line for channel events nor will it detect any incoming ring signal However it can be put back in operation using this ioctl with the enable parameter define IFX_TAPI_FXO_LINE_MODE_SET _IOW IFX_TAPI_IOC_MAGIC OxE4 int Prototype int ioctl int dev_fd int IFX_TAPI_FXO_LINE_MODE_SET unsigned long param Parameters Data Type Name Description int chan_fd Channel descriptor int IFX_TAPI_FXO_LINE_MODE_SET I O control identifier for this operation unsigned long param The p
26. nd channel descriptors must be created in the dev directory at the same time when the driver is insmod into the kernel The mknod command is used to create those descriptors as illustrated below mknod m 660 dev ter10 c 221 0 mknod m 660 dev terl11 c 221 1 In this example above one device descriptor ter10 is created with major number 221 minor number 0 and one channel descriptor ter1 1 is created with major number 221 minor number 1 Once the driver is installed and the device channel descriptors are created the driver service can be accessed via standard C library open close and ioct1 functions The following illustrates how the device and channel are opened closed and the ioctl access devfd open dev chanfd open dev r10 0_RDONLY O_WRONLY r11 0O_RDONLY O_WRONLY ioctl devfd M1966_EVENT_GET Sevent_structure ioctl chanfd M1966_ATH1 NULL close devfd close chanfd Accessing the driver using ioctl must be done via an opened descriptor There are two types of ioctl command the device level commands which can be accessed by an opened device descriptor and channel level commands which can be accessed using an opened channel descriptor Section 3 describes the ioctl command 2 2 Other Operating Systems To be provided Rev 2 2 7 73M1866B 73M1966B TAPI High Level Driver User Guide UG_1x66B_021 3 IFX TAPI IOCTL Command
27. param The parameter points to a IFX_TAPI_PCM_CFG_t structure Return Values Data Type Description int IFX_ERROR Failed to configure PCM channel IFX_SUCCESS Successful 3 4 IFX_TAPI_PCM_CFG_GET Description This ioctl retrieves the current time slot configuration for the PCM channel define IFX_TAPI_PCM_CFG_GET _TO IFX_TAPI_IOC_MAGIC 0x05 Prototype int ioctl int chan_fd int IFX_TAPI_PCM_CFG_GET unsigned long param Parameters Data Type Name Description int chan_fd Channel descriptor int IFX_TAPI_PCM_CFG_GET I O control identifier for this operation unsigned long param The parameter points to a IFX_TAPI_PCM_CFG_t structure Return Values Data Type Description int IFX_ERROR Failed to retrieve PCM config IFX_SUCCESS Successful Rev 2 2 11 73M1866B 73M1966B TAPI High Level Driver User Guide UG_1x66B_ 021 3 5 IFX_TAPI_PCM_ACTIVATION_ SET Description This service activates deactivates the PCM time slots configured for this channel define IFX_TAPI_PCM_ACTIVATION_SET _TO IFX_TAPI_IOC_MAGIC 0x06 Prototype int ioctl int chan_fd int IFX_TAPI_PCM_ACTIVATION_SET unsigned long param Parameters Data Type Name Description int chan_fd Channel descriptor int IFX_TAPI_PCM_ACTIVATION_SET MO control identifier for this operation unsigned long param The parameter defines the
28. r application First the driver must be loaded and bonded into the operating system environment before this service can be provided Access to the driver is done via two file descriptors the device and channel file descriptors The device file descriptor provides access to device level management interface while the channel descriptor is used to manage at the channel level interface The driver supports multiple FXO channels through separated channel descriptors however only one device descriptor is used The following sections describe how the driver is brought into action based on the operating system environment 2 1 Linux Operating System This description is valid for Linux 2 4 and 2 6 The 73M1x66B driver takes the form of a Linux standard character device driver It is brought into operation by a user application or by Linux startup script using insmod command This command inserts the driver module into the kernel which in turn registers with the kernel using the default major number of 221 Multiple FXO channels are supported via the use of minor number which can varies from 0 to 16 This minor number associated with the device and channel descriptors created using mknod command The driver expects the minor number 0 to be associated with the device descriptor and the number from 1 to 16 with the channel descriptors Device major and minor numbers are configurable at build time as described in the Reference Driver document The device a
29. s Description Once the driver is successfully opened the application can control the operation of the device and the FXO channel The application in user space communicates with the driver via standard Linux driver interface IOCTL calls The following sections describe the detail of each IOCTL command Some commands pertain to device level configuration such as PCM interface parameters these must be called using device descriptor while others are channel level commands and must be called using specific channel descriptor if more than one channel is active Table 1 provides a summary of the IOCTLs Table 1 Summary of IFX TAPI IOCTLs IOCTL Name Description Descriptor IFX_TAPI_CH_INIT Initializing FXO channel for operation Channel IFX_TAPI_PCM_IF_CFG_SET Set PCM interface configuration Device IFX_TAPI_PCM_CFG_SET Set PCM configuration Channel IFX_TAPI_PCM_CFG_GET Retrieve PCM configuration Channel IFX_TAPI_PCM_ACTIVATION_SE1 Activate Deactivate PCM channel Channel IFX_TAPI_PCM_ACTIVATION_GE1 Retrieve PCM activation state Channel IFX_TAPI_EVENT_ENABLE Enable FXO event detection Channel IFX_TAPI_EV
30. s from the application and translates these to and from the device via the Reference Driver layer The scope of this document will includes only the TAPI driver s user interface Detail of internal driver architecture can be found in the 73M1x66B Reference Driver User Guide document Figure 1 illustrates the basic architecture model for the driver The model is intended to be independent of processor and operating system Layers above the reference driver address software interfaces which may pre exist for a given application e g Asterisk and the layer below addresses hardware related interfaces between the processor and the 73M1x66B devices TAPI IOCTL TSC IOCTL Figure 1 Driver Architecture Rev 2 2 5 73M1 866B 73M1966B TAPI High Level Driver User Guide UG_1x66B_ 021 1 2 Conventions Used in this Guide This document uses the following conventions e Software code IOCTL names and data types are presented in Courier font e A table with a blue header is a summary table A table with a gray header is a detail table 1 3 Acronyms APOH Another Phone Off Hook BSP Board Support Package DAA Data Access Arrangement FXO Foreign eXchange Office IOCTL I O Control NOPOH No Phone Off Hook POH Phone Off Hook 6 Rev 2 2 UG_1x66B_021 73M1 866B 73M1966B TAPI High Level Driver User Guide 2 Driver Service Interface The Driver Service provides the link between the FXO device and the use
31. tion Parameters Data Type Name Description unsigned long nTimeslotRX PCM timeslot for the receive direction unsigned long nTimeslotTX PCM timeslot for the transmit direction unsigned long nHighway Defines the PCM highway number which is connected to the channel unsigned long nResolution Defines the PCM interface coding values defined in IFX_TAPI_PCM_RES_t 4 4 IFX_TAPI_ EVENT t Description This structure is reported by an IFX_TAPI_EVENT_GET ioctl Prototype typedef struct IFX_TAPI_EVENT_ID_t id IFX_uintl6_t ch IFX_uint16_t more IFX_TAPI_EVENT_DATA_t data IFX_TAPI_EVENT_t Parameters Data Type Name Description IFX_TAPI_EVENT_ID_t id Event type and sub type IFX_uint16_t ch FXO channel number IFX_uintl6_t more This field is used to report whether new events are ready IFX_TRUE or not IFX_FALSE IFX_TAPI_EVENT_DATA_t data N A 28 Rev 2 2 UG_1x66B_021 73M1 866B 73M1966B TAPI High Level Driver User Guide 4 5 IFX_TAPI_LINE TYPE_CFG_t Description Line type configuration used by ioctl IFX_TAPI_LINE_TYPE_SET Prototype typedef struct IFX_TAPI_LINE_TYPE_t lineType IFX_uint8_t nDaaCh IFX_TAPI_LINE_TYPE_CFG_t Data Type Name Description IFX_T
Download Pdf Manuals
Related Search
Related Contents
Samsung Galaxy W Käyttöopas Quatech SATA2PX-100 凍結乾燥ウミホタル生物発光教材を使用した実践と その教育効果の評価 ce document RT Web GIS User Guide 1_6.pub General Purpose Logger type GP1 GE DDC4400S Electric Commercial Dryer Sun Installation Assistant 22 User`s Guide for the Sun FireX4640 ベイパーヘルメット 取扱説明書 Copyright © All rights reserved.
Failed to retrieve file