Lines Matching +full:lpc +full:- +full:interrupts
1 // SPDX-License-Identifier: GPL-2.0-only
2 /* -*- linux-c -*-
3 * dtlk.c - DoubleTalk PC driver for Linux
8 * 2000-03-18 Jim Van Zandt: Fix polling.
20 The DoubleTalk PC contains four voice synthesizers: text-to-speech
21 (TTS), linear predictive coding (LPC), PCM/ADPCM, and CVSD. It
22 also has a tone generator. Output data for LPC are written to the
23 LPC port, and output data for the other modes are written to the
29 of the speech) are read from the LPC port. Not all models of the
30 DoubleTalk PC implement index markers. Both the TTS and LPC ports
33 The DoubleTalk PC generates no interrupts.
40 This driver was written for use with the text-to-speech
41 synthesizer. If LPC output is needed some day, other minor device
44 "read" gets index markers from the LPC port. If the device does
57 #include <linux/errno.h> /* for -EBUSY */
134 /* printk("DoubleTalk PC - dtlk_read()\n"); */ in dtlk_read()
137 return -EINVAL; in dtlk_read()
144 return -EFAULT; in dtlk_read()
149 if (file->f_flags & O_NONBLOCK) in dtlk_read()
156 return -EAGAIN; in dtlk_read()
171 return -EFAULT; in dtlk_write()
182 return -EINVAL; in dtlk_write()
198 /* the RDY bit goes zero 2-3 usec in dtlk_write()
200 180-190 usec later. Here, we wait in dtlk_write()
214 if (file->f_flags & O_NONBLOCK) in dtlk_write()
225 return -EBUSY; in dtlk_write()
229 return -EAGAIN; in dtlk_write()
241 printk("<%ld>", jiffies-j); in dtlk_poll()
256 /* There won't be any interrupts, so we set a timer instead. */ in dtlk_poll()
285 return -EINVAL; in dtlk_ioctl()
293 return -EINVAL; in dtlk_ioctl()
305 return -EBUSY; in dtlk_open()
309 return -ENXIO; in dtlk_open()
340 printk(KERN_ERR "DoubleTalk PC - cannot register device\n"); in dtlk_init()
371 /* ------------------------------------------------------------------------ */
397 return -EBUSY; in dtlk_dev_probe()
401 printk("DoubleTalk PC - Port %03x = %04x\n", in dtlk_dev_probe()
414 printk("DoubleTalk PC at %03x-%03x, " in dtlk_dev_probe()
417 DTLK_IO_EXTENT - 1, in dtlk_dev_probe()
418 sp->rom_version, sp->serial_number); in dtlk_dev_probe()
420 /* put LPC port into known state, so in dtlk_dev_probe()
436 /* This macro records ten samples read from the LPC port, for later display */ in dtlk_dev_probe()
497 printk(KERN_INFO "DoubleTalk PC - not found\n"); in dtlk_dev_probe()
498 return -ENODEV; in dtlk_dev_probe()
504 printk(KERN_INFO"\nDoubleTalk PC - MINOR: %d, OPCODE: %d, ERROR: %d\n",
540 if (i < sizeof(status.rom_version) - 1) in dtlk_interrogate()
602 /* no need to test -- this is only called when the port is readable */ in dtlk_read_lpc()
604 ch = inb_p(dtlk_port_lpc); /* input from LPC port */ in dtlk_read_lpc()
608 /* acknowledging a read takes 3-4 in dtlk_read_lpc()
612 while (inb_p(dtlk_port_lpc) != 0x7f && --retries > 0); in dtlk_read_lpc()
624 /* printk("dtlk_write_bytes(\"%-*s\", %d)\n", n, buf, n); */ in dtlk_write_bytes()
626 while (n-- > 0) in dtlk_write_bytes()
650 /* the RDY bit goes zero 2-3 usec after writing, and goes in dtlk_write_tts()
651 1 again 180-190 usec later. Here, we wait up to 10 in dtlk_write_tts()