1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* speakup_dtlk.h - header file for speakups DoubleTalk driver. */ 3 #ifndef _SPEAKUP_DTLK_H 4 #define _SPEAKUP_DTLK_H 5 6 #define SYNTH_IO_EXTENT 0x02 7 #define SYNTH_CLEAR 0x18 /* stops speech */ 8 /* TTS Port Status Flags */ 9 #define TTS_READABLE 0x80 /* mask for bit which is nonzero if a 10 * byte can be read from the TTS port 11 */ 12 #define TTS_SPEAKING 0x40 /* mask for SYNC bit, which is nonzero 13 * while DoubleTalk is producing 14 * output with TTS, PCM or CVSD 15 * synthesizers or tone generators 16 * (that is, all but LPC) 17 */ 18 #define TTS_SPEAKING2 0x20 /* mask for SYNC2 bit, 19 * which falls to zero up to 0.4 sec 20 * before speech stops 21 */ 22 #define TTS_WRITABLE 0x10 /* mask for RDY bit, which when set to 23 * 1, indicates the TTS port is ready 24 * to accept a byte of data. The RDY 25 * bit goes zero 2-3 usec after 26 * writing, and goes 1 again 180-190 27 * usec later. 28 */ 29 #define TTS_ALMOST_FULL 0x08 /* mask for AF bit: When set to 1, 30 * indicates that less than 300 bytes 31 * are available in the TTS input 32 * buffer. AF is always 0 in the PCM, 33 * TGN and CVSD modes. 34 */ 35 #define TTS_ALMOST_EMPTY 0x04 /* mask for AE bit: When set to 1, 36 * indicates that less than 300 bytes 37 * are remaining in DoubleTalk's input 38 * (TTS or PCM) buffer. AE is always 1 39 * in the TGN and CVSD modes. 40 */ 41 42 /* data returned by Interrogate command */ 43 struct synth_settings { 44 u16 serial_number; /* 0-7Fh:0-7Fh */ 45 u_char rom_version[24]; /* null terminated string */ 46 u_char mode; /* 0=Character; 1=Phoneme; 2=Text */ 47 u_char punc_level; /* nB; 0-7 */ 48 u_char formant_freq; /* nF; 0-9 */ 49 u_char pitch; /* nP; 0-99 */ 50 u_char speed; /* nS; 0-9 */ 51 u_char volume; /* nV; 0-9 */ 52 u_char tone; /* nX; 0-2 */ 53 u_char expression; /* nE; 0-9 */ 54 u_char ext_dict_loaded; /* 1=exception dictionary loaded */ 55 u_char ext_dict_status; /* 1=exception dictionary enabled */ 56 u_char free_ram; /* # pages (truncated) remaining for 57 * text buffer 58 */ 59 u_char articulation; /* nA; 0-9 */ 60 u_char reverb; /* nR; 0-9 */ 61 u_char eob; /* 7Fh value indicating end of 62 * parameter block 63 */ 64 u_char has_indexing; /* nonzero if indexing is implemented */ 65 }; 66 #endif 67