Reduce SR140 Volume on a Per Call Basis
Goals
- Allow the end user to increase or reduce SR140 volume for transmission or reception on a per call basis without needing to modify BT_CPARAM.CFG file. This feature will only adjust the V.17 modem and will not have any affect on the V.34 modem.
Background and strategic fit
Currently, the fax transmission level and fax reception level are set in the file BT_CPARM.CFG parameter file which contains several sets of parameters which are specific to a country or to a group of countries. For example, for the USA, the fax transmission level is set by the define DATA_LEVEL_USA (default 0xe2) and the fax reception level is set by the define REC_LEVEL_USA (default 0xaa) in the file mkparams.h. It is difficult to change these values in the file BT_CPARM.CFG since this file is a binary file. This feature request will implement three new ways of modifying the transmission and reception levels. The first way will be via new keywords in the user configuration file btcall.cfg, the second way will be via the API function BfvFaxT30Params() and the third way will be via the header information in info packet files. The changes implemented for this feature request will apply to all platforms (SR140 and boards).
Assumptions
Requirements
# | Title | User Story | Importance | Notes |
---|---|---|---|---|
1 | Provide parameters in btcall.cfg | Add new keywords to btcall.cfg to allow user to change SR140 levels. | Must Have | |
2 | Update API function BfvFaxT30Params() | Update BfvFaxT30Params() to allow the application to change the SR140 levels. | Must Have | |
3 | Apply to both SR140 and TR1034 | Apply to both SR140 and TR1034 | Nice to Have | |
4 | Documentation | Include in documentation in section "Parameters for Technical Support Purposes" | Must Have | |
5 | Update packet file t30 parameters | Update packet file t30 parameter to allow the SR140 levels to be changed. | Nice to Have |
User interaction and design
For the first way, two new keywords will be defined for the user configuration file btcall.cfg. For the fax transmission level (will also affect tone generation), the new keyword will be xmt_level_override and for the fax reception level the new keyword will be rcv_level_override. If the keyword xmt_level_override appears in btcall.cfg, it will override the DATA_LEVEL_XXX level specified in the BT_CPARM.CFG file. If the keyword rcv_level_override appears in btcall.cfg, it will override the REC_LEVEL_XXX level specified in the BT_CPARM.CFG file. The override for both transmission and reception will be relative. In other words, the override values will add or subtract from the BT_CPARM.CFG values.
The second way will be by calling the API function BfvFaxT30Params() to set xmt_level or rcv_level. These values will be additive to the btcall.cfg values. For example, if xmt_level_override is 4 in btcall.cfg and xmt_level is set to 2 before calling BfvFaxT30Params(), the transmit level will be increased by (4 * 0.5 dB + 2 * 0.5 dB = 3 dB). If rcv_level_override is -3 and rcv_level is set to -1 before calling BfvFaxT30Params() the receive level will be decreased by (3 * 0.5 dB + 1 * 0.5 dB = 2 dB).
The third way will be by having an info packet file (possibly created by the sample application mkinfopk.exe with a tag value of t30 @ and setting the xmt_level or rcv_level. These values will take precedence over the BfvFaxT30Params() and will be additive to the btcall.cfg values. For example, if xmt_level_override is 4 in btcall.cfg and xmt_level is set to 6 in the info packet file which is being sent, the transmit level will be increased by (4 * 0.5 dB + 6 * 0.5 dB = 5 dB). If rcv_level_override is 5 and rcv_level is set to -2 in the info packet file which is being sent, the receive level will be increased by (5 * 0.5 dB - 2 * 0.5 dB = 1.5 dB).
The transmit level in BT_CPARM.CFG ranges from 0xCE to 0x00 (-50 to 0) where -50 corresponds to the lowest possible transmit level and 0 corresponds to the highest possible transmit level. So for xmt_level_override = 2 and xmt_level = 4 the transmit level would increase by 3 dB total. The receive level in BT_CPARM.CFG ranges from 0xA8 to 0xBC (-88 to -68) where -88 corresponds to the highest possible receive level and -68 corresponds to the lowest possible receive level. So for rcv_level_override = 2 and rcv_level = 4 the receive level would increase by 3 dB total as well. The calculation for negating the rcv_level_override and rcv_level will be done in the software due to the inverted range for the receive level.
The new keywords should appear in the user configuration file btcall.cfg as follows:
xmt_level_override 2
rcv_level_override 2
The above value of 2 for xmt_level_override means that the transmit level will be increased by (2 * 0.5 dB = 1 dB).
The above value of 2 for rcv_level_override means that the receive level will be increased by (2 * 0.5 dB = 1 dB).
For the second way, two new members will be defined for the structure args_fax_t30_params. For the fax transmission level the new member will be defined as char xmt_level and for the fax reception level the new member will be defined as char rcv_level.
struct args_fax_t30_params {
RES res;
unsigned bit_rate;
unsigned scan_time;
unsigned modulation_type;
unsigned line_compression;
MILL_LINE *async_lp;
unsigned iaf_bit_rate;
char xmt_level;
char rcv_level;
};
An example for setting the new members xmt_level and rcv_level before calling BfvFaxT30Params(lp, &args_params); is as follows:
struct args_fax_t30_params args_params;
BT_ZERO(args_params);
args_params.xmt_level = 4;
args_params.rcv_level = 4;
// Set other parameters here such as bit_rate, scan_time, etc.
BfvFaxT30Params(lp, &args_params);
The above example will increase the transmit level by (4 * 0.5 dB = 2 dB) and increase the receive level by (4 * 0.5 dB = 2 dB).
For the third way, the xmt_level or rcv_level will be set in an info packet file made by the sample application mkinfopk.exe. Two new members will be defined for the structure t30Parampkt. For the fax transmission level the new member will be defined as char xmt_level and for the fax reception level the new member will be defined as char rcv_level.
struct t30parampkt {
struct infopkt hdr;
unsigned char bit_rate; /* cmd 44 */
unsigned char scan_time; /* cmd 42 */
unsigned char coding_type; /* not implemented */
unsigned char modulation_type;
unsigned char line_compression;
unsigned int iaf_bit_rate;
char xmt_level;
char rcv_level;
};
Questions
Below is a list of questions to be addressed as a result of this requirements document:
Question | Outcome |
---|---|
Not Doing
Tasks Releated to Feature