linux/drivers/accessibility/speakup/speakup_soft.c

// SPDX-License-Identifier: GPL-2.0+
/* speakup_soft.c - speakup driver to register and make available
 * a user space device for software synthesizers.  written by: Kirk
 * Reiser <[email protected]>
 *
 * Copyright (C) 2003  Kirk Reiser.
 *
 * this code is specifically written as a driver for the speakup screenreview
 * package and is not a general device driver.
 */

#include <linux/unistd.h>
#include <linux/miscdevice.h>	/* for misc_register, and MISC_DYNAMIC_MINOR */
#include <linux/poll.h>		/* for poll_wait() */

/* schedule(), signal_pending(), TASK_INTERRUPTIBLE */
#include <linux/sched/signal.h>

#include "spk_priv.h"
#include "speakup.h"

#define DRV_VERSION
#define PROCSPEECH
#define CLEAR_SYNTH

static int softsynth_probe(struct spk_synth *synth);
static void softsynth_release(struct spk_synth *synth);
static int softsynth_is_alive(struct spk_synth *synth);
static int softsynth_adjust(struct spk_synth *synth, struct st_var_header *var);
static unsigned char get_index(struct spk_synth *synth);

static struct miscdevice synth_device, synthu_device;
static int init_pos;
static int misc_registered;


enum default_vars_id {};


static struct var_t vars[NB_ID] =;

/* These attributes will appear in /sys/accessibility/speakup/soft. */

static struct kobj_attribute caps_start_attribute =;
static struct kobj_attribute caps_stop_attribute =;
static struct kobj_attribute freq_attribute =;
static struct kobj_attribute pitch_attribute =;
static struct kobj_attribute inflection_attribute =;
static struct kobj_attribute punct_attribute =;
static struct kobj_attribute rate_attribute =;
static struct kobj_attribute tone_attribute =;
static struct kobj_attribute voice_attribute =;
static struct kobj_attribute vol_attribute =;

/*
 * We should uncomment the following definition, when we agree on a
 * method of passing a language designation to the software synthesizer.
 * static struct kobj_attribute lang_attribute =
 *	__ATTR(lang, 0644, spk_var_show, spk_var_store);
 */

static struct kobj_attribute delay_time_attribute =;
static struct kobj_attribute direct_attribute =;
static struct kobj_attribute full_time_attribute =;
static struct kobj_attribute jiffy_delta_attribute =;
static struct kobj_attribute trigger_time_attribute =;

/*
 * Create a group of attributes so that we can create and destroy them all
 * at once.
 */
static struct attribute *synth_attrs[] =;

static struct spk_synth synth_soft =;

static char *get_initstring(void)
{}

static int softsynth_open(struct inode *inode, struct file *fp)
{}

static int softsynth_close(struct inode *inode, struct file *fp)
{}

static ssize_t softsynthx_read(struct file *fp, char __user *buf, size_t count,
			       loff_t *pos, int unicode)
{}

static ssize_t softsynth_read(struct file *fp, char __user *buf, size_t count,
			      loff_t *pos)
{}

static ssize_t softsynthu_read(struct file *fp, char __user *buf, size_t count,
			       loff_t *pos)
{}

static int last_index;

static ssize_t softsynth_write(struct file *fp, const char __user *buf,
			       size_t count, loff_t *pos)
{}

static __poll_t softsynth_poll(struct file *fp, struct poll_table_struct *wait)
{}

static unsigned char get_index(struct spk_synth *synth)
{}

static const struct file_operations softsynth_fops =;

static const struct file_operations softsynthu_fops =;

static int softsynth_probe(struct spk_synth *synth)
{}

static void softsynth_release(struct spk_synth *synth)
{}

static int softsynth_is_alive(struct spk_synth *synth)
{}

static int softsynth_adjust(struct spk_synth *synth, struct st_var_header *var)
{}

module_param_named(start, synth_soft.startup, short, 0444);
module_param_named(direct, vars[DIRECT_ID].u.n.default_val, int, 0444);
module_param_named(rate, vars[RATE_ID].u.n.default_val, int, 0444);
module_param_named(pitch, vars[PITCH_ID].u.n.default_val, int, 0444);
module_param_named(inflection, vars[INFLECTION_ID].u.n.default_val, int, 0444);
module_param_named(vol, vars[VOL_ID].u.n.default_val, int, 0444);
module_param_named(tone, vars[TONE_ID].u.n.default_val, int, 0444);
module_param_named(punct, vars[PUNCT_ID].u.n.default_val, int, 0444);
module_param_named(voice, vars[VOICE_ID].u.n.default_val, int, 0444);
module_param_named(frequency, vars[FREQUENCY_ID].u.n.default_val, int, 0444);



MODULE_PARM_DESC();
MODULE_PARM_DESC();
MODULE_PARM_DESC();
MODULE_PARM_DESC();
MODULE_PARM_DESC();
MODULE_PARM_DESC();
MODULE_PARM_DESC();
MODULE_PARM_DESC();
MODULE_PARM_DESC();
MODULE_PARM_DESC();

module_spk_synth();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_VERSION();