FreeCalypso > hg > freecalypso-reveng
comparison compal/audio/omr-via-headset @ 380:a66cb88c5f77
compal/audio/omr-via-headset: result of experiment
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 10 Oct 2021 21:48:24 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
379:a760a5eeed65 | 380:a66cb88c5f77 |
---|---|
1 Follow-up on the experiments described in the omr-guide article: I connected | |
2 the headset jack serial cable to a C139 phone that has a SIM inserted, and | |
3 booted it up with a real GSM network connection. And then I made a test call. | |
4 There is a headset icon displayed on the home screen, and no sounds emanate | |
5 from the built-in earpiece speaker, so it is definitely in headset mode. | |
6 | |
7 However, by getting into the active call state, I was able to access the volume | |
8 control screen, and I got an omr reading of d_vbdctrl DSP API word at each | |
9 volume level. Here they are: | |
10 | |
11 Level d_vbdctrl VBDCTRL Vol gain PGA gain Total | |
12 ------------------------------------------------------------------------------ | |
13 0 0x018C 0x006 -12 dB 0 dB -12 dB | |
14 1 0x020C 0x008 -12 dB 2 dB -10 dB | |
15 2 0x028C 0x00A -12 dB 4 dB -8 dB | |
16 3 0x030C 0x00C -12 dB 6 dB -6 dB | |
17 4 0x1A4C 0x069 -6 dB 3 dB -3 dB | |
18 5 0x1ACC 0x06B -6 dB 5 dB -1 dB | |
19 6 0x09CC 0x027 0 dB 1 dB 1 dB | |
20 7 0x0A8C 0x02A 0 dB 4 dB 4 dB | |
21 | |
22 Additional observation: the volume levels listed above exist only in the active | |
23 call state: when a call ends, the fw switches to fixed level 4 for keybeeps and | |
24 whatnot. When a new call begins, the fw restores the last set in-call volume | |
25 level. | |
26 | |
27 Further observation: DL FIR coefficients stay the same at all 8 volume levels: | |
28 0x7FFF in coefficient 0, zeros in all others. Thus Compal's hack of adding | |
29 another 6 dB of gain via the FIR block is unaffected by volume control, and no | |
30 frequency curve transformation is ever applied, at least in headset mode. | |
31 | |
32 Regarding AEC: the reading of 0x03C7 from d_aec_ctrl when breaking in with | |
33 tfc139 definitely seemed suspicious. Reading the same word via omr, we get | |
34 0x0226 while in an active call and 0x03A7 after the call ends. Furthermore, we | |
35 can catch a little bit of trace output related to headset insertion if we have | |
36 rvinterf running and do the **16379# trace enable step before inserting the | |
37 serial cable into the headset jack, and we see this trace message: | |
38 | |
39 L1: AEC_R <fn> 03a6 0001 0014 4ccc 59ad 7500 0000 1000 1000 | |
40 | |
41 Thus it looks like C139 headset mode AEC configuration is: | |
42 | |
43 * AEC enabled (bit 1 in d_aec_ctrl) | |
44 * noise suppression enabled (bit 2 in d_aec_ctrl) | |
45 * NS level bits (d_aec_ctrl[6:5]) are set to 0x20 | |
46 * New AEC parameter words are 0001 0014 4ccc 59ad 7500 0000 1000 1000 | |
47 | |
48 VBC registers during active call: | |
49 | |
50 Register DSP API word 10-bit register value | |
51 ----------------------------------------------------- | |
52 VBCTRL1 0x0110 0x004 | |
53 VBCTRL2 0x01D6 0x007 | |
54 VBUCTRL 0x6CCE 0x1B3 | |
55 | |
56 Notice VBUCTRL diff: we read 0x1B3 (9 dB uplink gain) when we are in an active | |
57 call, but 0x1B2 (8 dB uplink gain) otherwise. |