Greg Kroah-Hartman | 6496922 | 2018-01-11 11:08:40 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 2 | /* |
| 3 | * written by: Kirk Reiser <kirk@braille.uwo.ca> |
| 4 | * this version considerably modified by David Borowski, david575@rogers.com |
| 5 | * |
| 6 | * Copyright (C) 1998-99 Kirk Reiser. |
| 7 | * Copyright (C) 2003 David Borowski. |
| 8 | * |
Tom Rix | 0b4efcb | 2022-03-29 12:54:01 -0700 | [diff] [blame] | 9 | * this code is specifically written as a driver for the speakup screenreview |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 10 | * package and is not a general device driver. |
| 11 | * This driver is for the Aicom Acent PC internal synthesizer. |
| 12 | */ |
| 13 | |
| 14 | #include <linux/jiffies.h> |
| 15 | #include <linux/sched.h> |
| 16 | #include <linux/timer.h> |
| 17 | #include <linux/kthread.h> |
| 18 | |
| 19 | #include "spk_priv.h" |
| 20 | #include "serialio.h" |
| 21 | #include "speakup.h" |
| 22 | #include "speakup_acnt.h" /* local header file for Accent values */ |
| 23 | |
| 24 | #define DRV_VERSION "2.10" |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 25 | #define PROCSPEECH '\r' |
| 26 | |
| 27 | static int synth_probe(struct spk_synth *synth); |
Samuel Thibault | 1941ab1 | 2021-01-26 23:21:44 +0100 | [diff] [blame] | 28 | static void accent_release(struct spk_synth *synth); |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 29 | static const char *synth_immediate(struct spk_synth *synth, const char *buf); |
| 30 | static void do_catch_up(struct spk_synth *synth); |
| 31 | static void synth_flush(struct spk_synth *synth); |
| 32 | |
| 33 | static int synth_port_control; |
| 34 | static int port_forced; |
| 35 | static unsigned int synth_portlist[] = { 0x2a8, 0 }; |
| 36 | |
Osama Muhammad | cf0b465 | 2022-11-10 02:51:07 +0500 | [diff] [blame] | 37 | enum default_vars_id { |
| 38 | CAPS_START_ID = 0, CAPS_STOP_ID, |
| 39 | RATE_ID, PITCH_ID, |
| 40 | VOL_ID, TONE_ID, |
| 41 | DIRECT_ID, V_LAST_VAR_ID, |
| 42 | NB_ID |
| 43 | }; |
| 44 | |
| 45 | |
| 46 | static struct var_t vars[NB_ID] = { |
| 47 | [CAPS_START_ID] = { CAPS_START, .u.s = {"\033P8" } }, |
| 48 | [CAPS_STOP_ID] = { CAPS_STOP, .u.s = {"\033P5" } }, |
| 49 | [RATE_ID] = { RATE, .u.n = {"\033R%c", 9, 0, 17, 0, 0, "0123456789abcdefgh" } }, |
| 50 | [PITCH_ID] = { PITCH, .u.n = {"\033P%d", 5, 0, 9, 0, 0, NULL } }, |
| 51 | [VOL_ID] = { VOL, .u.n = {"\033A%d", 5, 0, 9, 0, 0, NULL } }, |
| 52 | [TONE_ID] = { TONE, .u.n = {"\033V%d", 5, 0, 9, 0, 0, NULL } }, |
| 53 | [DIRECT_ID] = { DIRECT, .u.n = {NULL, 0, 0, 1, 0, 0, NULL } }, |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 54 | V_LAST_VAR |
| 55 | }; |
| 56 | |
| 57 | /* |
| 58 | * These attributes will appear in /sys/accessibility/speakup/acntpc. |
| 59 | */ |
| 60 | static struct kobj_attribute caps_start_attribute = |
Derek Robson | 73c3700 | 2017-01-28 19:35:01 +1300 | [diff] [blame] | 61 | __ATTR(caps_start, 0644, spk_var_show, spk_var_store); |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 62 | static struct kobj_attribute caps_stop_attribute = |
Derek Robson | 73c3700 | 2017-01-28 19:35:01 +1300 | [diff] [blame] | 63 | __ATTR(caps_stop, 0644, spk_var_show, spk_var_store); |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 64 | static struct kobj_attribute pitch_attribute = |
Derek Robson | 73c3700 | 2017-01-28 19:35:01 +1300 | [diff] [blame] | 65 | __ATTR(pitch, 0644, spk_var_show, spk_var_store); |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 66 | static struct kobj_attribute rate_attribute = |
Derek Robson | 73c3700 | 2017-01-28 19:35:01 +1300 | [diff] [blame] | 67 | __ATTR(rate, 0644, spk_var_show, spk_var_store); |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 68 | static struct kobj_attribute tone_attribute = |
Derek Robson | 73c3700 | 2017-01-28 19:35:01 +1300 | [diff] [blame] | 69 | __ATTR(tone, 0644, spk_var_show, spk_var_store); |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 70 | static struct kobj_attribute vol_attribute = |
Derek Robson | 73c3700 | 2017-01-28 19:35:01 +1300 | [diff] [blame] | 71 | __ATTR(vol, 0644, spk_var_show, spk_var_store); |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 72 | |
| 73 | static struct kobj_attribute delay_time_attribute = |
Derek Robson | 73c3700 | 2017-01-28 19:35:01 +1300 | [diff] [blame] | 74 | __ATTR(delay_time, 0644, spk_var_show, spk_var_store); |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 75 | static struct kobj_attribute direct_attribute = |
Derek Robson | 73c3700 | 2017-01-28 19:35:01 +1300 | [diff] [blame] | 76 | __ATTR(direct, 0644, spk_var_show, spk_var_store); |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 77 | static struct kobj_attribute full_time_attribute = |
Derek Robson | 73c3700 | 2017-01-28 19:35:01 +1300 | [diff] [blame] | 78 | __ATTR(full_time, 0644, spk_var_show, spk_var_store); |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 79 | static struct kobj_attribute jiffy_delta_attribute = |
Derek Robson | 73c3700 | 2017-01-28 19:35:01 +1300 | [diff] [blame] | 80 | __ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store); |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 81 | static struct kobj_attribute trigger_time_attribute = |
Derek Robson | 73c3700 | 2017-01-28 19:35:01 +1300 | [diff] [blame] | 82 | __ATTR(trigger_time, 0644, spk_var_show, spk_var_store); |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 83 | |
| 84 | /* |
| 85 | * Create a group of attributes so that we can create and destroy them all |
| 86 | * at once. |
| 87 | */ |
| 88 | static struct attribute *synth_attrs[] = { |
| 89 | &caps_start_attribute.attr, |
| 90 | &caps_stop_attribute.attr, |
| 91 | &pitch_attribute.attr, |
| 92 | &rate_attribute.attr, |
| 93 | &tone_attribute.attr, |
| 94 | &vol_attribute.attr, |
| 95 | &delay_time_attribute.attr, |
| 96 | &direct_attribute.attr, |
| 97 | &full_time_attribute.attr, |
| 98 | &jiffy_delta_attribute.attr, |
| 99 | &trigger_time_attribute.attr, |
| 100 | NULL, /* need to NULL terminate the list of attributes */ |
| 101 | }; |
| 102 | |
| 103 | static struct spk_synth synth_acntpc = { |
| 104 | .name = "acntpc", |
| 105 | .version = DRV_VERSION, |
| 106 | .long_name = "Accent PC", |
| 107 | .init = "\033=X \033Oi\033T2\033=M\033N1\n", |
| 108 | .procspeech = PROCSPEECH, |
| 109 | .clear = SYNTH_CLEAR, |
| 110 | .delay = 500, |
| 111 | .trigger = 50, |
| 112 | .jiffies = 50, |
| 113 | .full = 1000, |
| 114 | .startup = SYNTH_START, |
| 115 | .checkval = SYNTH_CHECK, |
| 116 | .vars = vars, |
Okash Khawaja | 1e44159 | 2017-03-14 13:41:53 +0000 | [diff] [blame] | 117 | .io_ops = &spk_serial_io_ops, |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 118 | .probe = synth_probe, |
| 119 | .release = accent_release, |
| 120 | .synth_immediate = synth_immediate, |
| 121 | .catch_up = do_catch_up, |
| 122 | .flush = synth_flush, |
| 123 | .is_alive = spk_synth_is_alive_nop, |
| 124 | .synth_adjust = NULL, |
| 125 | .read_buff_add = NULL, |
| 126 | .get_index = NULL, |
| 127 | .indexing = { |
| 128 | .command = NULL, |
| 129 | .lowindex = 0, |
| 130 | .highindex = 0, |
| 131 | .currindex = 0, |
| 132 | }, |
| 133 | .attributes = { |
| 134 | .attrs = synth_attrs, |
| 135 | .name = "acntpc", |
| 136 | }, |
| 137 | }; |
| 138 | |
Christopher Brannon | bf4a4ba | 2010-10-14 19:23:46 -0500 | [diff] [blame] | 139 | static inline bool synth_writable(void) |
| 140 | { |
| 141 | return inb_p(synth_port_control) & SYNTH_WRITABLE; |
| 142 | } |
| 143 | |
| 144 | static inline bool synth_full(void) |
| 145 | { |
| 146 | return inb_p(speakup_info.port_tts + UART_RX) == 'F'; |
| 147 | } |
| 148 | |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 149 | static const char *synth_immediate(struct spk_synth *synth, const char *buf) |
| 150 | { |
| 151 | u_char ch; |
Domagoj Trsan | 8e69a81 | 2014-09-09 20:04:34 +0200 | [diff] [blame] | 152 | |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 153 | while ((ch = *buf)) { |
| 154 | int timeout = SPK_XMITR_TIMEOUT; |
Domagoj Trsan | 8e69a81 | 2014-09-09 20:04:34 +0200 | [diff] [blame] | 155 | |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 156 | if (ch == '\n') |
| 157 | ch = PROCSPEECH; |
| 158 | if (synth_full()) |
| 159 | return buf; |
| 160 | while (synth_writable()) { |
| 161 | if (!--timeout) |
| 162 | return buf; |
| 163 | udelay(1); |
| 164 | } |
| 165 | outb_p(ch, speakup_info.port_tts); |
| 166 | buf++; |
| 167 | } |
Sachin Kamat | dbbe686 | 2013-05-22 14:37:20 +0530 | [diff] [blame] | 168 | return NULL; |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 169 | } |
| 170 | |
| 171 | static void do_catch_up(struct spk_synth *synth) |
| 172 | { |
| 173 | u_char ch; |
| 174 | unsigned long flags; |
| 175 | unsigned long jiff_max; |
| 176 | int timeout; |
| 177 | int delay_time_val; |
| 178 | int jiffy_delta_val; |
| 179 | int full_time_val; |
| 180 | struct var_t *delay_time; |
| 181 | struct var_t *full_time; |
| 182 | struct var_t *jiffy_delta; |
| 183 | |
Samuel Thibault | ca2beaf | 2013-01-02 02:37:40 +0100 | [diff] [blame] | 184 | jiffy_delta = spk_get_var(JIFFY); |
| 185 | delay_time = spk_get_var(DELAY); |
| 186 | full_time = spk_get_var(FULL); |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 187 | |
William Hubbs | 995b904 | 2013-05-13 00:02:59 -0500 | [diff] [blame] | 188 | spin_lock_irqsave(&speakup_info.spinlock, flags); |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 189 | jiffy_delta_val = jiffy_delta->u.n.value; |
William Hubbs | 995b904 | 2013-05-13 00:02:59 -0500 | [diff] [blame] | 190 | spin_unlock_irqrestore(&speakup_info.spinlock, flags); |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 191 | |
| 192 | jiff_max = jiffies + jiffy_delta_val; |
| 193 | while (!kthread_should_stop()) { |
William Hubbs | 995b904 | 2013-05-13 00:02:59 -0500 | [diff] [blame] | 194 | spin_lock_irqsave(&speakup_info.spinlock, flags); |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 195 | if (speakup_info.flushing) { |
| 196 | speakup_info.flushing = 0; |
William Hubbs | 995b904 | 2013-05-13 00:02:59 -0500 | [diff] [blame] | 197 | spin_unlock_irqrestore(&speakup_info.spinlock, flags); |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 198 | synth->flush(synth); |
| 199 | continue; |
| 200 | } |
Samuel Thibault | 89fc2ae | 2017-03-04 15:01:55 +0100 | [diff] [blame] | 201 | synth_buffer_skip_nonlatin1(); |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 202 | if (synth_buffer_empty()) { |
William Hubbs | 995b904 | 2013-05-13 00:02:59 -0500 | [diff] [blame] | 203 | spin_unlock_irqrestore(&speakup_info.spinlock, flags); |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 204 | break; |
| 205 | } |
| 206 | set_current_state(TASK_INTERRUPTIBLE); |
| 207 | full_time_val = full_time->u.n.value; |
William Hubbs | 995b904 | 2013-05-13 00:02:59 -0500 | [diff] [blame] | 208 | spin_unlock_irqrestore(&speakup_info.spinlock, flags); |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 209 | if (synth_full()) { |
| 210 | schedule_timeout(msecs_to_jiffies(full_time_val)); |
| 211 | continue; |
| 212 | } |
| 213 | set_current_state(TASK_RUNNING); |
| 214 | timeout = SPK_XMITR_TIMEOUT; |
| 215 | while (synth_writable()) { |
| 216 | if (!--timeout) |
| 217 | break; |
| 218 | udelay(1); |
| 219 | } |
William Hubbs | 995b904 | 2013-05-13 00:02:59 -0500 | [diff] [blame] | 220 | spin_lock_irqsave(&speakup_info.spinlock, flags); |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 221 | ch = synth_buffer_getc(); |
William Hubbs | 995b904 | 2013-05-13 00:02:59 -0500 | [diff] [blame] | 222 | spin_unlock_irqrestore(&speakup_info.spinlock, flags); |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 223 | if (ch == '\n') |
| 224 | ch = PROCSPEECH; |
| 225 | outb_p(ch, speakup_info.port_tts); |
Ashvini Varatharaj | 75b76b4 | 2013-10-19 08:51:20 +0530 | [diff] [blame] | 226 | if (time_after_eq(jiffies, jiff_max) && ch == SPACE) { |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 227 | timeout = SPK_XMITR_TIMEOUT; |
| 228 | while (synth_writable()) { |
| 229 | if (!--timeout) |
| 230 | break; |
| 231 | udelay(1); |
| 232 | } |
| 233 | outb_p(PROCSPEECH, speakup_info.port_tts); |
William Hubbs | 995b904 | 2013-05-13 00:02:59 -0500 | [diff] [blame] | 234 | spin_lock_irqsave(&speakup_info.spinlock, flags); |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 235 | jiffy_delta_val = jiffy_delta->u.n.value; |
| 236 | delay_time_val = delay_time->u.n.value; |
William Hubbs | 995b904 | 2013-05-13 00:02:59 -0500 | [diff] [blame] | 237 | spin_unlock_irqrestore(&speakup_info.spinlock, flags); |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 238 | schedule_timeout(msecs_to_jiffies(delay_time_val)); |
Varsha Rao | e3bab5e | 2017-02-22 23:16:40 +0530 | [diff] [blame] | 239 | jiff_max = jiffies + jiffy_delta_val; |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 240 | } |
| 241 | } |
| 242 | timeout = SPK_XMITR_TIMEOUT; |
| 243 | while (synth_writable()) { |
| 244 | if (!--timeout) |
| 245 | break; |
| 246 | udelay(1); |
| 247 | } |
| 248 | outb_p(PROCSPEECH, speakup_info.port_tts); |
| 249 | } |
| 250 | |
| 251 | static void synth_flush(struct spk_synth *synth) |
| 252 | { |
| 253 | outb_p(SYNTH_CLEAR, speakup_info.port_tts); |
| 254 | } |
| 255 | |
| 256 | static int synth_probe(struct spk_synth *synth) |
| 257 | { |
| 258 | unsigned int port_val = 0; |
Colin Ian King | 1f8ff52 | 2021-11-10 23:33:42 +0000 | [diff] [blame] | 259 | int i; |
Domagoj Trsan | 8e69a81 | 2014-09-09 20:04:34 +0200 | [diff] [blame] | 260 | |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 261 | pr_info("Probing for %s.\n", synth->long_name); |
| 262 | if (port_forced) { |
| 263 | speakup_info.port_tts = port_forced; |
| 264 | pr_info("probe forced to %x by kernel command line\n", |
Arushi Singhal | 65bf4ea1 | 2017-03-21 17:12:34 +0530 | [diff] [blame] | 265 | speakup_info.port_tts); |
Varsha Rao | e3bab5e | 2017-02-22 23:16:40 +0530 | [diff] [blame] | 266 | if (synth_request_region(speakup_info.port_tts - 1, |
Arushi Singhal | 65bf4ea1 | 2017-03-21 17:12:34 +0530 | [diff] [blame] | 267 | SYNTH_IO_EXTENT)) { |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 268 | pr_warn("sorry, port already reserved\n"); |
| 269 | return -EBUSY; |
| 270 | } |
Varsha Rao | e3bab5e | 2017-02-22 23:16:40 +0530 | [diff] [blame] | 271 | port_val = inw(speakup_info.port_tts - 1); |
| 272 | synth_port_control = speakup_info.port_tts - 1; |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 273 | } else { |
| 274 | for (i = 0; synth_portlist[i]; i++) { |
| 275 | if (synth_request_region(synth_portlist[i], |
Arushi Singhal | 65bf4ea1 | 2017-03-21 17:12:34 +0530 | [diff] [blame] | 276 | SYNTH_IO_EXTENT)) { |
Christopher Brannon | bf4a4ba | 2010-10-14 19:23:46 -0500 | [diff] [blame] | 277 | pr_warn |
| 278 | ("request_region: failed with 0x%x, %d\n", |
| 279 | synth_portlist[i], SYNTH_IO_EXTENT); |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 280 | continue; |
| 281 | } |
| 282 | port_val = inw(synth_portlist[i]) & 0xfffc; |
| 283 | if (port_val == 0x53fc) { |
| 284 | /* 'S' and out&input bits */ |
| 285 | synth_port_control = synth_portlist[i]; |
Arushi Singhal | 205931e | 2017-03-21 17:12:31 +0530 | [diff] [blame] | 286 | speakup_info.port_tts = synth_port_control + 1; |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 287 | break; |
| 288 | } |
| 289 | } |
| 290 | } |
| 291 | port_val &= 0xfffc; |
| 292 | if (port_val != 0x53fc) { |
| 293 | /* 'S' and out&input bits */ |
| 294 | pr_info("%s: not found\n", synth->long_name); |
| 295 | synth_release_region(synth_port_control, SYNTH_IO_EXTENT); |
| 296 | synth_port_control = 0; |
| 297 | return -ENODEV; |
| 298 | } |
| 299 | pr_info("%s: %03x-%03x, driver version %s,\n", synth->long_name, |
Varsha Rao | e3bab5e | 2017-02-22 23:16:40 +0530 | [diff] [blame] | 300 | synth_port_control, synth_port_control + SYNTH_IO_EXTENT - 1, |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 301 | synth->version); |
| 302 | synth->alive = 1; |
| 303 | return 0; |
| 304 | } |
| 305 | |
Samuel Thibault | 1941ab1 | 2021-01-26 23:21:44 +0100 | [diff] [blame] | 306 | static void accent_release(struct spk_synth *synth) |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 307 | { |
Okash Khawaja | a50ef31 | 2017-03-14 13:41:54 +0000 | [diff] [blame] | 308 | spk_stop_serial_interrupt(); |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 309 | if (speakup_info.port_tts) |
Ioannis Valasakis | 8d0f5a6 | 2018-11-06 02:20:56 +0000 | [diff] [blame] | 310 | synth_release_region(speakup_info.port_tts - 1, |
| 311 | SYNTH_IO_EXTENT); |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 312 | speakup_info.port_tts = 0; |
| 313 | } |
| 314 | |
David Howells | dbf05cb | 2017-04-04 16:54:28 +0100 | [diff] [blame] | 315 | module_param_hw_named(port, port_forced, int, ioport, 0444); |
Derek Robson | 73c3700 | 2017-01-28 19:35:01 +1300 | [diff] [blame] | 316 | module_param_named(start, synth_acntpc.startup, short, 0444); |
Osama Muhammad | cf0b465 | 2022-11-10 02:51:07 +0500 | [diff] [blame] | 317 | module_param_named(rate, vars[RATE_ID].u.n.default_val, int, 0444); |
| 318 | module_param_named(pitch, vars[PITCH_ID].u.n.default_val, int, 0444); |
| 319 | module_param_named(vol, vars[VOL_ID].u.n.default_val, int, 0444); |
| 320 | module_param_named(tone, vars[TONE_ID].u.n.default_val, int, 0444); |
| 321 | module_param_named(direct, vars[DIRECT_ID].u.n.default_val, int, 0444); |
| 322 | |
| 323 | |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 324 | |
| 325 | MODULE_PARM_DESC(port, "Set the port for the synthesizer (override probing)."); |
| 326 | MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded."); |
Osama Muhammad | cf0b465 | 2022-11-10 02:51:07 +0500 | [diff] [blame] | 327 | MODULE_PARM_DESC(rate, "Set the rate variable on load."); |
| 328 | MODULE_PARM_DESC(pitch, "Set the pitch variable on load."); |
| 329 | MODULE_PARM_DESC(vol, "Set the vol variable on load."); |
| 330 | MODULE_PARM_DESC(tone, "Set the tone variable on load."); |
| 331 | MODULE_PARM_DESC(direct, "Set the direct variable on load."); |
| 332 | |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 333 | |
Vaishali Thakkar | ae89fac | 2015-03-18 23:13:10 +0530 | [diff] [blame] | 334 | module_spk_synth(synth_acntpc); |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 335 | |
William Hubbs | c6e3fd2 | 2010-10-07 13:20:02 -0500 | [diff] [blame] | 336 | MODULE_AUTHOR("Kirk Reiser <kirk@braille.uwo.ca>"); |
| 337 | MODULE_AUTHOR("David Borowski"); |
| 338 | MODULE_DESCRIPTION("Speakup support for Accent PC synthesizer"); |
| 339 | MODULE_LICENSE("GPL"); |
| 340 | MODULE_VERSION(DRV_VERSION); |
| 341 | |