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