FXM FAQ

From synwaywiki
Revision as of 09:38, 14 May 2015 by Admin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

How to solve the problem that the system fails to detect the hangup at remote end as the volume of the recorded busy tone is quite low?

Modify the file main/dsp.c under the Asterisk directory, changing the previous content ‘#define DEFAULT_THRESHOLD 512’ to ‘#define DEFAULT_THRESHOLD 448’. The value can be reduced again if the problem is not solved yet.

How to solve the failure of FXM boards to receive the calling party number?

If you are using a version of zaptel, please uninstall it first. Then install a dahdi version and operate as follows (take the FXM-8A/PCI board for example).

Execute the command ‘echo 32 > /sys/module/fxm8apci/parameters/ringdebounce’. Then test if the board can well receive the calling party number. If the reception still fails, change 32 in this command to 16 or 8 and retest.

Note: If the file /sys/module/fxm8apci/parameters/ringdebounce does not exist, modify the command to ‘echo 32 >/sys/module/fxm8apci/ringdebounce’.

How to use the function of FXM series boards to adjust recording and playback volumes?

This volume adjustment function is valid to all channels on the same kind of boards. The value range of the parameter x is 1~255 which represents the DB value of 20log(x/10).

To adjust the recording volume for FXM-8A-PCI, execute the command:
echo x > /sys/module/fxm8apci/parameters/recvolume;
To adjust the playback volume for FXM-8A-PCI, execute the command:
echo x > /sys/module/fxm8apci/parameters/playvolume;
To adjust the recording volume for FXM-16A-PCIe, execute the command:
echo x > /sys/module/fxm16apcie/parameters/recvolume;
To adjust the playback volume for FXM-16A-PCIe, execute the command:
echo x > /sys/module/fxm16apcie/parameters/playvolume
To adjust the recording volume for FXM-32, execute the command:
echo x > /sys/module/fxm32/parameters/recvolume
To adjust the playback volume for FXM-32, execute the command:
echo x > /sys/module/fxm32/parameters/playvolume

How to adjust recording and playback volumes for a single station or analog trunk channel on FXM-32 boards?

Operate as follows:
echo n > /sys/module/fxm32/parameters/playvolume (playback volume)
echo n > /sys/module/fxm32/parameters/recvolume (recording volume)
n = Channel Number × 1000 + Gain
When the channel number is 0, modify the gains of all channels simultaneously (the same as the original definition); when the channel number is equal to or greater than 1, modify the gain of Channel n only.
For example:
When n=1007, modify the gain of the first channel (i.e. Channel 0) to 7, not changing the gain of other channels.
When n=3128, modify the gain of the third channel (i.e. Channel 2) to 128, not changing the gain of other channels.
When n=16, modify the gains of all channels to 16.
The value range of gain is 1~255, with that of channel number is 1~max_ch. The ‘max_ch’ mentioned herein refers to the actual maximum number of channels.

How to adjust the gain increase, gain decrease and echo switch for the interface chips on FXM32 series boards?

1. Load the driver.
2. Execute the command ‘#cat /proc/devices’ to obtain the major device number of fxm320x, e.g. the major device number is 253.
3. Create a device file.

#mknod /dev/fxm320x c 253 0
Here we assume the major device number is 253. It varies on actual conditions. 

4. Operate in user applications as follows.
Define the following macros:

#define SYNWAY_IOC_MAGIC 'S'            
#define SHFXM_MODIFY_VOICE_TX		        _IOW(SYNWAY_IOC_MAGIC, 1, int)    
#define SHFXM_MODIFY_IMPEDANCE          	_IOW(SYNWAY_IOC_MAGIC, 2, int)
#define SHFXM_MODIFY_VOICE_RX       	    _IOW(SYNWAY_IOC_MAGIC, 3, int)
#define SHFXM_MODIFY_EC			             IOW(SYNWAY_IOC_MAGIC, 4, int)
#define SHFXM_MODIFY_CODEC_VOICE_TX	    _IOW(SYNWAY_IOC_MAGIC, 5, int)
#define SHFXM_MODIFY_CODEC_VOICE_RX     _IOW(SYNWAY_IOC_MAGIC, 6, int)
Declare the following struct:
Struct shfxm_cmd_ops 
{
				int card;
				int channel;
				int value;
};

The meanings of the parameters in the above struct are:
card: The board number (count from 0);
channel: The channel number on a certain board (count from 0, with the maximum number of 31);
value: The value to be set
Note: If you want to adjust the gain increase or decrease (IOCTL is set to SHFXM_MODIFY_CODEC_VOICE_TX, SHFXM_MODIFY_CODEC_VOICE_RX), the value mentioned herein indicates the value of register to be set (Attention that the set values of FXS and FXO ports are quite different. As to an FXO port, the registers you need to adjust are Register 38, Register 39, Register 40 and Register 41 of the Si3050 Chip. As to an FXS port, the registers you need to adjust are Indirect Register 13 and Indirect Register 14 of the Si3215 Chip. For more information about these registers refer to the corresponding 'DataSheet'). If you want to adjust the impedance (IOCTL is set to SHFXM_MODIFY_IMPEDANCE), the value mentioned herein indicates the value of the register for impedance adjustment. For more information, see the corresponding 'DATASHEET'. If IOCTL is set to SHFXM_MODIFY_EC, value=1 means the echo cancellation switch of this channel is enabled, and value=0 means the echo cancellation switch of this channel is disabled.
The adjustment range and corresponding values for FXS ports are as follows:

Outgoing: The adjustment range is [0x0, 0x7FF].
          If it is set to 0x0, the corresponding value will be -∞.
          If it is set to 0x400, the corresponding value will be 0.
          If it is set to 0x7FF, the corresponding value will be 6dB.
Incoming: The adjustment range is [0x0, 0x7FF].
          If it is set to 0x0, the corresponding value will be -∞.
          If it is set to 0x400, the corresponding value will be 0.
          If it is set to 0x7FF, the corresponding value will be 6dB.

The adjustment range and corresponding values for FXO ports are as follows:
The setting format is ‘abbacc’.
a=0 means to adjust gain increase; a=1 means to adjust gain decrease.
To adjust gain increase, the value range of ‘bb’ is [0, 12]; to adjust gain decrease, the value range of ‘bb’ is [0, 15].
To adjust gain increase, the value range of ‘cc’ is [0, 12]; to adjust gain decrease, the value range of ‘cc’ is [0, 15].
Once the value of bb increases 1, the gain increases or decreases by 1dB. Therefore, by adjusting the value of bb, you can get the maximum gain increase of 12dB or gain decrease of 15dB.
Once the value of cc increases 1, the gain increases or decreases by 0.1dB. Therefore, by adjusting the value of cc, you can get the maximum gain increase of 1.2dB or gain decrease of 1.5dB.

How to adjust the value of 'Loop Current' for FXS modules on FXM32 series boards?

#insmod fxm32.ko loopcurrent=val (The unit is mA and the value range of val is 20~41. Once the value is out of this range, it will be reset to the default value of 20mA.)