FreeCalypso > hg > freecalypso-tools
annotate doc/Audio-mode-config @ 861:cc621af29b74
CHANGES: document fc-add-ramps
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 18 Dec 2021 21:36:39 +0000 |
parents | 6c306705f503 |
children |
rev | line source |
---|---|
245
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 There exist a number of tunable settings in the Iota ABB (the chip that performs |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 A-to-D and D-to-A conversion for the voice path) and in the Calypso DSP which |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 in TI's firmware architecture are meant to be configured through the audio mode |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 facility of the RiViera Audio Service. The ABB settings grouped under the audio |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 mode are as follows: |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 * The selection of which analog interface pins the downlink audio should be |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 sent to: EARN&EARP (earpiece), AUXON&AUXOP (auxiliary) or HSO (headset). |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 * The selection of which analog interface pins the uplink audio should be taken |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 from: MICIN&MICIP (main microphone), AUXI (auxiliary input) or HSMICP |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 (headset microphone). |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 * The selection of AUXI input levels when this analog input is in use for the |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 voice uplink. |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 * Analog gains for the uplink, the downlink and the analog sidetone from the |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 uplink input to the downlink output. |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 * Selection of a special filter bypass mode for the voice downlink. |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 * The selection of MICBIAS (or HSMICBIAS) voltage between 2.0 V and 2.5 V. |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 The DSP voice path settings grouped under the audio mode are as follows: |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 * The selection of the digital voice path as being between GSM and the ABB (the |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 default for analog voice interfaces), between GSM and MCSI (the external |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 digital voice interface) or between MCSI and the ABB (non-GSM operation). |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 * FIR filter coefficients for the voice uplink and for the voice downlink. |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 * Enabling/disabling and configuration of the Acoustic Echo Cancellation (AEC) |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 mechanism. |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 The firmware paradigm for working with all of the above settings is as follows: |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 * In a lab environment, each of the listed settings can be independently tweaked |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 and read back through ETM packets over the RVTMUX debug serial interface; the |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 corresponding fc-tmsh commands (matching TI's original Windows-based TMSH) |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 are auw for writing individual audio parameters and aur for reading them back. |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 * In end-use operation, TI's intent as realized in the firmware design is that |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 all of the listed audio settings will only be changed as a group, loaded from |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 audio mode configuration files in FFS. |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 Each audio mode configuration needs to be assigned a name between 1 and 9 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 characters long, and for each named configuration there are two files in FFS: |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 /aud/modename.cfg is the main configuration file |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 /aud/modename.vol is the corresponding volume setting file |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 This paradigm is a good fit for "dumbphone" handsets in which there usually |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 will be several different voice audio configurations for classic handheld |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 operation, for the hands-free loudspeaker mode, for operation with a wired |
838
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
55 headset, and if the phone uses its hands-free loudspeaker plus the Calypso DSP |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
56 to play ringtones (as opposed to using a buzzer on BU/PWT or a ringtone player |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
57 chip that drives the speaker bypassing the voice path), there will also need to |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
58 be an output-only audio configuration for ringing. |
245
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 How do the audio mode config files under /aud come into being? It appears that |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 TI's original intent was that a configuration would be manually constructed on |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 a test device via TMSH auw commands, saved in the FFS of that test device with |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 the aus command, then read out of that test device FFS in binary form and |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 reuploaded as an opaque blob to all devices on the production line. One can do |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 the same procedure with our fc-tmsh and fc-fsio which fully replicate the |
261
0321cd08b19f
doc/Audio-mode-config: typo fix
Mychaela Falconia <falcon@freecalypso.org>
parents:
247
diff
changeset
|
66 relevant functionality of TI's original TMSH (to the best of our knowledge), |
245
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 but in FreeCalypso we have an alternate way which fits better with our UNIX |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 philosophy: we have created our own ASCII text format for representing all of |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 the content in TI's /aud/*.cfg binary files and tiaud-* utilities for compiling |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 TI's binary cfg files from our ASCII source format, disassembling a *.cfg file |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 read out of FFS into the same ASCII format, and creating the required *.vol |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 companion files, which are also binary. |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 A note about volume settings: the Iota ABB has two variable gain controls in |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 the voice downlink path: the main "volume" gain in rather coarse 6 dB steps |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 (the choices being 0 dB, -6 dB, -12 dB, -18 dB, -24 dB and mute) and a finer |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 "calibration" gain in 1 dB steps between -6 and +6 dB. It appears that TI's |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 intent was that only the coarse volume control in 6 dB steps is to be visible |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 to the user, with just 5 possible non-mute volume levels, and that the finer |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 gain control be set at the factory in the audio mode config files for each mode |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 as some form of calibration. Pirelli DP-L10 significantly deviates from this |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 model by providing 10 non-mute volume levels to the user with 2 dB or 3 dB steps |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 between them by changing both VOLCTL and VDLPG fields in the VBDCTRL register, |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 but at the present time we have no plans to make a similar drastic change in |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 FreeCalypso. |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 Another noteworthy feature of the audio mode system with respect to volume |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 control is that there is a separate *.vol file that stores the current volume |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 setting for each mode. In a "dumbphone" handset firmware built according to |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 TI's paradigm, the /aud/*.cfg files will be written once on the factory |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 production line and only read afterward, but whenever the user turns the volume |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 up or down in the UI, the *.vol file _corresponding to the current mode_ will |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93 be updated by the running fw. Thus the fw would maintain a separate notion of |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 the current volume for ringing, for the earpiece speaker, for the hands-free |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 loudspeaker and for the wired headset, something which Pirelli's fw very |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 notoriously fails to do. |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 |
838
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
98 Old vs. new AEC |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
99 =============== |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
100 |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
101 One of the settings in the audio mode config structure underwent an evolutionary |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
102 change within the span of history that is relevant to FreeCalypso - this setting |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
103 is the configuration for AEC, the Acoustic Echo Cancellation functional block |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
104 of the Calypso DSP. As TI's GSM DSPs evolved (before, during and after the |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
105 Calypso era), their AEC implementation evolved along with the rest, and |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
106 different evolutionary versions of AEC require different configuration and |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
107 tuning parameters. When the audio mode facility was first implemented, the AEC |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
108 block in TI's GSM DSPs of that time was controlled with a single 16-bit control |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
109 word; the people in the SSA group who implemented RiViera Audio Service then |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
110 decided to split different bits from this one DSP control word into 5 different |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
111 parameter words, and the result was the "old" 5-word AEC config. |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
112 |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
113 But the version of AEC implemented in the DSP ROM in the Calypso silicon version |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
114 we work with is slightly newer; this version corresponds to what TI's L1 code |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
115 calls L1_NEW_AEC. However, the waters then got muddied: for reasons which we |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
116 (FreeCalypso team) cannot understand (perhaps miscommunication between different |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
117 groups at TI), TI's TCS211 reference firmware shipped with L1_NEW_AEC disabled |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
118 (C preprocessor symbol set to 0 instead of 1), even though the underlying DSP |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
119 AEC block (combination of ROM and official patches) is the "new" kind and not |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
120 the "old" one. There are two fallouts from this software misconfiguration on |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
121 TI's part: |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
122 |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
123 1) If one takes stock TCS211 from TI or any derivative version in which this |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
124 aspect is unchanged (all mokoN firmwares, and all FC firmwares up to |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
125 Magnetite) and tries to enable AEC, the result will be a poor AEC |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
126 configuration: the old echo level and long vs short settings do nothing on |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
127 the new DSP, whereas the new tunable parameters will remain at their defaults |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
128 with no way to tweak them. I (Mother Mychaela) can only guess that this |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
129 situation is what Openmoko must have run into when they tried to get AEC |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
130 working. |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
131 |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
132 2) When someone downstream of TI figures out that L1_NEW_AEC needs to be changed |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
133 from 0 to 1 and actually makes that change, like we did in our Tourmaline fw, |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
134 the format and size of the audio mode binary structure change, and all old |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
135 audio mode config files become invalid. |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
136 |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
137 Our FreeCalypso work is affected by point 2 above: we started working with audio |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
138 mode config files in 2017, using the old AEC configuration, and only made the |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
139 switch to L1_NEW_AEC in 2021. We now have two kinds of audio mode config binary |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
140 files: the old kind that are 164 bytes long, and the new kind that are 176 bytes |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
141 long. Our Tourmaline firmware has L1_NEW_AEC enabled, while Magnetite (our |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
142 legacy backward compatiblity fw) has it disabled. |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
143 |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
144 To prevent loading of garbage into AEC config when an audio mode file of the |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
145 wrong kind is loaded, we have implemented the following workaround in both |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
146 Tourmaline and Magnetite: if the loaded mode config file has the wrong length, |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
147 the AEC config is set to the default disabled state instead of whatever is in |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
148 the mode file - loading an AEC config of the wrong format is not possible. |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
149 |
245
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
150 Default audio configuration |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
151 =========================== |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
152 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
153 The default audio config set in the Iota ABB registers and in the DSP when no |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
154 named audio mode config has been loaded with the audio_mode_load() API call |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
155 (accessible via AT@AUL or via fc-tmsh aul command) is as follows, in the syntax |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
156 which our tiaud-compile utility accepts as input and which our tiaud-decomp |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
157 utility emits as output: |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
158 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
159 voice-path 0 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
160 mic default { |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
161 gain 3 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
162 output-bias 0 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
163 fir 0 0x4000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
164 fir 8 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
165 fir 16 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
166 fir 24 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
167 } |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
168 speaker ear+aux { |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
169 gain 0 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
170 audio-filter 0 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
171 fir 0 0x4000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
172 fir 8 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
173 fir 16 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
174 fir 24 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
175 } |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
176 sidetone -5 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
177 aec 0 0 0 0 0 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
178 |
838
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
179 The above version is the one produced by Magnetite and earlier firmwares without |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
180 L1_NEW_AEC; in the new Tourmaline version the last line changes to: |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
181 |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
182 aec-new 0 0 0x1 0x7FFF 0x1FFF 0x4000 0x32 0x1000 0x1000 0 0 0 |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
183 |
245
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
184 The meaning is as follows: |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
185 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
186 * voice-path is the DSP digital voice path setting, 0 means the standard |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
187 configuration with the voice channel going between GSM and the local analog |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
188 voice hardware attached to the ABB. |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
189 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
190 * The default microphone input is used for the voice uplink (MICIN&MICIP pins), |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
191 whereas the voice downlink is presented on both EARN&EARP and AUXON&AUXOP |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
192 pins, i.e., both "ear" and "aux" VDL amplifiers are enabled. |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
193 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
194 * The microphone gain is 3 dB, the fine gain adjustment in the voice downlink |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
195 path is 0 dB, and the sidetone gain is -5 dB. |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
196 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
197 * output-bias 0 under mic means that the MICBIAS voltage is set to 2.0 V. |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
198 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
199 * audio-filter 0 under speaker means that the VFBYP bit in the VBCTRL1 register |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
200 is NOT set, i.e., the normal configuration. |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
201 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
202 * DSP FIR filters do nothing, as coefficient 0 is set to unity and all other |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
203 coefficients are set to zero. |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
204 |
838
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
205 * The AEC mechanism in the DSP is disabled, although the format of the bits that |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
206 say so is different between old and new AEC versions. In the new version |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
207 there are a number of tunable settings that only kick in when AEC is enabled; |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
208 when AEC is disabled by default, these tunable knobs still have sensible |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
209 defaults that aren't all zeros. |
245
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
210 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
211 Creating your own audio mode configurations |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
212 =========================================== |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
213 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
214 The input to our tiaud-compile utility can contain every setting shown in the |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
215 default case above, or any desired subset thereof. For any settings not given |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
216 in the input, the defaults from the above will be used, except that |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
217 tiaud-compile's current default for the speaker mode is just ear rather than |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
218 ear+aux. (It is a default which you should NOT depend on; set it explicitly if |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
219 it matters!) A few notes: |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
220 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
221 * For all settings given as numbers, the number given in the ASCII input is the |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
222 number that goes into TI's binary structure, without any transformation, even |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
223 in those cases where the result is counter-intuitive, such as "audio-filter 0" |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
224 meaning that the filter is *enabled*. |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
225 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
226 * The 3 possible mode keywords for the mic mode are default, aux and headset, |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
227 corresponding to MICIN&MICIP, AUXI and HSMICP analog inputs, respectively. |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
228 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
229 * The 5 possible mode keywords for the speaker mode are ear, aux, headset, |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
230 buzzer and ear+aux. The buzzer speaker mode exists only on TI's Nausica ABB |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
231 predating Iota, i.e., it won't work on any of the Calypso+Iota+Rita devices |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
232 built or supported by FreeCalypso, but our tiaud-compile and tiaud-decomp |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
233 utilities support it because it is nominally supported by TI's RiViera Audio |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
234 Service and its binary data structure for audio mode configuration. |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
235 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
236 * When mic is set to aux, an additional mic setting called extra-gain becomes |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
237 available. If extra-gain is set to 0, the AUXI gain will be set to 28.2 dB, |
247
b5b148ef63da
doc/Audio-mode-config: fixed logic error in the description of extra-gain
Mychaela Falconia <falcon@freecalypso.org>
parents:
245
diff
changeset
|
238 if extra-gain is set to 1, the AUXI gain will be set to 4.6 dB; all other |
245
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
239 values will be considered invalid by the firmware. |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
240 |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
241 * Each of the two FIR filters in the DSP (one for uplink, one for downlink) has |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
242 a total of 31 coefficients, numbered 0 through 30, inclusive. In the ASCII |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
243 input to tiaud-compile you can put each coefficient on its own fir line, put |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
244 all 31 coefficients on the same line, or group them in any other way you like. |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
245 The grouping used in the tiaud-decomp output has been chosen for line length |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
246 reasons. |
796c659b747c
doc/Audio-mode-config written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
247 |
838
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
248 aec vs aec-new in tiaud-compile input |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
249 ===================================== |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
250 |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
251 tiaud-compile accepts both aec (old) and aec-new settings; aec must be followed |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
252 by 5 numbers, aec-new must be followed by 12 numbers. Each number is a 16-bit |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
253 value, and they go into the binary structure without further interpretation by |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
254 tiaud-compile - instead the firmware is the entity that gives them meaning. |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
255 Numbers without 0x prefix are interpreted as decimal. |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
256 |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
257 tiaud-compile will generate one type or the other of the binary output file, |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
258 following these rules: |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
259 |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
260 * If an aec setting is given, a 164 byte file will be produced, with the 5 AEC |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
261 words being the given ones. |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
262 |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
263 * If an aec-new setting is given, a 176 byte file will be produced, with the 12 |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
264 AEC words being the given ones. |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
265 |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
266 * If neither setting is given, a 164 byte file will be produced, with the 5 AEC |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
267 words of the old type being all zeros. Thanks to the modified audio mode |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
268 loading code in our firmwares, these 164 byte mode files can still be used |
02d92d49c9f8
doc/Audio-mode-config: update for old vs new AEC
Mychaela Falconia <falcon@freecalypso.org>
parents:
261
diff
changeset
|
269 with current Tourmaline fw, with AEC set to its default disabled state. |
843
6a0fcbca8ac7
document fc-tmsync aur & aur-all addition
Mychaela Falconia <falcon@freecalypso.org>
parents:
838
diff
changeset
|
270 |
847
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
271 New AEC parameter words |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
272 ======================= |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
273 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
274 The 12 words that configure AEC of the L1_NEW_AEC flavor (appearing on the |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
275 aec-new line in tiaud-compile input or in an fc-tmsh auw 12 command) map as |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
276 follows: |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
277 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
278 Word 0: aec_enable |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
279 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
280 This word must be set to 0 to disable AEC or 2 to enable it. This word is |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
281 translated to a single DSP control bit by the Audio Service layer, thus no |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
282 other values must be written into it. |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
283 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
284 Word 1: continuous_filtering |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
285 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
286 This word is written directly into the DSP, and we have no documentation for it |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
287 beyond "enable (1) or disable (0) continuous mode filtering". |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
288 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
289 Word 2: granularity_attenuation |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
290 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
291 This word is written directly into the DSP, and we have no documentation for it |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
292 beyond "granularity of the smoothed attenuation". |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
293 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
294 Word 3: smoothing_coefficient |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
295 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
296 This word is written directly into the DSP, and we have no documentation for it |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
297 beyond "smoothing coefficient". |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
298 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
299 Word 4: max_echo_suppression_level |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
300 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
301 This word is written directly into the DSP; it is described as "maximum |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
302 attenuation level", and the following constants are defined for it: |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
303 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
304 #define AUDIO_MAX_ECHO_0dB (0x7FFF) |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
305 #define AUDIO_MAX_ECHO_2dB (0x65AA) |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
306 #define AUDIO_MAX_ECHO_3dB (0x59AD) |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
307 #define AUDIO_MAX_ECHO_6dB (0x4000) |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
308 #define AUDIO_MAX_ECHO_12dB (0x1FFF) |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
309 #define AUDIO_MAX_ECHO_18dB (0x0FFF) |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
310 #define AUDIO_MAX_ECHO_24dB (0x07FF) |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
311 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
312 Word 5: vad_factor |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
313 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
314 This word is written directly into the DSP, and we have no documentation for it |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
315 beyond "VAD factor relative to the current estimated energy". VAD must stand |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
316 for "voice activity detector", but our knowledge ends here. |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
317 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
318 Word 6: absolute_threshold |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
319 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
320 This word is written directly into the DSP, and we have no documentation for it |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
321 beyond "VAD absolute offset relative to the current estimated energy". |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
322 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
323 Word 7: factor_asd_filtering |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
324 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
325 This word is written directly into the DSP, and we have no documentation for it |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
326 beyond "modifying factor of d_far_end_noise for filtering decision". |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
327 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
328 Word 8: factor_asd_muting |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
329 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
330 This word is written directly into the DSP, and we have no documentation for it |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
331 beyond "modifying factor of d_far_end_noise for muting decision". |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
332 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
333 Word 9: aec_visibility |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
334 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
335 This word must be set to 0 for normal operation or 0x200 for "AEC visibility" |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
336 debug mode. This word is translated to a single L1 control bit by the Audio |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
337 Service layer, thus no other values must be written into it. |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
338 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
339 Word 10: noise_suppression_enable |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
340 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
341 This word must be set to 0 to disable SPENH algorithm or 4 to enable it. This |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
342 word is translated to a single DSP control bit by the Audio Service layer, thus |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
343 no other values must be written into it. We don't know what this "speech |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
344 enhancement" algorithm does, and whether or not it is the same as "noise |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
345 suppression". |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
346 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
347 Word 11: noise_suppression_level |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
348 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
349 This config word is mapped to just two bits in the actual DSP control word by |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
350 the Audio Service layer, thus there are only 4 possible valid values here: |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
351 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
352 #define AUDIO_NOISE_NO_LIMITATION (0x0000) |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
353 #define AUDIO_NOISE_6dB (0x0020) |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
354 #define AUDIO_NOISE_12dB (0x0040) |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
355 #define AUDIO_NOISE_18dB (0x0060) |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
356 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
357 Some known-good AEC configurations |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
358 ================================== |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
359 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
360 The terse descriptions of parameter words given above unfortunately constitute |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
361 the total extent of our knowledge of the AEC block in our dear Calypso DSP and |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
362 its tuning parameters - we don't know anything more. However, we do have 3 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
363 example configurations to look at: we have the default values of the tuning |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
364 parameters that appear to be initialized by the DSP itself on boot, and we have |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
365 two AEC-enabled configurations set by Pirelli DP-L10 firmware: one for handheld |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
366 and wired headset modes, the other for the hands-free loudspeaker mode. Here |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
367 are the 12 parameter words in the 3 available configurations: |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
368 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
369 Parameter word Default Pirelli Pirelli |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
370 (AEC disabled) handheld hands-free |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
371 -------------------------------------------------------------------------- |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
372 aec_enable 0 (off) 2 (on) 2 (on) |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
373 continuous_filtering 0 (off) 1 (on) 1 (on) |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
374 granularity_attenuation 0x0001 0x0014 0x0014 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
375 smoothing_coefficient 0x7FFF 0x0CCC 0x0CCC |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
376 max_echo_suppression_level 0x1FFF (12 dB) 0x59AD (3 dB) 0x0FFF (18 dB) |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
377 vad_factor 0x4000 0x4000 0x4000 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
378 absolute_threshold 0x0032 0x0032 0x0032 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
379 factor_asd_filtering 0x1000 0x1000 0x1000 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
380 factor_asd_muting 0x1000 0x1000 0x1000 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
381 aec_visibility 0 (off) 0 (off) 0 (off) |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
382 noise_suppression_enable 0 (off) 4 (on) 4 (on) |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
383 noise_suppression_level 0 (none) 0 (none) 0x0060 (18 dB) |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
384 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
385 The following observations can be made: |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
386 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
387 * The 4 parameters vad_factor, absolute_threshold, factor_asd_filtering and |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
388 factor_asd_muting remain unchanged between TI's DSP default and Pirelli's |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
389 production configs. On the basis of this observation, I (Mother Mychaela) |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
390 get the feeling that these four should be left alone. |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
391 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
392 * Besides the obvious steps of enabling AEC and SPENH, Pirelli did change |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
393 continuous_filtering (from off to on), granularity_attenuation and |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
394 smoothing_coefficient. Unfortunately, unless we recover the source code for |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
395 our Calypso DSP ROM or some documents explaining this version of AEC in |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
396 detail, we have no way of understanding what these parameters do, let alone |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
397 evaluating the merits of Pirelli's change. |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
398 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
399 * max_echo_suppression_level and noise_suppression_level seem to be the two |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
400 parameters most amenable to tuning. |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
401 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
402 * It is interesting to note that Pirelli's fw enables AEC not only in the |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
403 loudspeaker mode, but also in the more basic handheld and wired headset |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
404 modes. The two AEC configs differ only in max_echo_suppression_level and |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
405 noise_suppression_level parameters, with the loudspeaker mode AEC config |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
406 being more aggressive. |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
407 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
408 Prior to seeing what Pirelli's fw does, my (Mychaela's) own thinking was that |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
409 AEC is only needed in loudspeaker configurations, not handheld or headset. |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
410 After seeing Pirelli's AEC configs, I reason that enabling a less aggressive |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
411 AEC configuration in those less echo-prone modes probably doesn't hurt - thus |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
412 until and unless we recover more documentation or other knowledge, the plan for |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
413 our own FreeCalypso Libre Dumbphone handset is to do what Pirelli does: use a |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
414 less aggressive AEC config in handheld and headset modes, and a more aggressive |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
415 one in the hands-free loudspeaker mode. |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
416 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
417 On our current FCDEV3B setup with a SparkFun COM-09151 loudspeaker and a CUI |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
418 CMC-9745-130T microphone, applying Pirelli's loudspeaker-mode AEC config |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
419 produces echo cancellation that sounds acceptable to our subjective human |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
420 evaluator on the far end of test calls. |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
421 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
422 FIR filter details |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
423 ================== |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
424 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
425 Calypso DSP has two FIR filters in the voice paths, one in the uplink path and |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
426 one in the downlink path. Aside from their placement, the two FIR filters are |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
427 identical. Each FIR block has 31 taps (making a 30th order filter), and each of |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
428 the 31 coefficients is a 16-bit fixed-point number. The fixed point format is |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
429 F2.14 aka Q14: to get the real coefficient from the physical 16 bits, treat the |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
430 16-bit datum as a two's complement signed integer, then divide by 16384. |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
431 Examples: 0x4000 means 1, 0x2000 means 0.5, 0xC000 means -1, 0xE000 means -0.5. |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
432 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
433 In principle you can set all 31 coefficients to whatever you like, but in |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
434 practice only two possible configurations are used: |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
435 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
436 * When the FIR filter is disabled (identity transform), coefficient 0 is set to |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
437 0x4000 (unity) and all other coefficients are set to 0. In this configuration |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
438 the FIR block does not introduce any extra delay: all delayed samples are |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
439 multiplied by 0 and thus produce no effect. |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
440 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
441 * When some non-identity frequency response transformation is desired, a linear |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
442 phase filter is set up: coefficient #15 becomes the main tap (significantly |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
443 greater in absolute value than all others) and all other coefficients mirror |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
444 around it symmetrically: #0 equals #30, #1 equals #29 and so forth, until #14 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
445 equals #16. This filter adds 1.875 ms of delay (15 sample times) to the voice |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
446 path in which it is active, and an equal amount of "pre-ringing". |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
447 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
448 The presumed purpose of these two FIR filters (uplink and downlink) is to |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
449 flatten the frequency response of the speaker and microphone transducers, or |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
450 perhaps even more ambitiously, the frequency response of the modeled acoustic |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
451 environment. However, actually coming up with a good set of FIR filter |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
452 coefficients given a desired frequency response is a hard problem, one where |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
453 forward engineering is much more difficult than reverse. |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
454 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
455 When it comes to reverse engineering of existing Calypso DSP FIR filters, a |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
456 total of 7 specimen have been captured out in the wild so far: one downlink FIR |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
457 filter from Openmoko's non-functional para0.cfg (no way of knowing which speaker |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
458 it was once designed for), and a set of 6 filters extracted from Pirelli DP-L10, |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
459 3 uplink and 3 downlink, corresponding to the 3 audio routing modes supported on |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
460 this phone model (handheld, hands-free and wired headset). All 7 are linear |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
461 phase filters as described above. Analyzing the frequency response of a given |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
462 already existing FIR filter is easy: just use the fir2freq program in our |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
463 freecalypso-reveng Hg repository. OTOH, coming up with a new set of FIR filter |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
464 coefficients for some desired frequency response (e.g., for a new phone handset |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
465 being designed) is a much harder problem, one which we will probably have to |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
466 outsource to a hired DSP/FIR expert. |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
467 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
468 Calypso FIR support in FC host tools |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
469 ------------------------------------ |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
470 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
471 Uplink and downlink FIR filter coefficients can be included in the input to |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
472 tiaud-compile. Each coefficient is given as the actual 16-bit word going into |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
473 the DSP (Q14 scaling included), and can be specified either in hex or as a |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
474 signed decimal integer. |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
475 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
476 We also have a dedicated ASCII file format for a FIR filter coefficient set by |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
477 itself, like this example: |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
478 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
479 fir-coeff-table |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
480 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
481 0x0178 0x0AB5 0xF43D 0xFED5 0xFCA7 0x04D8 0x00B8 0x0371 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
482 0x032F 0x0007 0x151C 0xF24C 0x19A6 0xE918 0xF7CD 0x7D0C |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
483 0xF7CD 0xE918 0x19A6 0xF24C 0x151C 0x0007 0x032F 0x0371 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
484 0x00B8 0x04D8 0xFCA7 0xFED5 0xF43D 0x0AB5 0x0178 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
485 |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
486 (This example is the FIR filter extracted from Openmoko's non-functional |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
487 para0.cfg.) This by-itself FIR filter coeff set format is accepted as input to |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
488 the auw-fir command in fc-tmsh (allowing experimental FIR filters to be uploaded |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
489 to a running Calypso device for testing) and to our fir2freq analysis program. |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
490 We will probably use the same format if and when we embark on a venture to |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
491 design our own FIR filters for our own handset hardware. |
6e137995c9c8
doc/Audio-mode-config: elaborate on AEC and FIR blocks
Mychaela Falconia <falcon@freecalypso.org>
parents:
843
diff
changeset
|
492 |
843
6a0fcbca8ac7
document fc-tmsync aur & aur-all addition
Mychaela Falconia <falcon@freecalypso.org>
parents:
838
diff
changeset
|
493 fc-tmsync aur and aur-all addition |
6a0fcbca8ac7
document fc-tmsync aur & aur-all addition
Mychaela Falconia <falcon@freecalypso.org>
parents:
838
diff
changeset
|
494 ================================== |
6a0fcbca8ac7
document fc-tmsync aur & aur-all addition
Mychaela Falconia <falcon@freecalypso.org>
parents:
838
diff
changeset
|
495 |
6a0fcbca8ac7
document fc-tmsync aur & aur-all addition
Mychaela Falconia <falcon@freecalypso.org>
parents:
838
diff
changeset
|
496 New addition as of fc-host-tools-r16: our aur command which natively resides in |
6a0fcbca8ac7
document fc-tmsync aur & aur-all addition
Mychaela Falconia <falcon@freecalypso.org>
parents:
838
diff
changeset
|
497 fc-tmsh (audio mode full access read operation via ETM) has also been |
6a0fcbca8ac7
document fc-tmsync aur & aur-all addition
Mychaela Falconia <falcon@freecalypso.org>
parents:
838
diff
changeset
|
498 implemented in fc-tmsync for scripted usage. Furthermore, we also implemented |
6a0fcbca8ac7
document fc-tmsync aur & aur-all addition
Mychaela Falconia <falcon@freecalypso.org>
parents:
838
diff
changeset
|
499 an aur-all command that issues the same sequence of aur operations as the |
6a0fcbca8ac7
document fc-tmsync aur & aur-all addition
Mychaela Falconia <falcon@freecalypso.org>
parents:
838
diff
changeset
|
500 firmware's built-in audio_mode_save() and emits the output on stdout in the same |
6a0fcbca8ac7
document fc-tmsync aur & aur-all addition
Mychaela Falconia <falcon@freecalypso.org>
parents:
838
diff
changeset
|
501 format as tiaud-decomp. The end effect is that fc-tmsync aur-all is a much |
6a0fcbca8ac7
document fc-tmsync aur & aur-all addition
Mychaela Falconia <falcon@freecalypso.org>
parents:
838
diff
changeset
|
502 shorter and more direct way of obtaining exactly the same result as would |
6a0fcbca8ac7
document fc-tmsync aur & aur-all addition
Mychaela Falconia <falcon@freecalypso.org>
parents:
838
diff
changeset
|
503 previously be obtained by saving the current audio mode config with aus, reading |
6a0fcbca8ac7
document fc-tmsync aur & aur-all addition
Mychaela Falconia <falcon@freecalypso.org>
parents:
838
diff
changeset
|
504 out the resulting binary file with fc-fsio and decoding it with tiaud-decomp. |
6a0fcbca8ac7
document fc-tmsync aur & aur-all addition
Mychaela Falconia <falcon@freecalypso.org>
parents:
838
diff
changeset
|
505 |
6a0fcbca8ac7
document fc-tmsync aur & aur-all addition
Mychaela Falconia <falcon@freecalypso.org>
parents:
838
diff
changeset
|
506 The implementation of aur-all and the more elementary aur 12 command in |
6a0fcbca8ac7
document fc-tmsync aur & aur-all addition
Mychaela Falconia <falcon@freecalypso.org>
parents:
838
diff
changeset
|
507 fc-tmsync works only with firmware versions that have L1_NEW_AEC enabled - |
6a0fcbca8ac7
document fc-tmsync aur & aur-all addition
Mychaela Falconia <falcon@freecalypso.org>
parents:
838
diff
changeset
|
508 therefore, these commands work with FC Tourmaline but not Magnetite. |
6a0fcbca8ac7
document fc-tmsync aur & aur-all addition
Mychaela Falconia <falcon@freecalypso.org>
parents:
838
diff
changeset
|
509 |
6a0fcbca8ac7
document fc-tmsync aur & aur-all addition
Mychaela Falconia <falcon@freecalypso.org>
parents:
838
diff
changeset
|
510 Furthermore, our aur command in both fc-tmsh and fc-tmsync and the new fc-tmsync |
6a0fcbca8ac7
document fc-tmsync aur & aur-all addition
Mychaela Falconia <falcon@freecalypso.org>
parents:
838
diff
changeset
|
511 aur-all command also work against Pirelli's firmware - this alien fw implements |
6a0fcbca8ac7
document fc-tmsync aur & aur-all addition
Mychaela Falconia <falcon@freecalypso.org>
parents:
838
diff
changeset
|
512 ETM aur operation exactly the same as standard TCS211, and it has L1_NEW_AEC |
6a0fcbca8ac7
document fc-tmsync aur & aur-all addition
Mychaela Falconia <falcon@freecalypso.org>
parents:
838
diff
changeset
|
513 enabled, such that aur 12 returns the 24 byte long L1_NEW_AEC version of |
6a0fcbca8ac7
document fc-tmsync aur & aur-all addition
Mychaela Falconia <falcon@freecalypso.org>
parents:
838
diff
changeset
|
514 T_AUDIO_AEC_CFG structure. The combination of this functionality in Pirelli's |
6a0fcbca8ac7
document fc-tmsync aur & aur-all addition
Mychaela Falconia <falcon@freecalypso.org>
parents:
838
diff
changeset
|
515 fw and our fc-tmsync addition makes it possible to read out Pirelli's highly |
6a0fcbca8ac7
document fc-tmsync aur & aur-all addition
Mychaela Falconia <falcon@freecalypso.org>
parents:
838
diff
changeset
|
516 tuned audio configurations in a very convenient manner, much more convenient |
6a0fcbca8ac7
document fc-tmsync aur & aur-all addition
Mychaela Falconia <falcon@freecalypso.org>
parents:
838
diff
changeset
|
517 than reading ABB registers with abbr and reading DSP API words with r16. |
848
6c306705f503
doc/Audio-mode-config: add pointer to fc-audio-config repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
847
diff
changeset
|
518 |
6c306705f503
doc/Audio-mode-config: add pointer to fc-audio-config repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
847
diff
changeset
|
519 fc-audio-config repository |
6c306705f503
doc/Audio-mode-config: add pointer to fc-audio-config repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
847
diff
changeset
|
520 ========================== |
6c306705f503
doc/Audio-mode-config: add pointer to fc-audio-config repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
847
diff
changeset
|
521 |
6c306705f503
doc/Audio-mode-config: add pointer to fc-audio-config repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
847
diff
changeset
|
522 We have a separate repository for FC audio mode configurations, both complete |
6c306705f503
doc/Audio-mode-config: add pointer to fc-audio-config repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
847
diff
changeset
|
523 configs and individual config pieces (AEC and FIR): |
6c306705f503
doc/Audio-mode-config: add pointer to fc-audio-config repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
847
diff
changeset
|
524 |
6c306705f503
doc/Audio-mode-config: add pointer to fc-audio-config repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
847
diff
changeset
|
525 https://www.freecalypso.org/hg/fc-audio-config/ |
6c306705f503
doc/Audio-mode-config: add pointer to fc-audio-config repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
847
diff
changeset
|
526 |
6c306705f503
doc/Audio-mode-config: add pointer to fc-audio-config repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
847
diff
changeset
|
527 These audio configuration bits are maintained in their own repository because |
6c306705f503
doc/Audio-mode-config: add pointer to fc-audio-config repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
847
diff
changeset
|
528 they are separate from the present FC host tools package and also separate from |
6c306705f503
doc/Audio-mode-config: add pointer to fc-audio-config repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
847
diff
changeset
|
529 our firmwares, evolving independently without strict synchronization with these |
6c306705f503
doc/Audio-mode-config: add pointer to fc-audio-config repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
847
diff
changeset
|
530 other components. |