annotate Calypso-digital-voice @ 105:72a272083f46 default tip

Linux-DTR-RTS-flaw: link to new fc-linux-patch repository
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 11 Dec 2023 19:02:01 +0000
parents 9baf6215285b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 Digital voice on FreeCalypso modems via MCSI
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 ============================================
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 The Calypso chip provides a little-used auxiliary synchronous serial interface
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 called MCSI. It is an auxiliary interface to the DSP part of the Calypso
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 (controlled solely by the DSP and not directly accessible to the ARM part); it
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 is not clear what other uses TI may have had in mind for this interface, but
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 one advertised feature of TI's TCS211 chipset+firmware solution is Bluetooth
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 support in the form of using MCSI as a digital voice channel to be connected to
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 TI's Bluetooth Island chip. In FreeCalypso we are not interested in Bluetooth
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 per se, but we are interested in getting a digital voice channel out of our
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 modem for GSM voice calls in order to compete with the mainstream proprietary
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 GSM modem modules which do provide such digital voice channels.
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 Our current development board (FCDEV3B) has MCSI brought out on a header for
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 experimentation, and as of 2019-03 we finally got this MCSI working as a proper
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 digital voice interface.
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 Hardware interface
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 ==================
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 MCSI consists of 4 hardware signals:
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 * MCSI_CLK is the bit clock output from the Calypso; in pure hardware terms
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 this signal is bidirectional, but unless you are going to develop your own
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 DSP code patches, its direction is determined by the DSP ROM code, which
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 configures MCSI_CLK as an output, i.e., the Calypso acts as the clock master.
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 * MCSI_FSYNCH is the frame sync output from the Calypso; it is the same deal as
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 with MCSI_CLK: bidirectional in pure hardware terms, but if you are not
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 changing the DSP code with your own custom patches, it is an output from the
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 Calypso.
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 * MCSI_RXD is the voice uplink bits input to the Calypso: the user's application
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 processor needs to feed voice uplink bits to this pin as timed by MCSI_CLK
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 and MCSI_FSYNCH.
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 * MCSI_TXD is the voice downlink output from the Calypso: as the vocoder in the
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 Calypso DSP decodes received downlink speech from GSM codecs into linear PCM,
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 this PCM voice downlink is put out on this MCSI_TXD pin, in synchrony with
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 MCSI_CLK and MCSI_FSYNCH.
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 The format in which digital voice samples are exchanged via MCSI between the
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 Calypso and the user's application processor is 16-bit linear PCM, 8000 samples
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 per second, thus requiring 128 kbps of bandwidth. The synchronous serial
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 interface details are as follows:
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 * When MCSI is enabled, the Calypso puts out a 520 kHz clock on MCSI_CLK,
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 produced by dividing the 13 MHz master clock by 25. This clock as put out by
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 the Calypso has a perfect 50% duty cycle.
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 * Given that a new pair of samples (uplink and downlink) needs to be transferred
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 once every 125 us (1/8000th of a second, for 8000 samples per second), this
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 520 kHz bit clock is further divided by 65 to produce an 8 kHz clock on
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 MCSI_FSYNCH, i.e., every 65 bits there is a frame synchronization pulse on
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 MCSI_FSYNCH. The width of this frame sync pulse is one full bit time, the
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 pulse is active high, and the MCSI_FSYNCH line stays low the rest of the time.
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 * Calypso outputs MCSI_FSYNCH and MCSI_TXD are updated on the rising edge of
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 MCSI_CLK and should be sampled on the falling edge of the same clock by the
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 user's application processor. The MCSI_RXD input is sampled on the falling
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 edge of MCSI_CLK by the Calypso, and should be updated on the rising edge of
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 the same clock by the user's application processor.
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 * Each voice sample (both uplink and downlink) is transferred from the most
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 significant bit to the least significant bit (MSB first), starting with the
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 clock cycle immediately following the frame sync cycle, i.e., the cycle in
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 which MCSI_FSYNCH is asserted by the Calypso.
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 * Given that each frame is 65 bits long (520 kHz bit clock divided by 8 kHz
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 frame rate) and that 16 bit slots out of every frame are used to transfer
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 voice sample bits, plus one bit slot for frame sync, it follows that 48 bit
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 slots out of every frame are dummies. The Calypso puts out 0 bits on MCSI_TXD
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 in all bit slots that don't carry voice sample bits.
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 A graphical depiction of what I just described verbally can be found on page
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 3074 of this TI OMAP document:
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 ftp://ftp.freecalypso.org/pub/ARM/OMAP/sprugn4r.pdf
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 Calypso MCSI corresponds to what this OMAP document calls "Mode 1", i.e.,
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 Figure 21-14 at the top of the page, NOT the other one below it.
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 Enabling and disabling MCSI for digital voice
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 =============================================
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 TI's DSP ROM code supports two modes of operation in which MCSI is activated,
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 called "Bluetooth cordless" and "Bluetooth headset". In the "BT cordless" mode
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 the voice path is connected between the chipset's native analog voice hw and
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 MCSI, with GSM out of the picture; in the "BT headset" mode the voice path is
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 connected between the GSM vocoder and MCSI, with the local analog voice hw out
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 of the picture. The latter "BT headset" mode is the only one which we currently
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 support in FreeCalypso; the "BT cordless" mode does not work properly as of this
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 writing - the step of enabling the Voice Band Codec block in the Iota ABB for
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 this mode is currently missing. Proper support for the "BT cordless" mode can
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 be added if a real need for it ever arises, but it would take some work, and
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97 right now there is no business case for it.
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 In TI's TCS211 firmware architecture (see TCS211-fw-arch document) entry into
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 and exit from these "Bluetooth" MCSI voice routing modes is handled via the
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 RiViera Audio Service fw component, specifically its Audio Mode facility,
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 usually via the audio_full_access_write() API call. When asked to switch voice
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 routing modes, this RV Audio Service component sends an MMI_AUDIO_MODE_REQ
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 message to L1, the L1A component passes the request to L1S, and L1S finally
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 twiddles the magic control bits in the DSP API RAM.
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 In FreeCalypso we currently provide two ways for the end user to enter the
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 "BT headset" mode for digital access to GSM voice:
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 * The original way is the AT@VPATH=n command, which provides "raw" access to
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 the RV Audio Service's voice routing mode switch call. Setting AT@VPATH=2
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112 enters the "BT headset" mode, AT@VPATH=0 returns to the normal "GSM only"
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113 mode (MCSI disabled), and AT@VPATH=1 enters the currently not-working
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114 "BT cordless" mode.
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 * The new way is the session-long AT@VSEL=n boolean setting. In the default
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 AT@VSEL=0 mode the firmware functions like before (MCSI disabled, voice calls
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118 go to the analog voice hw), but if your application needs the digital voice
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119 interface instead of analog, you can set AT@VSEL=1 once at the beginning of
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120 your modem session. In this AT@VSEL=1 mode, whenever a GSM voice call is
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121 connected (dialed or answered), the MCSI clocks are switched on (MCSI_CLK and
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122 MCSI_FSYNCH outputs come to life) and the "BT headset" voice routing mode is
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 entered at the appropriate point in the call establishment process; when the
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124 call disconnects (either side hangs up), MCSI is turned off. The new logic
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 internally performs the equivalent of AT@VPATH=2 and AT@VPATH=0 at appropriate
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 times.
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128 Why does one need our new AT@VSEL=1 logic for dynamic switching into and out of
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129 MCSI "BT headset" mode, why not simply set AT@VPATH=2 upfront and run with it?
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130 Two reasons:
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132 1) If MCSI is enabled continuously and not just when needed during voice calls,
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133 the DSP never goes quiescent during idle periods, and the Calypso is not
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134 allowed to enter deep sleep. Both of these factors are detrimental to proper
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135 power management - the whole idea is that when a GSM modem is idle (not in a
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136 call, but listening to paging and ready to accept incoming calls), most of
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137 the hw needs to be powered down as much as possible, to reduce power
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138 consumption to a minimum and prolong standby battery life.
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140 2) There is a bug in the DSP code (present in the ROM and not corrected by the
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 patches we are using) that manifests if MCSI is already running when the very
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142 first voice call after system boot is connected. Our AT@VSEL=1 mechanism
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 reliably avoids this DSP bug (ensured by the timing sequence of when we turn
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144 on the vocoder and when we turn on MCSI), and it is my (Mother Mychaela's)
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 guess that TI probably missed this DSP bug because their own Bluetooth
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 handling code most likely worked very similarly to my AT@VSEL=1
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147 implementation.
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149 Thus the short story is that if you are using the digital voice interface via
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150 MCSI, just set AT@VSEL=1 at the beginning of your modem session, and whatever
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 hardware you connect to MCSI needs to be OK with the clocks (MCSI_CLK and
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152 MCSI_FSYNCH) appearing only during active voice calls, and being off at other
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 times.
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 It should also be noted that the new AT@VSEL=1 mechanism is implemented properly
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156 only in our new hybrid firmwares, i.e., Magnetite hybrid and Selenite. The
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157 legacy configs (l1reconst etc) using the blob version of G23M PS and ACI from
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158 Openmoko (maintained only for regression testing and debugging purposes) also
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159 implement the AT@VSEL command, but the AT@VSEL=1 mode will work somewhat
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160 erratically in that version: the modem may enable MCSI at the wrong time, and
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161 it will sometimes fail to turn it off at the end of a call. The implementation
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162 of this functionality resides entirely in the "high-level audio driver" module
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163 in ACI, this module is different between TCS2 and TCS3 versions of ACI, and
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164 there is no justification for expending the effort to make the new feature work
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165 in the old version of ACI: it is an entirely new feature added in FreeCalypso,
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166 not present in any old Calypso modems, hybrid fw is the way forward in FC, thus
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167 we only need to support new features in our hybrid firmwares.
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169 The alternative approach of tapping VSP
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170 =======================================
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172 MCSI is not the only digital voice interface in the Calypso chipset: there is
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173 also another interface called VSP (Voice Serial Port), which is a private
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174 interface between Calypso and Iota chips. Because it was always intended to be
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 a private interface internal to the core chipset, not an external application
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176 interface like MCSI, none of the standard Calypso-based phone or modem board
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177 designs expose it in any accessible way - instead it goes from one BGA to the
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178 other on inner PCB layers with zero accessibility for probing. Our FCDEV3B is
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179 no exception in this regard, as our modem core is based on a commercial modem
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180 design from a decade before our time.
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182 Because it took us a very long time to get MCSI working as a practically usable
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183 digital voice interface (the new AT@VSEL=1 mechanism is the key, without this
12
9baf6215285b Calypso-digital-voice: typo fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 10
diff changeset
184 firmware piece MCSI is not practically usable), much thought has been given
10
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185 earlier to the alternative idea of tapping into VSP. There are two
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186 possibilities with that one:
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
188 1) Given that Calypso VSP is a clock slave (it expects the ABB chip to provide
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
189 the clock and frame sync signals), those who desire their digital voice i/f
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
190 to be a PCM slave (not a PCM master like TI's "BT headset" function over
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
191 MCSI) will likely be very tempted to disconnect Calypso VSP from the Iota
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
192 chip entirely and to connect it to their own application instead. However,
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
193 in the absence of source code for the DSP ROM this approach would be
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
194 incredibly risky (if the DSP is not too happy with the non-Calypso-sourced
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
195 timing you feed to the VSP, how are you going to debug it deep within the
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
196 DSP black box?), and I (Mother Mychaela) consider it so risky that if anyone
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
197 wants to do it, you will be entirely on your own - don't expect any help
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
198 from me.
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
199
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
200 2) A much safer approach would be to keep the VSP clock and frame sync
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
201 connections between Calypso and Iota chips, but also make them available
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
202 externally, i.e., have your application logic sync itself to these clocks.
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
203 Voice downlink could then be received just by passively tapping VSP lines,
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
204 and sending your own voice uplink via VSP would require cutting only the one
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
205 line that carries voice uplink bits from Iota to Calypso. It would then
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
206 effectively be just like MCSI (a PCM master to the user's application), but
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
207 without requiring any support in the firmware, instead being completely
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
208 invisible to the Calypso firmware and to the DSP.
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
209
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
210 However, because we don't have any board on which VSP signals are accessible to
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
211 probing, there are several unknowns with this interface:
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
212
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
213 * Is the VSP clock produced by the Iota chip 500 kHz (13 MHz master clock
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
214 divided by 26) or 520 kHz (same master clock divided by 25)? The available
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
215 Iota datasheet says 500 kHz, but if that is correct, how is the frame sync
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
216 handled? 500 kHz does not divide evenly by 8 kHz. Does Iota's clock + frame
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
217 sync output alternate between 62-bit and 63-bit frames, producing an 8 kHz
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
218 frame rate on average? Sounds messy and convoluted...
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
219
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
220 * It is not clear at all exactly when Iota's VSP clocks are started and stopped,
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
221 and whether the bit clock runs continuously during an active call (like
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
222 MCSI_CLK does), or if it is gated on only for those bit slots that carry
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
223 actual voice sample bits.
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
224
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
225 If we are going to produce a new FreeCalypso modem based on our current FCDEV3B,
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
226 but repackaged into some end use form factor, as things stand today (2019-03),
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
227 we are going to use MCSI rather than VSP for the digital voice interface. While
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
228 MCSI has definitely been a huge hassle and requires the user to issue one extra
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
229 setup command (AT@VSEL=1) at the beginning of each modem session, at least it
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
230 is now a known beast, and a known-working one. Committing to VSP in a
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
231 commercial product design without ever having seen these VSP signals on an
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
232 oscilloscope would be very irresponsible; if someone really wishes to go with
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
233 VSP instead of MCSI, the responsible approach would be to first design and build
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
234 another development board with VSP signals brought out for experimentation, and
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
235 only then possibly use it in a commercial product design after it becomes a
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
236 known beast.
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
237
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
238 From the standpoint of pure curiosity, I would be very interested in a
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
239 development board with VSP access, just to answer the above questions and fill
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
240 that gap in my Calypso knowledge. But switching to a more practical hat,
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
241 spending some 10 to 15 kUSD just to satisfy that curiosity would be very
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
242 difficult to justify - thus there is a very strong chance that VSP will never
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
243 be explored, Which is not really a problem at all, as for a practically usable
17003ecbb9fc Calypso-digital-voice article written,
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
244 external digital voice channel we now have working MCSI.