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(synth);
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(synth);
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) {
278 synth->get_index(synth);
285 if (synth->get_index)
294 if (synth->alive) {
296 synth->indexing.currindex++;
298 if (synth->indexing.currindex >
299 synth->indexing.highindex)
300 synth->indexing.currindex =
301 synth->indexing.lowindex;
304 out = synth->indexing.currindex * 10 + sent_num;
305 synth_printf(synth->indexing.command, out, out);
311 int ind = synth->get_index(synth);
316 if ((ind / 10) <= synth->indexing.currindex)
317 index_count = synth->indexing.currindex - (ind / 10);
319 index_count = synth->indexing.currindex
320 - synth->indexing.lowindex
321 + synth->indexing.highindex - (ind / 10) + 1;
334 synth_res.name = synth->name;
361 struct spk_synth *tmp, *synth = NULL;
377 synth = tmp;
381 if (synth)
382 ret = do_synth_init(synth);
398 synth = in_synth;
399 synth->alive = 0;
400 pr_warn("synth probe\n");
401 if (synth->probe(synth) < 0) {
403 synth = NULL;
407 synth_time_vars[0].u.n.default_val = synth->delay;
409 synth_time_vars[1].u.n.default_val = synth->trigger;
411 synth_time_vars[2].u.n.default_val = synth->jiffies;
413 synth_time_vars[3].u.n.default_val = synth->full;
415 synth_time_vars[4].u.n.default_val = synth->flush_time;
416 synth_printf("%s", synth->init);
417 for (var = synth->vars;
421 synth_printf("%s found\n", synth->long_name);
422 if (synth->attributes.name &&
423 sysfs_create_group(speakup_kobj, &synth->attributes) < 0)
425 synth_flags = synth->flags;
437 if (!synth)
440 pr_info("releasing synth %s\n", synth->name);
441 synth->alive = 0;
444 if (synth->attributes.name)
445 sysfs_remove_group(speakup_kobj, &synth->attributes);
446 for (var = synth->vars; var->var_id != MAXVARS; var++)
448 synth->release(synth);
449 synth = NULL;
481 if (synth == in_synth)
491 return synth;