changeset 378:82fb5a70c9fd

compal/audio: results of simple experiments
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 09 Oct 2021 23:20:00 +0000
parents 34490934ff02
children a760a5eeed65
files compal/audio/tfc139-headset-entry compal/audio/volume-ctrl
diffstat 2 files changed, 69 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compal/audio/tfc139-headset-entry	Sat Oct 09 23:20:00 2021 +0000
@@ -0,0 +1,49 @@
+The following results have been obtained by connecting to a C139 phone via the
+headset jack, switching to "Trace On" via the **16379# hidden menu, breaking in
+with tfc139, then running the new tfc139-audio-dump command in fc-loadtool:
+
+d_aec_ctrl: 0x03C7
+New AEC params: 0x0001 0x0014 0x4CCC 0x59AD 0x7500 0x0000 0x1000 0x1000
+
+Uplink FIR coefficients:
+
+0x4000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
+0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
+0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
+0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
+
+Downlink FIR coefficients:
+
+0x7FFF 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
+0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
+0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
+0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
+
+VBCTRL1: 0x004
+VBCTRL2: 0x007
+VBPOP:   0x004
+VBUCTRL: 0x1B2
+VBDCTRL: 0x069
+
+Commentary: the values read out of VBCTRL1 and VBCTRL2 registers are consistent
+with the headset audio channel being selected for both input and output, leading
+to the suspicion that the firmware probably switched the audio path to headset
+mode even though the **16379# hidden menu selection was set to "Trace On".  The
+Mother's primary interest here is to see the official C139 fw settings for the
+handheld audio mode (built-in earpiece and mic) rather than the headset mode,
+but it now appears that such capture won't be possible except maybe by
+connecting to the production test pads inside the battery compartment,
+bypassing the headset jack.
+
+Looking at what appears to be C139 headset mode audio config, we see that
+HSMICBIAS voltage is set to 2.0 V, the uplink gain is set to 8 dB, and the
+sidetone level is set to -23 dB: we get this info from the MICBIAS bit in
+VBCTRL1 and the VBUCTRL setting.  Decoding VBDCTRL, we see that the volume
+control is set to -6 dB and the PGA gain is set to 3 dB.  However, these
+VBDCTRL settings don't tell us much: see the volume-ctrl article.
+
+Also note the FIR coefficient oddity: no frequency curve-transforming FIR
+filters are being set up, neither UL nor DL, but DL FIR coefficient 0 is set to
+0x7FFF instead of 0x4000.  This oddity means that Calypso DL FIR block is
+producing a 6 dB gain (doubling of the samples) purely on the digital side,
+before DL audio passes to the ABB - certainly a noteworthy hack.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compal/audio/volume-ctrl	Sat Oct 09 23:20:00 2021 +0000
@@ -0,0 +1,20 @@
+It appears that the only way to bring up audio volume control (as opposed to
+ringer volume) on a C139 phone running Mot official fw is to be in active call,
+implying the need for a valid SIM, a GSM network, working service with that
+SIM+network combination and a party one can test-call.  When you do get into
+the necessary active call state, navigation left and right buttons bring up the
+audio volume control screen and move this volume up or down.  However, instead
+of seeing just 5 possible volume levels as would be available if Iota ABB
+downlink volume controls were used in TI's simple way, we see 8 possible volume
+levels being offered by Motorola's fw, numbered from 0 through 7.  Level 0 is
+not mute - downlink audio is still present in the earpiece speaker, albeit
+quiet.
+
+It appears that Compal did something similar to Foxconn/Pirelli, probably
+manipulating both volume and PGA gain settings in Iota VBDCTRL in order to
+offer more than 5 possible volume levels to the user.  However, because Compal
+firmwares don't have ETM and their oabbr TM3 command is broken (returns
+garbage), we don't have a way to just read out the register settings for each
+volume level.  Furthermore, because the audio volume setting is so difficult to
+get to (requiring not only a SIM, but also network registration and a call),
+doing a tfc139 break-in for each possible volume level would be too much work.