18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* speakup_dtlk.h - header file for speakups DoubleTalk driver. */ 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ci#define SYNTH_IO_EXTENT 0x02 58c2ecf20Sopenharmony_ci#define SYNTH_CLEAR 0x18 /* stops speech */ 68c2ecf20Sopenharmony_ci /* TTS Port Status Flags */ 78c2ecf20Sopenharmony_ci#define TTS_READABLE 0x80 /* mask for bit which is nonzero if a 88c2ecf20Sopenharmony_ci * byte can be read from the TTS port 98c2ecf20Sopenharmony_ci */ 108c2ecf20Sopenharmony_ci#define TTS_SPEAKING 0x40 /* mask for SYNC bit, which is nonzero 118c2ecf20Sopenharmony_ci * while DoubleTalk is producing 128c2ecf20Sopenharmony_ci * output with TTS, PCM or CVSD 138c2ecf20Sopenharmony_ci * synthesizers or tone generators 148c2ecf20Sopenharmony_ci * (that is, all but LPC) 158c2ecf20Sopenharmony_ci */ 168c2ecf20Sopenharmony_ci#define TTS_SPEAKING2 0x20 /* mask for SYNC2 bit, 178c2ecf20Sopenharmony_ci * which falls to zero up to 0.4 sec 188c2ecf20Sopenharmony_ci * before speech stops 198c2ecf20Sopenharmony_ci */ 208c2ecf20Sopenharmony_ci#define TTS_WRITABLE 0x10 /* mask for RDY bit, which when set to 218c2ecf20Sopenharmony_ci * 1, indicates the TTS port is ready 228c2ecf20Sopenharmony_ci * to accept a byte of data. The RDY 238c2ecf20Sopenharmony_ci * bit goes zero 2-3 usec after 248c2ecf20Sopenharmony_ci * writing, and goes 1 again 180-190 258c2ecf20Sopenharmony_ci * usec later. 268c2ecf20Sopenharmony_ci */ 278c2ecf20Sopenharmony_ci#define TTS_ALMOST_FULL 0x08 /* mask for AF bit: When set to 1, 288c2ecf20Sopenharmony_ci * indicates that less than 300 bytes 298c2ecf20Sopenharmony_ci * are available in the TTS input 308c2ecf20Sopenharmony_ci * buffer. AF is always 0 in the PCM, 318c2ecf20Sopenharmony_ci * TGN and CVSD modes. 328c2ecf20Sopenharmony_ci */ 338c2ecf20Sopenharmony_ci#define TTS_ALMOST_EMPTY 0x04 /* mask for AE bit: When set to 1, 348c2ecf20Sopenharmony_ci * indicates that less than 300 bytes 358c2ecf20Sopenharmony_ci * are remaining in DoubleTalk's input 368c2ecf20Sopenharmony_ci * (TTS or PCM) buffer. AE is always 1 378c2ecf20Sopenharmony_ci * in the TGN and CVSD modes. 388c2ecf20Sopenharmony_ci */ 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci /* data returned by Interrogate command */ 418c2ecf20Sopenharmony_cistruct synth_settings { 428c2ecf20Sopenharmony_ci u_short serial_number; /* 0-7Fh:0-7Fh */ 438c2ecf20Sopenharmony_ci u_char rom_version[24]; /* null terminated string */ 448c2ecf20Sopenharmony_ci u_char mode; /* 0=Character; 1=Phoneme; 2=Text */ 458c2ecf20Sopenharmony_ci u_char punc_level; /* nB; 0-7 */ 468c2ecf20Sopenharmony_ci u_char formant_freq; /* nF; 0-9 */ 478c2ecf20Sopenharmony_ci u_char pitch; /* nP; 0-99 */ 488c2ecf20Sopenharmony_ci u_char speed; /* nS; 0-9 */ 498c2ecf20Sopenharmony_ci u_char volume; /* nV; 0-9 */ 508c2ecf20Sopenharmony_ci u_char tone; /* nX; 0-2 */ 518c2ecf20Sopenharmony_ci u_char expression; /* nE; 0-9 */ 528c2ecf20Sopenharmony_ci u_char ext_dict_loaded; /* 1=exception dictionary loaded */ 538c2ecf20Sopenharmony_ci u_char ext_dict_status; /* 1=exception dictionary enabled */ 548c2ecf20Sopenharmony_ci u_char free_ram; /* # pages (truncated) remaining for 558c2ecf20Sopenharmony_ci * text buffer 568c2ecf20Sopenharmony_ci */ 578c2ecf20Sopenharmony_ci u_char articulation; /* nA; 0-9 */ 588c2ecf20Sopenharmony_ci u_char reverb; /* nR; 0-9 */ 598c2ecf20Sopenharmony_ci u_char eob; /* 7Fh value indicating end of 608c2ecf20Sopenharmony_ci * parameter block 618c2ecf20Sopenharmony_ci */ 628c2ecf20Sopenharmony_ci u_char has_indexing; /* nonzero if indexing is implemented */ 638c2ecf20Sopenharmony_ci}; 64