FreeCalypso > hg > freecalypso-docs
changeset 47:f0419ac0a815
FC-handset-spec: ringtone generation documented
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 11 Jun 2021 00:13:39 +0000 |
parents | 1fec0a3f09cc |
children | cb8d43a5023c |
files | FC-handset-spec |
diffstat | 1 files changed, 103 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/FC-handset-spec Thu Jun 10 21:43:50 2021 +0000 +++ b/FC-handset-spec Fri Jun 11 00:13:39 2021 +0000 @@ -537,3 +537,106 @@ can also be plugged into other FreeCalypso devices in which the jack is wired to the main Iota audio channel, with Iota EARP & EARN driving Tip and Ring2 on the TRRS headset jack. + +1.8. Ringtone generation + +In terms of the physical sound-emitting element, there are two principal ways +in which cellphone ringing sounds can be produced: + +1) The oldest and most classic way is to use a magnetic buzzer controlled by + Calypso BU/PWT digital output. The buzzer is driven with raw battery voltage + being switched with a "digital transistor" (BJT with bias resistors), and the + control input going to the base of the BJT is Calypso BU/PWT output. This + method is standard in older phones that don't have hands-free loudspeakers: + since there is no loudspeaker for that other purpose, some loud noise-making + element needs to be implemented just for ringing, and old-style buzzers are + the traditional choice. Motorola C1xx lower subfamilies (C11x/12x and + C139/140) use such buzzers for ringing. + +2) In phones that feature a loudspeaker for hands-free operation, the same + loudspeaker is also used for ringtone sounding, and the buzzer is eliminated. + Apparently hands-free loudspeakers weren't popular in the Calypso era, thus + Pirelli DP-L10 is the only known Calypso phone that features one. There is + also a more bizarre possibility: some phones have replaced the ringing buzzer + with a loudspeaker, but that speaker is used *only* for playing ringtone + melodies - no hands-free call feature is offered. This situation exists on + Motorola C155/156 phones. + +Furthermore, if the physical sound-emitting element is a loudspeaker and not an +old-fashioned buzzer, and if the chipset is Calypso, as opposed to various newer +chipsets, then a further distinction arises: + +2a) Most historical commercial phones that are based on Calypso and use a + loudspeaker for ringtone sounding, also contain a special ringtone generator + chip that drives this speaker when a ringtone is played - in other words, + their loudspeaker ringtones do NOT go through the same voice audio path that + is used for hands-free calls, if the latter feature is offered at all. The + speciai ringtone generator chip is typically a combined MIDI player and + loudspeaker driver. + +2b) The much less popular approach is to not implement any extra hardware at all + that is specifically for ringtone generation, use only the same loudspeaker + audio path hardware that is already needed for hands-free calls (a simple + loudspeaker amplifier), generate ringtone melodies in the Calypso DSP + (Melody E1 or E2), and play them through the regular voice audio path, + routed to the loudspeaker. + +Approach 2b is the least popular one among historical commercial Calypso phones, +but it is the one which I (Mother Mychaela) have selected for our FC Libre +Dumbphone handset. But let us nonetheless examine the pros and cons of +different approaches, and see why I have settled on option 2b. + +Buzzer melodies (option 1) are monophonic (the signal carrying the melody to +the buzzer is a digital square wave, and there is no way to create multiple +overlapping notes in such a signal), but a decent range of tone frequencies is +available: the magnetic buzzer hardware can easily produce frequencies all the +way up to the limit of human hearing, while Calypso PWT produces musical notes +from F4 through E8 in the scientific pitch notation, or 349 to 5274 Hz. In +contrast, any tones produced through the 8000 samples/s voice audio path have +to be below the Nyquist frequency of 4 kHz - according to TI's document, Melody +E1 notes go from E4 (330 Hz) up to G#7 or 3322 Hz. + +In terms of the richness of possible ringtone melodies that can be played, +option 2a (external MIDI player chip that drives the loudspeaker directly, +without going through Calypso+Iota voice audio path) is the absolute best. +These specialized ringtone generator chips implement full MIDI (128 instruments, +47 drums, up to 64 simultaneous notes, according to one datasheet), and the +available ringtone melodies for these MIDI chips are very rich - just take a +Pirelli DP-L10 phone and listen through various ringtone melodies it offers. +All of Pirelli's melodies are stored as *.mid files in their FFS, thus we could +very easily copy them if we were to adopt a MIDI player chip similar to theirs. + +However, the problem for us with adopting option 2a is that this option would +introduce significant extra complexity and adversely affect our already long- +overdue project schedule. There is only one MIDI ringtone player chip for which +we have enough documentation to attempt such a feat: this chip is Winbond +W56964, a slightly more capable sibling of the W56940 used in the Pirelli phone. +However, just because we have what at first glance appears to be reasonably +complete documentation does not mean that it would be a slam dunk! We would +have to build a separate test board for this chip, connect it to a Caramel2 +motherboard (it needs to connect to Calypso MEMIF), and then spend significant +time climbing the learning curve and getting this chip to actually work: getting +it to play melodies, and just as important, getting it into and out of sleep +modes. In other words, a lot of extra work and time spent just for this part, +not advancing any other project needs - whereas option 2b eliminates all of this +extra work. + +Finally, a philosophical argument can be made that FreeCalypso should be all +about simplicity, producing a phone that does its job: implement just what is +needed for a functional phone, and omit unnecessary baggage. An extra hardware +circuit (a chip connected to Calypso memory bus, no less) and associated +software complexity that serves absolutely no other purpose except to produce +ringtones that are "richer" than what the Calypso can produce on its own, and +does not assist in any way with hands-free loudspeaker operation for calls (it +is more of a hindrance in that mode), can be seen as an unwelcome burden similar +to other unwelcome burdens which we are already eliminating, like the camera. + +In contrast, with our chosen option 2b, we have exactly zero extra hardware +that is just for ringing: our loudspeaker and its associated driver circuit +(simple amplifier) is primarily for hands-free calls, and the ability to use +the same audio path to play ringtone melodies comes literally "for free" with +the Melody E1 feature built into our Calypso DSP. We already have a selection +of nice-sounding ringtone melodies in E1 format, lifted from the legendary TSM30 +source, and software complexity is minimal: the melody playing engine has +already been implemented by TI, we only need to call RiViera Audio Service API +functions.