Lines Matching refs:synth
22 struct spk_synth *synth;
34 * through the synth buffer, so only needs to take the lock
54 static void _spk_do_catch_up(struct spk_synth *synth, int unicode)
81 synth->flush(synth);
95 ch = synth->procspeech;
97 ret = synth->io_ops->synth_out_unicode(synth, ch);
99 ret = synth->io_ops->synth_out(synth, ch);
110 if (synth->io_ops->synth_out(synth, synth->procspeech))
123 synth->io_ops->synth_out(synth, synth->procspeech);
126 void spk_do_catch_up(struct spk_synth *synth)
128 _spk_do_catch_up(synth, 0);
132 void spk_do_catch_up_unicode(struct spk_synth *synth)
134 _spk_do_catch_up(synth, 1);
138 void spk_synth_flush(struct spk_synth *synth)
140 synth->io_ops->flush_buffer();
141 synth->io_ops->synth_out(synth, synth->clear);
145 unsigned char spk_synth_get_index(struct spk_synth *synth)
147 return synth->io_ops->synth_in_nowait();
151 int spk_synth_is_alive_nop(struct spk_synth *synth)
153 synth->alive = 1;
158 int spk_synth_is_alive_restart(struct spk_synth *synth)
160 if (synth->alive)
162 if (synth->io_ops->wait_for_xmitr(synth) > 0) {
164 synth->alive = 1;
165 synth_printf("%s", synth->init);
168 pr_warn("%s: can't restart synth\n", synth->long_name);
184 if (!synth->alive) {
196 if (!synth)
201 if (synth->alive) {
276 synth->get_index(synth);
283 if (synth->get_index)
292 if (synth->alive) {
294 synth->indexing.currindex++;
296 if (synth->indexing.currindex >
297 synth->indexing.highindex)
298 synth->indexing.currindex =
299 synth->indexing.lowindex;
302 out = synth->indexing.currindex * 10 + sent_num;
303 synth_printf(synth->indexing.command, out, out);
309 int ind = synth->get_index(synth);
314 if ((ind / 10) <= synth->indexing.currindex)
315 index_count = synth->indexing.currindex - (ind / 10);
317 index_count = synth->indexing.currindex
318 - synth->indexing.lowindex
319 + synth->indexing.highindex - (ind / 10) + 1;
332 synth_res.name = synth->name;
358 struct spk_synth *tmp, *synth = NULL;
374 synth = tmp;
378 if (synth)
379 ret = do_synth_init(synth);
395 synth = in_synth;
396 synth->alive = 0;
397 pr_warn("synth probe\n");
398 if (synth->probe(synth) < 0) {
400 synth = NULL;
404 synth_time_vars[0].u.n.default_val = synth->delay;
406 synth_time_vars[1].u.n.default_val = synth->trigger;
408 synth_time_vars[2].u.n.default_val = synth->jiffies;
410 synth_time_vars[3].u.n.default_val = synth->full;
411 synth_printf("%s", synth->init);
412 for (var = synth->vars;
416 synth_printf("%s found\n", synth->long_name);
417 if (synth->attributes.name &&
418 sysfs_create_group(speakup_kobj, &synth->attributes) < 0)
420 synth_flags = synth->flags;
432 if (!synth)
435 pr_info("releasing synth %s\n", synth->name);
436 synth->alive = 0;
439 if (synth->attributes.name)
440 sysfs_remove_group(speakup_kobj, &synth->attributes);
441 for (var = synth->vars; var->var_id != MAXVARS; var++)
443 synth->release();
444 synth = NULL;
476 if (synth == in_synth)
486 return synth;