comparison FC-handset-spec @ 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
comparison
equal deleted inserted replaced
46:1fec0a3f09cc 47:f0419ac0a815
535 connected to the Iota headset channel (HSMICBIAS, HSMICP, HSO) and thus the 535 connected to the Iota headset channel (HSMICBIAS, HSMICP, HSO) and thus the
536 headset earpiece driver will be single-ended (HSO and GND), but the same headset 536 headset earpiece driver will be single-ended (HSO and GND), but the same headset
537 can also be plugged into other FreeCalypso devices in which the jack is wired 537 can also be plugged into other FreeCalypso devices in which the jack is wired
538 to the main Iota audio channel, with Iota EARP & EARN driving Tip and Ring2 on 538 to the main Iota audio channel, with Iota EARP & EARN driving Tip and Ring2 on
539 the TRRS headset jack. 539 the TRRS headset jack.
540
541 1.8. Ringtone generation
542
543 In terms of the physical sound-emitting element, there are two principal ways
544 in which cellphone ringing sounds can be produced:
545
546 1) The oldest and most classic way is to use a magnetic buzzer controlled by
547 Calypso BU/PWT digital output. The buzzer is driven with raw battery voltage
548 being switched with a "digital transistor" (BJT with bias resistors), and the
549 control input going to the base of the BJT is Calypso BU/PWT output. This
550 method is standard in older phones that don't have hands-free loudspeakers:
551 since there is no loudspeaker for that other purpose, some loud noise-making
552 element needs to be implemented just for ringing, and old-style buzzers are
553 the traditional choice. Motorola C1xx lower subfamilies (C11x/12x and
554 C139/140) use such buzzers for ringing.
555
556 2) In phones that feature a loudspeaker for hands-free operation, the same
557 loudspeaker is also used for ringtone sounding, and the buzzer is eliminated.
558 Apparently hands-free loudspeakers weren't popular in the Calypso era, thus
559 Pirelli DP-L10 is the only known Calypso phone that features one. There is
560 also a more bizarre possibility: some phones have replaced the ringing buzzer
561 with a loudspeaker, but that speaker is used *only* for playing ringtone
562 melodies - no hands-free call feature is offered. This situation exists on
563 Motorola C155/156 phones.
564
565 Furthermore, if the physical sound-emitting element is a loudspeaker and not an
566 old-fashioned buzzer, and if the chipset is Calypso, as opposed to various newer
567 chipsets, then a further distinction arises:
568
569 2a) Most historical commercial phones that are based on Calypso and use a
570 loudspeaker for ringtone sounding, also contain a special ringtone generator
571 chip that drives this speaker when a ringtone is played - in other words,
572 their loudspeaker ringtones do NOT go through the same voice audio path that
573 is used for hands-free calls, if the latter feature is offered at all. The
574 speciai ringtone generator chip is typically a combined MIDI player and
575 loudspeaker driver.
576
577 2b) The much less popular approach is to not implement any extra hardware at all
578 that is specifically for ringtone generation, use only the same loudspeaker
579 audio path hardware that is already needed for hands-free calls (a simple
580 loudspeaker amplifier), generate ringtone melodies in the Calypso DSP
581 (Melody E1 or E2), and play them through the regular voice audio path,
582 routed to the loudspeaker.
583
584 Approach 2b is the least popular one among historical commercial Calypso phones,
585 but it is the one which I (Mother Mychaela) have selected for our FC Libre
586 Dumbphone handset. But let us nonetheless examine the pros and cons of
587 different approaches, and see why I have settled on option 2b.
588
589 Buzzer melodies (option 1) are monophonic (the signal carrying the melody to
590 the buzzer is a digital square wave, and there is no way to create multiple
591 overlapping notes in such a signal), but a decent range of tone frequencies is
592 available: the magnetic buzzer hardware can easily produce frequencies all the
593 way up to the limit of human hearing, while Calypso PWT produces musical notes
594 from F4 through E8 in the scientific pitch notation, or 349 to 5274 Hz. In
595 contrast, any tones produced through the 8000 samples/s voice audio path have
596 to be below the Nyquist frequency of 4 kHz - according to TI's document, Melody
597 E1 notes go from E4 (330 Hz) up to G#7 or 3322 Hz.
598
599 In terms of the richness of possible ringtone melodies that can be played,
600 option 2a (external MIDI player chip that drives the loudspeaker directly,
601 without going through Calypso+Iota voice audio path) is the absolute best.
602 These specialized ringtone generator chips implement full MIDI (128 instruments,
603 47 drums, up to 64 simultaneous notes, according to one datasheet), and the
604 available ringtone melodies for these MIDI chips are very rich - just take a
605 Pirelli DP-L10 phone and listen through various ringtone melodies it offers.
606 All of Pirelli's melodies are stored as *.mid files in their FFS, thus we could
607 very easily copy them if we were to adopt a MIDI player chip similar to theirs.
608
609 However, the problem for us with adopting option 2a is that this option would
610 introduce significant extra complexity and adversely affect our already long-
611 overdue project schedule. There is only one MIDI ringtone player chip for which
612 we have enough documentation to attempt such a feat: this chip is Winbond
613 W56964, a slightly more capable sibling of the W56940 used in the Pirelli phone.
614 However, just because we have what at first glance appears to be reasonably
615 complete documentation does not mean that it would be a slam dunk! We would
616 have to build a separate test board for this chip, connect it to a Caramel2
617 motherboard (it needs to connect to Calypso MEMIF), and then spend significant
618 time climbing the learning curve and getting this chip to actually work: getting
619 it to play melodies, and just as important, getting it into and out of sleep
620 modes. In other words, a lot of extra work and time spent just for this part,
621 not advancing any other project needs - whereas option 2b eliminates all of this
622 extra work.
623
624 Finally, a philosophical argument can be made that FreeCalypso should be all
625 about simplicity, producing a phone that does its job: implement just what is
626 needed for a functional phone, and omit unnecessary baggage. An extra hardware
627 circuit (a chip connected to Calypso memory bus, no less) and associated
628 software complexity that serves absolutely no other purpose except to produce
629 ringtones that are "richer" than what the Calypso can produce on its own, and
630 does not assist in any way with hands-free loudspeaker operation for calls (it
631 is more of a hindrance in that mode), can be seen as an unwelcome burden similar
632 to other unwelcome burdens which we are already eliminating, like the camera.
633
634 In contrast, with our chosen option 2b, we have exactly zero extra hardware
635 that is just for ringing: our loudspeaker and its associated driver circuit
636 (simple amplifier) is primarily for hands-free calls, and the ability to use
637 the same audio path to play ringtone melodies comes literally "for free" with
638 the Melody E1 feature built into our Calypso DSP. We already have a selection
639 of nice-sounding ringtone melodies in E1 format, lifted from the legendary TSM30
640 source, and software complexity is minimal: the melody playing engine has
641 already been implemented by TI, we only need to call RiViera Audio Service API
642 functions.