Inter-Office MemorandumToAudio InterestDateJanuary 9, 1981FromL. StewartLocationPalo AltoSubjectA Simple Audio TerminalOrganizationPARC/CSLXEROX Filed on: [Juniper]Audio>DAudioTerm.pressIntroductionThis note describes a simple full duplex audio terminal first assembled in December 1979. Ascurrently implemented, the device connects to the Diablo printer port of either an Alto I or an AltoII, or to the printer port of a Dolphin. The design could be easily adapted to other machineshaving a parallel port and capable of polling at least every 125 microseconds. The audio terminalsupports simultaneous input and output streams at 8000 samples per second, 8 bits per sample, m-255 law encoded. This data format is fully compatible with the telephone industry and with the m-law format of the Auburn audio board. The audio device currently attached to the audio terminal isa Danray telephone set.More informationInformation about the terminal is stored on [Juniper]Audio>. Relevant files are:CATFiles.dmSource files, and Alto microcode for bcplCATAudioMC.dmAlto microcode compatible with AuburnCATIIRun.dm.run files for the Alto IICATIRun.dm.run files for the Alto ISchematics and operating instructions are not available in machine readable form. Contact theauthor for more information.HardwareThe audio terminal as configured for the Dolphin contains 12 DIP packages and around 25 discretecomponents. A 14 signal (plus grounds) cable goes to the printer port and a 6 wire cable to thetelephone set. The device requires about 500 mA of +5 volts, 250 mA of +12 volts, and 150 mAof-5 volts.The hardware centers around an Intel 2910 Codec (coder-decoder) chip, which contains the Analogto Digital and Digital to Analog converters and m-255 companding circuitry.On the analog side of the codec, an Intel 2912 PCM line filter chip contains input and outputlowpass filters and output amplifier. The 2912 is currently connected directly to a 4-wire telephoneset (Danray), but through the use of a hybrid circuit or SLIC (Subscriber Line Interface Circuit)could be connected to a 2-wire telephone.]gpi c8q]rX -q7Br ]q]r -q7Br Yq]r-q 7BrSsr M2 Gt Dr7& C@Y A=! @7Y >^ur =/%;ur ;vr3 :' 6t 3rZ1y #)/! #v,r #*r # 'F%9 % "t krW B cD  X 00ur C %@ vr"v!r x)J1=ZDiablo Port Audio Terminal2The digital side of the codec is designed to connect directly to a 24 channel T1 PCM bus - the chipcontains time slot counters and serialization and de-serialization logic. The codec requires a 1.536MHz clock (T1), a Frame Sync pulse every 192 clock pulses. (192 is 24 8-bit time slots), and timeslot assignment information. A special case of the time slot assignment facility is used to assign thecodec to time slot 0 - immediately following frame sync. The codec also provides a time slot gatesignal described below.The audio terminal includes a Motorola K1115A crystal oscillator device operating at 6.144 MHzand a divide-by-4 circuit (74163) to generate the 1.536 MHZ clock. A further divide-by-192 curcuit(two more 74163 parts) produces the frame sync signal.The processor interface of the audio terminal consists of an 8-bit input shift register, an 8-bit outputshift register, and a ready flip-flop. Every 125 microseconds, the codec generates and accepts aserial 8-bit PCM sample over its input and output T1 busses. These samples are respectivelyclocked into and out of the input and output shift registers by a clock generated by gating the main1.536 MHz clock with the coded time slot gate signal (7400). The end of the time slot gate signalactivates the Ready flip-flop (7474). The processor must read the input sample and set the newoutput sample during the approximately 110 microseconds between Ready and the next frame sync.The output shift register is a 74165, which is parallel-loaded from the computer output port by anoutput port bit used as a strobe. The processor must set up the data bits, turn on the strobe bit,and then turn off the strobe bit before changing the data. Strobe also clears Ready.The input shift register is a 74164. Its 8 parallel outputs are valid from end-of-time slot until thenext frame sync. Because the Alto I has only 6 input bits available, a 74153 multiplexor is used toselect first the most significant four bits and then the least significant four bits of the input shiftregister. The multiplexor is set to select the high four bits by Ready and then set to select the lowfour bits by Strobe. The four multiplexor outputs occupy four bits of the processor input port andthe Ready signal occupies a fifth. WHhen the Audio terminal is configured for a Dolphin or otherprocessor with an 8-bit input port, the eight parallel data lines are enabled to the port through a74LS244 octal buffer. (The buffer is required since the Dolphin uses bi-directional data lines.)In order to reduce synchronization difficulties, the Ready signal is delayed for one half cycle of the1.536 MHz clock by the other half of the 7474 before connecting to the processor input port. Thispermits the high order 4 bits of the input sample to be accessed in the same reference that detectsReady.The cables required to connect to an Alto I or an Alto II are slightly different, due to the differentprinter port connectors on the two machines, but the same bits of the printer port memory locationsare used in each case. The cable wiring is different again for the Dolphin, and the port bits aredifferent as well.Software and MicrocodeAlto MicrocodeAs is implied above, the audio terminal is single buffered; it becomes ready every 125 microsecondsand allows at most 110 microseconds or so for service. To meet these requirements, the AltoMemory Refresh Task, which runs roughly every 39 microseconds, has been modified to poll theaudio terminal. Each invocation of MRT checks for the presence of Ready; if it is not set, the taskhandles its other duties and blocks. If Ready is set, MRT reads one sample and writes one sampleto the audio terminal.Due to the availability of R registers on the Alto, it is necessary to make MRT be RAM-related inorder for it to drive the audio terminal. On an Alto II this is done by adding a backplane jumperbetween MRTActive and TaskA. On an Alto I it is not so easy because MRTActive does notnormally come off the control board. A control board patch; however, is fairly easily added tobring MRTActive to a backplane pin. frG b@# `T _Q ]Y \H Z W^L U12 TV6 Q+h O10 N#C LI KN I vr: H(vr D%= CcK Ar<* =/E ;8/ :'Avr 8 vr9 7vrX 5P 4 T 0T /hb -K ,_v )4r.8 ',7 &,R $ !}tQv &rO 6& 0, Cvr )vr3  f^ b ^F O V#" =]uDiablo Port Audio Terminal3The current microcode interprets two lists of Audio Control Blocks, one each for input and output.Each ACB contains four words: a completion flag, a pointer to the next ACB, a pointer to a mainmemory data buffer, and a buffer length. Audio data is stored in memory as two samples per wordleft to right. Emulator microcode routines (JMPRAM) are provided to initialize the microcode, tostart or stop the interpretation of ACB chains, and to enqueue a new ACB on the end of an existingchain.Slightly different microcode is required for the Alto I and the Alto II due to the differences inmemory refresh on the two machines. The emulator interfaces are identical.The Alto microcode appears to use 10 to 15 percent of the machine when it is active, although thishas not been precisely measured.As an experiment, microcode was written which is compatible with the emulator interface of theAlto Auburn audio board. This version of the microcode works with all Auburn software - inparticular, it works with the Mesa Audio program.Alto SoftwareAt present, there are three bcpl programs which exercise the audio terminal hardware andmicrocode. ATTester.run uses single input and output ACBs linked to themselves. The two ACBsshare the same memory buffer so that the program serves to echo the audio input to the audiooutput while remembering the last several seconds of audio in its internal ring buffer. The inputstream can be disabled so that the output stream will cycle repetitively through the ring buffer.PlayFile.run and RecFile.run, respectively, play and record audio files from and to the local disk.Both programs accept a file name on the command line, using the GP package. RecFile expects theuser to type any character on the keyboard to start recording and another to stop.D0 Microcode and SoftwareThere is currently no Dolphin microcode for the audio terminal. The general idea would be to useone of the Dolphin timers to poll the terminal at approximately 100 microsecond intervals. A mesaprogram CATEcho.mesa is available for the Dolphin which uses the Mesa bytecodes RPrinter andWPrinter to "manually" operate the terminal. Due to the differences between the Alto Diablo printer port and the Dolphin printer port, the audioterminal operates somewhat differently on the Dolphin than what was described above for the Alto.Three output-only port bits are used as a device-address which conditions the terminal to payattention to the Dolphin. Three other output-only bits are used to select a function: read data fromthe terminal, read status from the terminal, or strobe data to the terminal.Comments and IssuesControl functionsThe current design does not have any facilities for detecting off-hook, touch-tones or dialing, anddoes not provide any facilties for outgoing control functions such as for operating a DAA or audioswitching circuits. Such digital inputs and outputs could be added if additional processor port bitswere available (and at some cost in complexity).Multiple codecsThe current design is not directly extensible to multiple codecs operating simultaneously. Bufferingand time slot assignment logic would probabnly be needed, which might well change the wholecharacter of the design. Multiple codecs operating one at a time (really a form of audio switching)could be accommodated by adding some digital control functions, as above. frG b.vr `_ _ U ] S \B Z W^R UK R] Q+ M@ L{vrP J#vrGv DrT C5) AG @ V > W ;eL 9T 8]R51v 2rD 0vr6 .H -z. *N?$ ([ 'Fv r% % Y $>L !t v r$? 8"@ F 00 v rJ U[ A# MI F >]:Diablo Port Audio Terminal4 frG ^ ` TIMESROMAN  TIMESROMAN TIMESROMAN LOGO TIMESROMAN HIPPO  TIMESROMAN   j/@DAudioTerm.bravoStewartJanuary 9, 1981 2:40 PM