* [patch 0/2] staging: speakup: support more than ttyS*
@ Okash Khawaja
` [patch 1/2] staging: speakup: add function to convert dev name to number Okash Khawaja
` (2 more replies)
0 siblings, 3 replies; 27+ messages in thread
From: Okash Khawaja @ UTC (permalink / raw)
To: Samuel Thibault; +Cc: William Hubbs, Chris Brannon, Kirk Reiser, speakup
Hi,
These patches extend speakup support to ttyS* and lp*. They introduce a
new module param dev whose purpose is similar to ser but instead of
taking serial port number as argument, it takes strings like ttyS0 or
ttyUSB0. First patch just adds functionality to convert such strings
into dev_t. Second patch makes use of that functionlity.
Thanks,
Okash
^ permalink raw reply [flat|nested] 27+ messages in thread* [patch 1/2] staging: speakup: add function to convert dev name to number [patch 0/2] staging: speakup: support more than ttyS* Okash Khawaja @ ` Okash Khawaja ` Samuel Thibault ` [patch 2/2] staging: speakup: make ttyio synths use device name Okash Khawaja ` [patch 0/2] staging: speakup: support more than ttyS* Okash Khawaja 2 siblings, 1 reply; 27+ messages in thread From: Okash Khawaja @ UTC (permalink / raw) To: Samuel Thibault Cc: William Hubbs, Chris Brannon, Kirk Reiser, speakup, Okash Khawaja [-- Attachment #1: 11_convert_devname_to_devno --] [-- Type: text/plain, Size: 5054 bytes --] The function converts strings like ttyS0 and ttyUSB0 to dev_t like (4, 64) and (188, 0). Subsequent patch in this set will call it to convert user-supplied device into device number. The function does some basic sanity checks on the string passed in. It currently supports ttyS*, ttyUSB* and, for selected synths, lp*. In order to do this, the patch also introduces a string member variable named 'dev' to struct spk_synth. 'dev' represents the device name - ttyUSB0 etc - which needs conversion to dev_t. Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com> --- drivers/staging/speakup/spk_priv.h | 2 drivers/staging/speakup/spk_ttyio.c | 108 ++++++++++++++++++++++++++++++++++++ drivers/staging/speakup/spk_types.h | 1 3 files changed, 111 insertions(+) --- a/drivers/staging/speakup/spk_priv.h +++ b/drivers/staging/speakup/spk_priv.h @@ -40,6 +40,8 @@ #define KT_SPKUP 15 #define SPK_SYNTH_TIMEOUT 100000 /* in micro-seconds */ +#define SYNTH_DEFAULT_DEV "ttyS0" +#define SYNTH_DEFAULT_SER 0 const struct old_serial_port *spk_serial_init(int index); void spk_stop_serial_interrupt(void); --- a/drivers/staging/speakup/spk_ttyio.c +++ b/drivers/staging/speakup/spk_ttyio.c @@ -7,6 +7,13 @@ #include "spk_types.h" #include "spk_priv.h" +/* Supported device types */ +#define DEV_PREFIX_TTYS "ttyS" +#define DEV_PREFIX_TTYUSB "ttyUSB" +#define DEV_PREFIX_LP "lp" + +const char *lp_supported[] = { "acntsa", "bns", "dummy", "txprt" }; + struct spk_ldisc_data { char buf; struct semaphore sem; @@ -16,6 +23,107 @@ struct spk_ldisc_data { static struct spk_synth *spk_ttyio_synth; static struct tty_struct *speakup_tty; +static int name_to_dev(const char *name, dev_t *dev_no) +{ + int maj = -1, min = -1; + + if (strncmp(name, DEV_PREFIX_TTYS, strlen(DEV_PREFIX_TTYS)) == 0) { + if (kstrtoint(name + strlen(DEV_PREFIX_TTYS), 10, &min)) { + pr_err("speakup: Invalid ser param. Must be \ + between 0 and 191 inclusive.\n"); + return -EINVAL; + } + maj = 4; + + if (min < 0 || min > 191) { + pr_err("speakup: Invalid ser param. Must be \ + between 0 and 191 inclusive.\n"); + return -EINVAL; + } + min = min + 64; + } + + if (strncmp(name, DEV_PREFIX_TTYUSB, strlen(DEV_PREFIX_TTYUSB)) == 0) { + if (kstrtoint(name + strlen(DEV_PREFIX_TTYUSB), 10, &min)) { + pr_err("speakup: Invalid ttyUSB number. \ + Must be a number from 0 onwards\n"); + return -EINVAL; + } + maj = 188; + + if (min < 0) { + pr_err("speakup: Invalid ttyUSB number. \ + Must be a number from 0 onwards\n"); + return -EINVAL; + } + } + + if (strncmp(name, DEV_PREFIX_LP, strlen(DEV_PREFIX_LP)) == 0) { + if (kstrtoint(name + strlen(DEV_PREFIX_LP), 10, &min)) { + pr_warn("speakup: Invalid lp number. \ + Must be a number from 0 onwards\n"); + return -EINVAL; + } + maj = 6; + + if (min < 0) { + pr_warn("speakup: Invalid lp number. \ + Must be a number from 0 onwards\n"); + return -EINVAL; + } + } + + if (maj == -1 || min == -1) + return -EINVAL; + + /* if here, maj and min must be valid */ + *dev_no = MKDEV(maj, min); + + return 0; +} + +int ser_to_dev(int ser, dev_t *dev_no) +{ + if (ser < 0 || ser > (255 - 64)) { + pr_err("speakup: Invalid ser param. \ + Must be between 0 and 191 inclusive.\n"); + + return -EINVAL; + } + + *dev_no = MKDEV(4, (64 + ser)); + return 0; +} + +static int get_dev_to_use(struct spk_synth *synth, dev_t *dev_no) +{ + /* use ser only when dev is not specified */ + if (strcmp(synth->dev, SYNTH_DEFAULT_DEV) || synth->ser == SYNTH_DEFAULT_SER) { + /* for /dev/lp* check if synth is supported */ + if (strncmp(synth->dev, DEV_PREFIX_LP, strlen(DEV_PREFIX_LP)) == 0) { + int i, len = sizeof(lp_supported) / sizeof(*lp_supported); + + for (i = 0; i < len; i++) { + if (strcmp(synth->name, lp_supported[i]) == 0) + break; + } + + if (i >= len) { + pr_err("speakup: lp* is only supported on: "); + for (i = 0; i < len; i++) + pr_cont("%s ", lp_supported[i]); + pr_cont("\n"); + + return -ENOTSUPP; + } + } + + return name_to_dev(synth->dev, dev_no); + } + + return ser_to_dev(synth->ser, dev_no); +} + static int spk_ttyio_ldisc_open(struct tty_struct *tty) { struct spk_ldisc_data *ldisc_data; --- a/drivers/staging/speakup/spk_types.h +++ b/drivers/staging/speakup/spk_types.h @@ -169,6 +169,7 @@ struct spk_synth { int jiffies; int full; int ser; + char *dev; short flags; short startup; const int checkval; /* for validating a proper synth module */ ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [patch 1/2] staging: speakup: add function to convert dev name to number ` [patch 1/2] staging: speakup: add function to convert dev name to number Okash Khawaja @ ` Samuel Thibault ` Okash Khawaja 0 siblings, 1 reply; 27+ messages in thread From: Samuel Thibault @ UTC (permalink / raw) To: Okash Khawaja; +Cc: William Hubbs, Chris Brannon, Kirk Reiser, speakup Hello, Okash Khawaja, on sam. 10 juin 2017 12:24:11 +0100, wrote: > + if (strncmp(name, DEV_PREFIX_TTYS, strlen(DEV_PREFIX_TTYS)) == 0) { ... > + } > + > + if (strncmp(name, DEV_PREFIX_TTYUSB, strlen(DEV_PREFIX_TTYUSB)) == 0) { You can use "else if" here and below, not much optimization, but clearer for the reader. > +static int get_dev_to_use(struct spk_synth *synth, dev_t *dev_no) > +{ > + /* use ser only when dev is not specified */ > + if (strcmp(synth->dev, SYNTH_DEFAULT_DEV) || synth->ser == SYNTH_DEFAULT_SER) { > + /* for /dev/lp* check if synth is supported */ > + if (strncmp(synth->dev, DEV_PREFIX_LP, strlen(DEV_PREFIX_LP)) == 0) { > + int i, len = sizeof(lp_supported) / sizeof(*lp_supported); Use the ARRAY_SIZE() macro. > + > + for (i = 0; i < len; i++) { > + if (strcmp(synth->name, lp_supported[i]) == 0) > + break; > + } > + > + if (i >= len) { > + pr_err("speakup: lp* is only supported on: "); > + for (i = 0; i < len; i++) > + pr_cont("%s ", lp_supported[i]); Really for nitpicking: rather put space before %s, after removing the space after ':', so that we don't have a trailing space. Samuel ^ permalink raw reply [flat|nested] 27+ messages in thread
* [patch 1/2] staging: speakup: add function to convert dev name to number ` Samuel Thibault @ ` Okash Khawaja ` Samuel Thibault ` Okash Khawaja 0 siblings, 2 replies; 27+ messages in thread From: Okash Khawaja @ UTC (permalink / raw) To: Samuel Thibault; +Cc: William Hubbs, Chris Brannon, Kirk Reiser, speakup The function converts strings like ttyS0 and ttyUSB0 to dev_t like (4, 64) and (188, 0). Subsequent patch in this set will call it to convert user-supplied device into device number. The function does some basic sanity checks on the string passed in. It currently supports ttyS*, ttyUSB* and, for selected synths, lp*. In order to do this, the patch also introduces a string member variable named 'dev' to struct spk_synth. 'dev' represents the device name - ttyUSB0 etc - which needs conversion to dev_t. Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com> --- drivers/staging/speakup/spk_priv.h | 2 drivers/staging/speakup/spk_ttyio.c | 105 ++++++++++++++++++++++++++++++++++++ drivers/staging/speakup/spk_types.h | 1 3 files changed, 108 insertions(+) --- a/drivers/staging/speakup/spk_priv.h +++ b/drivers/staging/speakup/spk_priv.h @@ -40,6 +40,8 @@ #define KT_SPKUP 15 #define SPK_SYNTH_TIMEOUT 100000 /* in micro-seconds */ +#define SYNTH_DEFAULT_DEV "ttyS0" +#define SYNTH_DEFAULT_SER 0 const struct old_serial_port *spk_serial_init(int index); void spk_stop_serial_interrupt(void); --- a/drivers/staging/speakup/spk_ttyio.c +++ b/drivers/staging/speakup/spk_ttyio.c @@ -7,6 +7,13 @@ #include "spk_types.h" #include "spk_priv.h" +/* Supported device types */ +#define DEV_PREFIX_TTYS "ttyS" +#define DEV_PREFIX_TTYUSB "ttyUSB" +#define DEV_PREFIX_LP "lp" + +const char *lp_supported[] = { "acntsa", "bns", "dummy", "txprt" }; + struct spk_ldisc_data { char buf; struct semaphore sem; @@ -16,6 +23,104 @@ struct spk_ldisc_data { static struct spk_synth *spk_ttyio_synth; static struct tty_struct *speakup_tty; +static int name_to_dev(const char *name, dev_t *dev_no) +{ + int maj = -1, min = -1; + + if (strncmp(name, DEV_PREFIX_TTYS, strlen(DEV_PREFIX_TTYS)) == 0) { + if (kstrtoint(name + strlen(DEV_PREFIX_TTYS), 10, &min)) { + pr_err("speakup: Invalid ser param. Must be \ + between 0 and 191 inclusive.\n"); + return -EINVAL; + } + maj = 4; + + if (min < 0 || min > 191) { + pr_err("speakup: Invalid ser param. Must be \ + between 0 and 191 inclusive.\n"); + return -EINVAL; + } + min = min + 64; + } else if (strncmp(name, DEV_PREFIX_TTYUSB, strlen(DEV_PREFIX_TTYUSB)) + == 0) { + if (kstrtoint(name + strlen(DEV_PREFIX_TTYUSB), 10, &min)) { + pr_err("speakup: Invalid ttyUSB number. \ + Must be a number from 0 onwards\n"); + return -EINVAL; + } + maj = 188; + + if (min < 0) { + pr_err("speakup: Invalid ttyUSB number. \ + Must be a number from 0 onwards\n"); + return -EINVAL; + } + } else if (strncmp(name, DEV_PREFIX_LP, strlen(DEV_PREFIX_LP)) == 0) { + if (kstrtoint(name + strlen(DEV_PREFIX_LP), 10, &min)) { + pr_warn("speakup: Invalid lp number. \ + Must be a number from 0 onwards\n"); + return -EINVAL; + } + maj = 6; + + if (min < 0) { + pr_warn("speakup: Invalid lp number. \ + Must be a number from 0 onwards\n"); + return -EINVAL; + } + } + + if (maj == -1 || min == -1) + return -EINVAL; + + /* if here, maj and min must be valid */ + *dev_no = MKDEV(maj, min); + + return 0; +} + +int ser_to_dev(int ser, dev_t *dev_no) +{ + if (ser < 0 || ser > (255 - 64)) { + pr_err("speakup: Invalid ser param. \ + Must be between 0 and 191 inclusive.\n"); + + return -EINVAL; + } + + *dev_no = MKDEV(4, (64 + ser)); + return 0; +} + +static int get_dev_to_use(struct spk_synth *synth, dev_t *dev_no) +{ + /* use ser only when dev is not specified */ + if (strcmp(synth->dev, SYNTH_DEFAULT_DEV) || synth->ser == SYNTH_DEFAULT_SER) { + /* for /dev/lp* check if synth is supported */ + if (strncmp(synth->dev, DEV_PREFIX_LP, strlen(DEV_PREFIX_LP)) == 0) { + int i; + + for (i = 0; i < ARRAY_SIZE(lp_supported); i++) { + if (strcmp(synth->name, lp_supported[i]) == 0) + break; + } + + if (i >= ARRAY_SIZE(lp_supported)) { + pr_err("speakup: lp* is only supported on:"); + for (i = 0; i < ARRAY_SIZE(lp_supported); i++) + pr_cont(" %s", lp_supported[i]); + pr_cont("\n"); + + return -ENOTSUPP; + } + } + + return name_to_dev(synth->dev, dev_no); + } + + return ser_to_dev(synth->ser, dev_no); +} + static int spk_ttyio_ldisc_open(struct tty_struct *tty) { struct spk_ldisc_data *ldisc_data; --- a/drivers/staging/speakup/spk_types.h +++ b/drivers/staging/speakup/spk_types.h @@ -169,6 +169,7 @@ struct spk_synth { int jiffies; int full; int ser; + char *dev; short flags; short startup; const int checkval; /* for validating a proper synth module */ ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [patch 1/2] staging: speakup: add function to convert dev name to number ` Okash Khawaja @ ` Samuel Thibault ` Okash Khawaja 1 sibling, 0 replies; 27+ messages in thread From: Samuel Thibault @ UTC (permalink / raw) To: Okash Khawaja; +Cc: William Hubbs, Chris Brannon, Kirk Reiser, speakup Okash Khawaja, on lun. 12 juin 2017 13:17:56 +0100, wrote: > The function converts strings like ttyS0 and ttyUSB0 to dev_t like > (4, 64) and (188, 0). Subsequent patch in this set will call it to > convert user-supplied device into device number. The function does > some basic sanity checks on the string passed in. It currently supports > ttyS*, ttyUSB* and, for selected synths, lp*. > > In order to do this, the patch also introduces a string member variable > named 'dev' to struct spk_synth. 'dev' represents the device name - > ttyUSB0 etc - which needs conversion to dev_t. > > Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com> Reviewed-by: SAmuel Thibault <samuel.thibault@ens-lyon.org> > --- > drivers/staging/speakup/spk_priv.h | 2 > drivers/staging/speakup/spk_ttyio.c | 105 ++++++++++++++++++++++++++++++++++++ > drivers/staging/speakup/spk_types.h | 1 > 3 files changed, 108 insertions(+) > > --- a/drivers/staging/speakup/spk_priv.h > +++ b/drivers/staging/speakup/spk_priv.h > @@ -40,6 +40,8 @@ > > #define KT_SPKUP 15 > #define SPK_SYNTH_TIMEOUT 100000 /* in micro-seconds */ > +#define SYNTH_DEFAULT_DEV "ttyS0" > +#define SYNTH_DEFAULT_SER 0 > > const struct old_serial_port *spk_serial_init(int index); > void spk_stop_serial_interrupt(void); > --- a/drivers/staging/speakup/spk_ttyio.c > +++ b/drivers/staging/speakup/spk_ttyio.c > @@ -7,6 +7,13 @@ > #include "spk_types.h" > #include "spk_priv.h" > > +/* Supported device types */ > +#define DEV_PREFIX_TTYS "ttyS" > +#define DEV_PREFIX_TTYUSB "ttyUSB" > +#define DEV_PREFIX_LP "lp" > + > +const char *lp_supported[] = { "acntsa", "bns", "dummy", "txprt" }; > + > struct spk_ldisc_data { > char buf; > struct semaphore sem; > @@ -16,6 +23,104 @@ struct spk_ldisc_data { > static struct spk_synth *spk_ttyio_synth; > static struct tty_struct *speakup_tty; > > +static int name_to_dev(const char *name, dev_t *dev_no) > +{ > + int maj = -1, min = -1; > + > + if (strncmp(name, DEV_PREFIX_TTYS, strlen(DEV_PREFIX_TTYS)) == 0) { > + if (kstrtoint(name + strlen(DEV_PREFIX_TTYS), 10, &min)) { > + pr_err("speakup: Invalid ser param. Must be \ > + between 0 and 191 inclusive.\n"); > + return -EINVAL; > + } > + maj = 4; > + > + if (min < 0 || min > 191) { > + pr_err("speakup: Invalid ser param. Must be \ > + between 0 and 191 inclusive.\n"); > + return -EINVAL; > + } > + min = min + 64; > + } else if (strncmp(name, DEV_PREFIX_TTYUSB, strlen(DEV_PREFIX_TTYUSB)) > + == 0) { > + if (kstrtoint(name + strlen(DEV_PREFIX_TTYUSB), 10, &min)) { > + pr_err("speakup: Invalid ttyUSB number. \ > + Must be a number from 0 onwards\n"); > + return -EINVAL; > + } > + maj = 188; > + > + if (min < 0) { > + pr_err("speakup: Invalid ttyUSB number. \ > + Must be a number from 0 onwards\n"); > + return -EINVAL; > + } > + } else if (strncmp(name, DEV_PREFIX_LP, strlen(DEV_PREFIX_LP)) == 0) { > + if (kstrtoint(name + strlen(DEV_PREFIX_LP), 10, &min)) { > + pr_warn("speakup: Invalid lp number. \ > + Must be a number from 0 onwards\n"); > + return -EINVAL; > + } > + maj = 6; > + > + if (min < 0) { > + pr_warn("speakup: Invalid lp number. \ > + Must be a number from 0 onwards\n"); > + return -EINVAL; > + } > + } > + > + if (maj == -1 || min == -1) > + return -EINVAL; > + > + /* if here, maj and min must be valid */ > + *dev_no = MKDEV(maj, min); > + > + return 0; > +} > + > +int ser_to_dev(int ser, dev_t *dev_no) > +{ > + if (ser < 0 || ser > (255 - 64)) { > + pr_err("speakup: Invalid ser param. \ > + Must be between 0 and 191 inclusive.\n"); > + > + return -EINVAL; > + } > + > + *dev_no = MKDEV(4, (64 + ser)); > + return 0; > +} > + > +static int get_dev_to_use(struct spk_synth *synth, dev_t *dev_no) > +{ > + /* use ser only when dev is not specified */ > + if (strcmp(synth->dev, SYNTH_DEFAULT_DEV) || synth->ser == SYNTH_DEFAULT_SER) { > + /* for /dev/lp* check if synth is supported */ > + if (strncmp(synth->dev, DEV_PREFIX_LP, strlen(DEV_PREFIX_LP)) == 0) { > + int i; > + > + for (i = 0; i < ARRAY_SIZE(lp_supported); i++) { > + if (strcmp(synth->name, lp_supported[i]) == 0) > + break; > + } > + > + if (i >= ARRAY_SIZE(lp_supported)) { > + pr_err("speakup: lp* is only supported on:"); > + for (i = 0; i < ARRAY_SIZE(lp_supported); i++) > + pr_cont(" %s", lp_supported[i]); > + pr_cont("\n"); > + > + return -ENOTSUPP; > + } > + } > + > + return name_to_dev(synth->dev, dev_no); > + } > + > + return ser_to_dev(synth->ser, dev_no); > +} > + > static int spk_ttyio_ldisc_open(struct tty_struct *tty) > { > struct spk_ldisc_data *ldisc_data; > --- a/drivers/staging/speakup/spk_types.h > +++ b/drivers/staging/speakup/spk_types.h > @@ -169,6 +169,7 @@ struct spk_synth { > int jiffies; > int full; > int ser; > + char *dev; > short flags; > short startup; > const int checkval; /* for validating a proper synth module */ > -- Samuel J'ai beaucoup de mal a lire fcola quand il y a toutes les annonces de howto : les annonces interessantes sont noyees dans les howto. Ca serait pas mal de degager toute cette pollution dans un autre groupe. JLM in Guide du linuxien pervers : "Cachez ces doc que je ne saurais voir" ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [patch 1/2] staging: speakup: add function to convert dev name to number ` Okash Khawaja ` Samuel Thibault @ ` Okash Khawaja 1 sibling, 0 replies; 27+ messages in thread From: Okash Khawaja @ UTC (permalink / raw) To: Samuel Thibault; +Cc: William Hubbs, Chris Brannon, Kirk Reiser, speakup On Mon, Jun 12, 2017 at 01:17:56PM +0100, Okash Khawaja wrote: > The function converts strings like ttyS0 and ttyUSB0 to dev_t like > (4, 64) and (188, 0). Subsequent patch in this set will call it to > convert user-supplied device into device number. The function does > some basic sanity checks on the string passed in. It currently supports > ttyS*, ttyUSB* and, for selected synths, lp*. > > In order to do this, the patch also introduces a string member variable > named 'dev' to struct spk_synth. 'dev' represents the device name - > ttyUSB0 etc - which needs conversion to dev_t. Sorry should have marked it as v2 :) Okash ^ permalink raw reply [flat|nested] 27+ messages in thread
* [patch 2/2] staging: speakup: make ttyio synths use device name [patch 0/2] staging: speakup: support more than ttyS* Okash Khawaja ` [patch 1/2] staging: speakup: add function to convert dev name to number Okash Khawaja @ ` Okash Khawaja ` Samuel Thibault ` [patch 0/2] staging: speakup: support more than ttyS* Okash Khawaja 2 siblings, 1 reply; 27+ messages in thread From: Okash Khawaja @ UTC (permalink / raw) To: Samuel Thibault Cc: William Hubbs, Chris Brannon, Kirk Reiser, speakup, Okash Khawaja [-- Attachment #1: 12_make_ttyio_use_device_name --] [-- Type: text/plain, Size: 10577 bytes --] This patch introduces new module parameter, dev, which takes a string representing the device that the external synth is connected to, e.g. ttyS0, ttyUSB0 etc. This is then used to communicate with the synth. That way, speakup can support more than ttyS*. As of this patch, it only supports ttyS*, ttyUSB* and selected synths for lp*. dev parameter is only available for tty-migrated synths. Users will either use dev or ser as both serve same purpose. This patch maintains backward compatility by allowing ser to be specified. When both are specified, whichever is non-default, i.e. not ttyS0, is used. If both are non-default then dev is used. Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com> --- drivers/staging/speakup/speakup_acntsa.c | 3 +++ drivers/staging/speakup/speakup_apollo.c | 3 +++ drivers/staging/speakup/speakup_audptr.c | 3 +++ drivers/staging/speakup/speakup_bns.c | 3 +++ drivers/staging/speakup/speakup_decext.c | 3 +++ drivers/staging/speakup/speakup_dectlk.c | 3 +++ drivers/staging/speakup/speakup_dummy.c | 3 +++ drivers/staging/speakup/speakup_ltlk.c | 3 +++ drivers/staging/speakup/speakup_spkout.c | 3 +++ drivers/staging/speakup/speakup_txprt.c | 3 +++ drivers/staging/speakup/spk_ttyio.c | 15 +++++++-------- 11 files changed, 37 insertions(+), 8 deletions(-) --- a/drivers/staging/speakup/speakup_acntsa.c +++ b/drivers/staging/speakup/speakup_acntsa.c @@ -96,6 +96,7 @@ static struct spk_synth synth_acntsa = { .trigger = 50, .jiffies = 30, .full = 40000, + .dev = SYNTH_DEFAULT_DEV, .startup = SYNTH_START, .checkval = SYNTH_CHECK, .vars = vars, @@ -135,9 +136,11 @@ static int synth_probe(struct spk_synth } module_param_named(ser, synth_acntsa.ser, int, 0444); +module_param_named(dev, synth_acntsa.dev, charp, S_IRUGO); module_param_named(start, synth_acntsa.startup, short, 0444); MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); +MODULE_PARM_DESC(dev, "Set the device e.g. ttyUSB0, for the synthesizer."); MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded."); module_spk_synth(synth_acntsa); --- a/drivers/staging/speakup/speakup_apollo.c +++ b/drivers/staging/speakup/speakup_apollo.c @@ -105,6 +105,7 @@ static struct spk_synth synth_apollo = { .trigger = 50, .jiffies = 50, .full = 40000, + .dev = SYNTH_DEFAULT_DEV, .startup = SYNTH_START, .checkval = SYNTH_CHECK, .vars = vars, @@ -199,9 +200,11 @@ static void do_catch_up(struct spk_synth } module_param_named(ser, synth_apollo.ser, int, 0444); +module_param_named(dev, synth_apollo.dev, charp, S_IRUGO); module_param_named(start, synth_apollo.startup, short, 0444); MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); +MODULE_PARM_DESC(dev, "Set the device e.g. ttyUSB0, for the synthesizer."); MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded."); module_spk_synth(synth_apollo); --- a/drivers/staging/speakup/speakup_audptr.c +++ b/drivers/staging/speakup/speakup_audptr.c @@ -100,6 +100,7 @@ static struct spk_synth synth_audptr = { .trigger = 50, .jiffies = 30, .full = 18000, + .dev = SYNTH_DEFAULT_DEV, .startup = SYNTH_START, .checkval = SYNTH_CHECK, .vars = vars, @@ -162,9 +163,11 @@ static int synth_probe(struct spk_synth } module_param_named(ser, synth_audptr.ser, int, 0444); +module_param_named(dev, synth_audptr.dev, charp, S_IRUGO); module_param_named(start, synth_audptr.startup, short, 0444); MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); +MODULE_PARM_DESC(dev, "Set the device e.g. ttyUSB0, for the synthesizer."); MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded."); module_spk_synth(synth_audptr); --- a/drivers/staging/speakup/speakup_bns.c +++ b/drivers/staging/speakup/speakup_bns.c @@ -93,6 +93,7 @@ static struct spk_synth synth_bns = { .trigger = 50, .jiffies = 50, .full = 40000, + .dev = SYNTH_DEFAULT_DEV, .startup = SYNTH_START, .checkval = SYNTH_CHECK, .vars = vars, @@ -119,9 +120,11 @@ static struct spk_synth synth_bns = { }; module_param_named(ser, synth_bns.ser, int, 0444); +module_param_named(dev, synth_bns.dev, charp, S_IRUGO); module_param_named(start, synth_bns.startup, short, 0444); MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); +MODULE_PARM_DESC(dev, "Set the device e.g. ttyUSB0, for the synthesizer."); MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded."); module_spk_synth(synth_bns); --- a/drivers/staging/speakup/speakup_decext.c +++ b/drivers/staging/speakup/speakup_decext.c @@ -120,6 +120,7 @@ static struct spk_synth synth_decext = { .jiffies = 50, .full = 40000, .flags = SF_DEC, + .dev = SYNTH_DEFAULT_DEV, .startup = SYNTH_START, .checkval = SYNTH_CHECK, .vars = vars, @@ -226,9 +227,11 @@ static void synth_flush(struct spk_synth } module_param_named(ser, synth_decext.ser, int, 0444); +module_param_named(dev, synth_decext.dev, charp, S_IRUGO); module_param_named(start, synth_decext.startup, short, 0444); MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); +MODULE_PARM_DESC(dev, "Set the device e.g. ttyUSB0, for the synthesizer."); MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded."); module_spk_synth(synth_decext); --- a/drivers/staging/speakup/speakup_dectlk.c +++ b/drivers/staging/speakup/speakup_dectlk.c @@ -124,6 +124,7 @@ static struct spk_synth synth_dectlk = { .trigger = 50, .jiffies = 50, .full = 40000, + .dev = SYNTH_DEFAULT_DEV, .startup = SYNTH_START, .checkval = SYNTH_CHECK, .vars = vars, @@ -298,9 +299,11 @@ static void synth_flush(struct spk_synth } module_param_named(ser, synth_dectlk.ser, int, 0444); +module_param_named(dev, synth_dectlk.dev, charp, S_IRUGO); module_param_named(start, synth_dectlk.startup, short, 0444); MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); +MODULE_PARM_DESC(dev, "Set the device e.g. ttyUSB0, for the synthesizer."); MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded."); module_spk_synth(synth_dectlk); --- a/drivers/staging/speakup/speakup_dummy.c +++ b/drivers/staging/speakup/speakup_dummy.c @@ -95,6 +95,7 @@ static struct spk_synth synth_dummy = { .trigger = 50, .jiffies = 50, .full = 40000, + .dev = SYNTH_DEFAULT_DEV, .startup = SYNTH_START, .checkval = SYNTH_CHECK, .vars = vars, @@ -121,9 +122,11 @@ static struct spk_synth synth_dummy = { }; module_param_named(ser, synth_dummy.ser, int, 0444); +module_param_named(dev, synth_dummy.dev, charp, S_IRUGO); module_param_named(start, synth_dummy.startup, short, 0444); MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); +MODULE_PARM_DESC(dev, "Set the device e.g. ttyUSB0, for the synthesizer."); MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded."); module_spk_synth(synth_dummy); --- a/drivers/staging/speakup/speakup_ltlk.c +++ b/drivers/staging/speakup/speakup_ltlk.c @@ -107,6 +107,7 @@ static struct spk_synth synth_ltlk = { .trigger = 50, .jiffies = 50, .full = 40000, + .dev = SYNTH_DEFAULT_DEV, .startup = SYNTH_START, .checkval = SYNTH_CHECK, .vars = vars, @@ -166,9 +167,11 @@ static int synth_probe(struct spk_synth } module_param_named(ser, synth_ltlk.ser, int, 0444); +module_param_named(dev, synth_ltlk.dev, charp, S_IRUGO); module_param_named(start, synth_ltlk.startup, short, 0444); MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); +MODULE_PARM_DESC(dev, "Set the device e.g. ttyUSB0, for the synthesizer."); MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded."); module_spk_synth(synth_ltlk); --- a/drivers/staging/speakup/speakup_spkout.c +++ b/drivers/staging/speakup/speakup_spkout.c @@ -98,6 +98,7 @@ static struct spk_synth synth_spkout = { .trigger = 50, .jiffies = 50, .full = 40000, + .dev = SYNTH_DEFAULT_DEV, .startup = SYNTH_START, .checkval = SYNTH_CHECK, .vars = vars, @@ -130,9 +131,11 @@ static void synth_flush(struct spk_synth } module_param_named(ser, synth_spkout.ser, int, 0444); +module_param_named(dev, synth_spkout.dev, charp, S_IRUGO); module_param_named(start, synth_spkout.startup, short, 0444); MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); +MODULE_PARM_DESC(dev, "Set the device e.g. ttyUSB0, for the synthesizer."); MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded."); module_spk_synth(synth_spkout); --- a/drivers/staging/speakup/speakup_txprt.c +++ b/drivers/staging/speakup/speakup_txprt.c @@ -92,6 +92,7 @@ static struct spk_synth synth_txprt = { .trigger = 50, .jiffies = 50, .full = 40000, + .dev = SYNTH_DEFAULT_DEV, .startup = SYNTH_START, .checkval = SYNTH_CHECK, .vars = vars, @@ -118,9 +119,11 @@ static struct spk_synth synth_txprt = { }; module_param_named(ser, synth_txprt.ser, int, 0444); +module_param_named(dev, synth_txprt.dev, charp, S_IRUGO); module_param_named(start, synth_txprt.startup, short, 0444); MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); +MODULE_PARM_DESC(dev, "Set the device e.g. ttyUSB0, for the synthesizer."); MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded."); module_spk_synth(synth_txprt); --- a/drivers/staging/speakup/spk_ttyio.c +++ b/drivers/staging/speakup/spk_ttyio.c @@ -212,11 +212,12 @@ static inline void get_termios(struct tt up_read(&tty->termios_rwsem); } -static int spk_ttyio_initialise_ldisc(int ser) +static int spk_ttyio_initialise_ldisc(struct spk_synth *synth) { int ret = 0; struct tty_struct *tty; struct ktermios tmp_termios; + dev_t dev; ret = tty_register_ldisc(N_SPEAKUP, &spk_ttyio_ldisc_ops); if (ret) { @@ -224,13 +225,11 @@ static int spk_ttyio_initialise_ldisc(in return ret; } - if (ser < 0 || ser > (255 - 64)) { - pr_err("speakup: Invalid ser param. Must be between 0 and 191 inclusive.\n"); - return -EINVAL; - } + ret = get_dev_to_use(synth, &dev); + if (ret) + return ret; - /* TODO: support more than ttyS* */ - tty = tty_open_by_driver(MKDEV(4, (ser + 64)), NULL, NULL); + tty = tty_open_by_driver(dev, NULL, NULL); if (IS_ERR(tty)) return PTR_ERR(tty); @@ -341,7 +340,7 @@ static void spk_ttyio_flush_buffer(void) int spk_ttyio_synth_probe(struct spk_synth *synth) { - int rv = spk_ttyio_initialise_ldisc(synth->ser); + int rv = spk_ttyio_initialise_ldisc(synth); if (rv) return rv; ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [patch 2/2] staging: speakup: make ttyio synths use device name ` [patch 2/2] staging: speakup: make ttyio synths use device name Okash Khawaja @ ` Samuel Thibault 0 siblings, 0 replies; 27+ messages in thread From: Samuel Thibault @ UTC (permalink / raw) To: Okash Khawaja; +Cc: William Hubbs, Chris Brannon, Kirk Reiser, speakup Okash Khawaja, on sam. 10 juin 2017 12:24:12 +0100, wrote: > This patch introduces new module parameter, dev, which takes a string > representing the device that the external synth is connected to, e.g. > ttyS0, ttyUSB0 etc. This is then used to communicate with the synth. > That way, speakup can support more than ttyS*. As of this patch, it > only supports ttyS*, ttyUSB* and selected synths for lp*. dev parameter > is only available for tty-migrated synths. > > Users will either use dev or ser as both serve same purpose. This patch > maintains backward compatility by allowing ser to be specified. When > both are specified, whichever is non-default, i.e. not ttyS0, is used. > If both are non-default then dev is used. > > Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org> > --- > drivers/staging/speakup/speakup_acntsa.c | 3 +++ > drivers/staging/speakup/speakup_apollo.c | 3 +++ > drivers/staging/speakup/speakup_audptr.c | 3 +++ > drivers/staging/speakup/speakup_bns.c | 3 +++ > drivers/staging/speakup/speakup_decext.c | 3 +++ > drivers/staging/speakup/speakup_dectlk.c | 3 +++ > drivers/staging/speakup/speakup_dummy.c | 3 +++ > drivers/staging/speakup/speakup_ltlk.c | 3 +++ > drivers/staging/speakup/speakup_spkout.c | 3 +++ > drivers/staging/speakup/speakup_txprt.c | 3 +++ > drivers/staging/speakup/spk_ttyio.c | 15 +++++++-------- > 11 files changed, 37 insertions(+), 8 deletions(-) > > --- a/drivers/staging/speakup/speakup_acntsa.c > +++ b/drivers/staging/speakup/speakup_acntsa.c > @@ -96,6 +96,7 @@ static struct spk_synth synth_acntsa = { > .trigger = 50, > .jiffies = 30, > .full = 40000, > + .dev = SYNTH_DEFAULT_DEV, > .startup = SYNTH_START, > .checkval = SYNTH_CHECK, > .vars = vars, > @@ -135,9 +136,11 @@ static int synth_probe(struct spk_synth > } > > module_param_named(ser, synth_acntsa.ser, int, 0444); > +module_param_named(dev, synth_acntsa.dev, charp, S_IRUGO); > module_param_named(start, synth_acntsa.startup, short, 0444); > > MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); > +MODULE_PARM_DESC(dev, "Set the device e.g. ttyUSB0, for the synthesizer."); > MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded."); > > module_spk_synth(synth_acntsa); > --- a/drivers/staging/speakup/speakup_apollo.c > +++ b/drivers/staging/speakup/speakup_apollo.c > @@ -105,6 +105,7 @@ static struct spk_synth synth_apollo = { > .trigger = 50, > .jiffies = 50, > .full = 40000, > + .dev = SYNTH_DEFAULT_DEV, > .startup = SYNTH_START, > .checkval = SYNTH_CHECK, > .vars = vars, > @@ -199,9 +200,11 @@ static void do_catch_up(struct spk_synth > } > > module_param_named(ser, synth_apollo.ser, int, 0444); > +module_param_named(dev, synth_apollo.dev, charp, S_IRUGO); > module_param_named(start, synth_apollo.startup, short, 0444); > > MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); > +MODULE_PARM_DESC(dev, "Set the device e.g. ttyUSB0, for the synthesizer."); > MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded."); > > module_spk_synth(synth_apollo); > --- a/drivers/staging/speakup/speakup_audptr.c > +++ b/drivers/staging/speakup/speakup_audptr.c > @@ -100,6 +100,7 @@ static struct spk_synth synth_audptr = { > .trigger = 50, > .jiffies = 30, > .full = 18000, > + .dev = SYNTH_DEFAULT_DEV, > .startup = SYNTH_START, > .checkval = SYNTH_CHECK, > .vars = vars, > @@ -162,9 +163,11 @@ static int synth_probe(struct spk_synth > } > > module_param_named(ser, synth_audptr.ser, int, 0444); > +module_param_named(dev, synth_audptr.dev, charp, S_IRUGO); > module_param_named(start, synth_audptr.startup, short, 0444); > > MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); > +MODULE_PARM_DESC(dev, "Set the device e.g. ttyUSB0, for the synthesizer."); > MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded."); > > module_spk_synth(synth_audptr); > --- a/drivers/staging/speakup/speakup_bns.c > +++ b/drivers/staging/speakup/speakup_bns.c > @@ -93,6 +93,7 @@ static struct spk_synth synth_bns = { > .trigger = 50, > .jiffies = 50, > .full = 40000, > + .dev = SYNTH_DEFAULT_DEV, > .startup = SYNTH_START, > .checkval = SYNTH_CHECK, > .vars = vars, > @@ -119,9 +120,11 @@ static struct spk_synth synth_bns = { > }; > > module_param_named(ser, synth_bns.ser, int, 0444); > +module_param_named(dev, synth_bns.dev, charp, S_IRUGO); > module_param_named(start, synth_bns.startup, short, 0444); > > MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); > +MODULE_PARM_DESC(dev, "Set the device e.g. ttyUSB0, for the synthesizer."); > MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded."); > > module_spk_synth(synth_bns); > --- a/drivers/staging/speakup/speakup_decext.c > +++ b/drivers/staging/speakup/speakup_decext.c > @@ -120,6 +120,7 @@ static struct spk_synth synth_decext = { > .jiffies = 50, > .full = 40000, > .flags = SF_DEC, > + .dev = SYNTH_DEFAULT_DEV, > .startup = SYNTH_START, > .checkval = SYNTH_CHECK, > .vars = vars, > @@ -226,9 +227,11 @@ static void synth_flush(struct spk_synth > } > > module_param_named(ser, synth_decext.ser, int, 0444); > +module_param_named(dev, synth_decext.dev, charp, S_IRUGO); > module_param_named(start, synth_decext.startup, short, 0444); > > MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); > +MODULE_PARM_DESC(dev, "Set the device e.g. ttyUSB0, for the synthesizer."); > MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded."); > > module_spk_synth(synth_decext); > --- a/drivers/staging/speakup/speakup_dectlk.c > +++ b/drivers/staging/speakup/speakup_dectlk.c > @@ -124,6 +124,7 @@ static struct spk_synth synth_dectlk = { > .trigger = 50, > .jiffies = 50, > .full = 40000, > + .dev = SYNTH_DEFAULT_DEV, > .startup = SYNTH_START, > .checkval = SYNTH_CHECK, > .vars = vars, > @@ -298,9 +299,11 @@ static void synth_flush(struct spk_synth > } > > module_param_named(ser, synth_dectlk.ser, int, 0444); > +module_param_named(dev, synth_dectlk.dev, charp, S_IRUGO); > module_param_named(start, synth_dectlk.startup, short, 0444); > > MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); > +MODULE_PARM_DESC(dev, "Set the device e.g. ttyUSB0, for the synthesizer."); > MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded."); > > module_spk_synth(synth_dectlk); > --- a/drivers/staging/speakup/speakup_dummy.c > +++ b/drivers/staging/speakup/speakup_dummy.c > @@ -95,6 +95,7 @@ static struct spk_synth synth_dummy = { > .trigger = 50, > .jiffies = 50, > .full = 40000, > + .dev = SYNTH_DEFAULT_DEV, > .startup = SYNTH_START, > .checkval = SYNTH_CHECK, > .vars = vars, > @@ -121,9 +122,11 @@ static struct spk_synth synth_dummy = { > }; > > module_param_named(ser, synth_dummy.ser, int, 0444); > +module_param_named(dev, synth_dummy.dev, charp, S_IRUGO); > module_param_named(start, synth_dummy.startup, short, 0444); > > MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); > +MODULE_PARM_DESC(dev, "Set the device e.g. ttyUSB0, for the synthesizer."); > MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded."); > > module_spk_synth(synth_dummy); > --- a/drivers/staging/speakup/speakup_ltlk.c > +++ b/drivers/staging/speakup/speakup_ltlk.c > @@ -107,6 +107,7 @@ static struct spk_synth synth_ltlk = { > .trigger = 50, > .jiffies = 50, > .full = 40000, > + .dev = SYNTH_DEFAULT_DEV, > .startup = SYNTH_START, > .checkval = SYNTH_CHECK, > .vars = vars, > @@ -166,9 +167,11 @@ static int synth_probe(struct spk_synth > } > > module_param_named(ser, synth_ltlk.ser, int, 0444); > +module_param_named(dev, synth_ltlk.dev, charp, S_IRUGO); > module_param_named(start, synth_ltlk.startup, short, 0444); > > MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); > +MODULE_PARM_DESC(dev, "Set the device e.g. ttyUSB0, for the synthesizer."); > MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded."); > > module_spk_synth(synth_ltlk); > --- a/drivers/staging/speakup/speakup_spkout.c > +++ b/drivers/staging/speakup/speakup_spkout.c > @@ -98,6 +98,7 @@ static struct spk_synth synth_spkout = { > .trigger = 50, > .jiffies = 50, > .full = 40000, > + .dev = SYNTH_DEFAULT_DEV, > .startup = SYNTH_START, > .checkval = SYNTH_CHECK, > .vars = vars, > @@ -130,9 +131,11 @@ static void synth_flush(struct spk_synth > } > > module_param_named(ser, synth_spkout.ser, int, 0444); > +module_param_named(dev, synth_spkout.dev, charp, S_IRUGO); > module_param_named(start, synth_spkout.startup, short, 0444); > > MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); > +MODULE_PARM_DESC(dev, "Set the device e.g. ttyUSB0, for the synthesizer."); > MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded."); > > module_spk_synth(synth_spkout); > --- a/drivers/staging/speakup/speakup_txprt.c > +++ b/drivers/staging/speakup/speakup_txprt.c > @@ -92,6 +92,7 @@ static struct spk_synth synth_txprt = { > .trigger = 50, > .jiffies = 50, > .full = 40000, > + .dev = SYNTH_DEFAULT_DEV, > .startup = SYNTH_START, > .checkval = SYNTH_CHECK, > .vars = vars, > @@ -118,9 +119,11 @@ static struct spk_synth synth_txprt = { > }; > > module_param_named(ser, synth_txprt.ser, int, 0444); > +module_param_named(dev, synth_txprt.dev, charp, S_IRUGO); > module_param_named(start, synth_txprt.startup, short, 0444); > > MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); > +MODULE_PARM_DESC(dev, "Set the device e.g. ttyUSB0, for the synthesizer."); > MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded."); > > module_spk_synth(synth_txprt); > --- a/drivers/staging/speakup/spk_ttyio.c > +++ b/drivers/staging/speakup/spk_ttyio.c > @@ -212,11 +212,12 @@ static inline void get_termios(struct tt > up_read(&tty->termios_rwsem); > } > > -static int spk_ttyio_initialise_ldisc(int ser) > +static int spk_ttyio_initialise_ldisc(struct spk_synth *synth) > { > int ret = 0; > struct tty_struct *tty; > struct ktermios tmp_termios; > + dev_t dev; > > ret = tty_register_ldisc(N_SPEAKUP, &spk_ttyio_ldisc_ops); > if (ret) { > @@ -224,13 +225,11 @@ static int spk_ttyio_initialise_ldisc(in > return ret; > } > > - if (ser < 0 || ser > (255 - 64)) { > - pr_err("speakup: Invalid ser param. Must be between 0 and 191 inclusive.\n"); > - return -EINVAL; > - } > + ret = get_dev_to_use(synth, &dev); > + if (ret) > + return ret; > > - /* TODO: support more than ttyS* */ > - tty = tty_open_by_driver(MKDEV(4, (ser + 64)), NULL, NULL); > + tty = tty_open_by_driver(dev, NULL, NULL); > if (IS_ERR(tty)) > return PTR_ERR(tty); > > @@ -341,7 +340,7 @@ static void spk_ttyio_flush_buffer(void) > > int spk_ttyio_synth_probe(struct spk_synth *synth) > { > - int rv = spk_ttyio_initialise_ldisc(synth->ser); > + int rv = spk_ttyio_initialise_ldisc(synth); > > if (rv) > return rv; > -- Samuel $ du temp.iso 2,0T temp.iso $ ls temp.iso -l -r-xr-xr-x 1 samy thibault 16E 2003-03-22 14:44 temp.iso* -+- je vous dirai pas la marque de mon disque dur, na :p -+- ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [patch 0/2] staging: speakup: support more than ttyS* [patch 0/2] staging: speakup: support more than ttyS* Okash Khawaja ` [patch 1/2] staging: speakup: add function to convert dev name to number Okash Khawaja ` [patch 2/2] staging: speakup: make ttyio synths use device name Okash Khawaja @ ` Okash Khawaja ` Gregory Nowak 2 siblings, 1 reply; 27+ messages in thread From: Okash Khawaja @ UTC (permalink / raw) To: speakup On Sat, Jun 10, 2017 at 12:24:10PM +0100, Okash Khawaja wrote: > Hi, > > These patches extend speakup support to ttyS* and lp*. They introduce a > new module param dev whose purpose is similar to ser but instead of > taking serial port number as argument, it takes strings like ttyS0 or > ttyUSB0. First patch just adds functionality to convert such strings > into dev_t. Second patch makes use of that functionlity. I have updated the speakup-decext repo [1] to latest, including bns migration and support for more than ttyS*. Please do test with 'dev' module param. One thing I noticed in my testing is that when loading with incorrect 'dev' value several times in a row, it eventually succeeds in loading. That seems like an existing issue with synths[] array which caches already loaded synths. I am investigating it now. [1] https://github.com/bytefire/speakup-decext Cheers! Okash ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [patch 0/2] staging: speakup: support more than ttyS* ` [patch 0/2] staging: speakup: support more than ttyS* Okash Khawaja @ ` Gregory Nowak ` Okash Khawaja ` Okash Khawaja 0 siblings, 2 replies; 27+ messages in thread From: Gregory Nowak @ UTC (permalink / raw) To: speakup Okash and list, I tried building the modules from your repo, and am running into a compilation error. I'll describe what I did. I'm building on the same machine and in the same environment that I used for my previous speakup testing. This is on a devuan 1.0 system. 1. git clone https://github.com/bytefire/speakup-decext The repo cloned without issues. 2. Since the speakup-decext.txt file still mentions using the 4.10.9 kernel tree, I used the source I already had built previously, and just got rid of drivers/staging/speakup. 3. Move speakup2.tgz to drivers/staging, and extract it. All went ok. 4. cd to the root of the kernel source, and run make modules: CHK include/config/kernel.release CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h CHK include/generated/bounds.h CHK include/generated/timeconst.h CHK include/generated/asm-offsets.h CALL scripts/checksyscalls.sh CC [M] drivers/staging/speakup/speakup_acntpc.o drivers/staging/speakup/speakup_acntpc.c:313:42: error: expected ) before int module_param_hw_named(port, port_forced, int, ioport, 0444); ^ scripts/Makefile.build:300: recipe for target 'drivers/staging/speakup/speakup_acntpc.o' failed make[3]: *** [drivers/staging/speakup/speakup_acntpc.o] Error 1 scripts/Makefile.build:553: recipe for target 'drivers/staging/speakup' failed make[2]: *** [drivers/staging/speakup] Error 2 scripts/Makefile.build:553: recipe for target 'drivers/staging' failed make[1]: *** [drivers/staging] Error 2 Makefile:988: recipe for target 'drivers' failed make: *** [drivers] Error 2 What I find strange here is that the acntpc driver is for the internal isa card, so it shouldn't have been effected by the serial changes, correct? I don't need the acntpc module, so I could just remove it from the config, and go on. However, others who build a kernel using debian's default kernel config will have the module included, and will probably run into this. Thanks. Greg On Sat, Jun 10, 2017 at 12:29:29PM +0100, Okash Khawaja wrote: > On Sat, Jun 10, 2017 at 12:24:10PM +0100, Okash Khawaja wrote: > > Hi, > > > > These patches extend speakup support to ttyS* and lp*. They introduce a > > new module param dev whose purpose is similar to ser but instead of > > taking serial port number as argument, it takes strings like ttyS0 or > > ttyUSB0. First patch just adds functionality to convert such strings > > into dev_t. Second patch makes use of that functionlity. > > I have updated the speakup-decext repo [1] to latest, including bns > migration and support for more than ttyS*. Please do test with 'dev' > module param. > > One thing I noticed in my testing is that when loading with incorrect > 'dev' value several times in a row, it eventually succeeds in loading. > That seems like an existing issue with synths[] array which caches > already loaded synths. I am investigating it now. > > [1] https://github.com/bytefire/speakup-decext > > Cheers! > Okash > _______________________________________________ > Speakup mailing list > Speakup@linux-speakup.org > http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup -- web site: http://www.gregn.net gpg public key: http://www.gregn.net/pubkey.asc skype: gregn1 (authorization required, add me to your contacts list first) If we haven't been in touch before, e-mail me before adding me to your contacts. -- Free domains: http://www.eu.org/ or mail dns-manager@EU.org ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [patch 0/2] staging: speakup: support more than ttyS* ` Gregory Nowak @ ` Okash Khawaja ` Okash Khawaja 1 sibling, 0 replies; 27+ messages in thread From: Okash Khawaja @ UTC (permalink / raw) To: Speakup is a screen review system for Linux.; +Cc: speakup Hey Greg, Thanks for that. You're right, acntpc shouldn't have been affected. I will investigate this today. Cheers, Okash > On 14 Jun 2017, at 05:50, Gregory Nowak <greg@gregn.net> wrote: > > Okash and list, I tried building the modules from your repo, and am > running into a compilation error. I'll describe what I did. I'm > building on the same machine and in the same environment that I used > for my previous speakup testing. This is on a devuan 1.0 system. > > 1. git clone https://github.com/bytefire/speakup-decext > The repo cloned without issues. > > 2. Since the speakup-decext.txt file still mentions using the 4.10.9 > kernel tree, I used the source I already had built previously, and > just got rid of drivers/staging/speakup. > > 3. Move speakup2.tgz to drivers/staging, and extract it. All went ok. > > 4. cd to the root of the kernel source, and run make modules: > > CHK include/config/kernel.release > CHK include/generated/uapi/linux/version.h > CHK include/generated/utsrelease.h > CHK include/generated/bounds.h > CHK include/generated/timeconst.h > CHK include/generated/asm-offsets.h > CALL scripts/checksyscalls.sh > CC [M] drivers/staging/speakup/speakup_acntpc.o > drivers/staging/speakup/speakup_acntpc.c:313:42: error: expected ) > before int > module_param_hw_named(port, port_forced, int, ioport, 0444); > ^ > scripts/Makefile.build:300: recipe for target > 'drivers/staging/speakup/speakup_acntpc.o' failed > make[3]: *** [drivers/staging/speakup/speakup_acntpc.o] Error 1 > scripts/Makefile.build:553: recipe for target > 'drivers/staging/speakup' failed > make[2]: *** [drivers/staging/speakup] Error 2 > scripts/Makefile.build:553: recipe for target 'drivers/staging' failed > make[1]: *** [drivers/staging] Error 2 > Makefile:988: recipe for target 'drivers' failed > make: *** [drivers] Error 2 > > What I find strange here is that the acntpc driver is for the internal > isa card, so it shouldn't have been effected by the serial changes, > correct? > > I don't need the acntpc module, so I could just remove it from the > config, and go on. However, others who build a kernel using debian's > default kernel config will have the module included, and will probably > run into this. Thanks. > > Greg > > >> On Sat, Jun 10, 2017 at 12:29:29PM +0100, Okash Khawaja wrote: >>> On Sat, Jun 10, 2017 at 12:24:10PM +0100, Okash Khawaja wrote: >>> Hi, >>> >>> These patches extend speakup support to ttyS* and lp*. They introduce a >>> new module param dev whose purpose is similar to ser but instead of >>> taking serial port number as argument, it takes strings like ttyS0 or >>> ttyUSB0. First patch just adds functionality to convert such strings >>> into dev_t. Second patch makes use of that functionlity. >> >> I have updated the speakup-decext repo [1] to latest, including bns >> migration and support for more than ttyS*. Please do test with 'dev' >> module param. >> >> One thing I noticed in my testing is that when loading with incorrect >> 'dev' value several times in a row, it eventually succeeds in loading. >> That seems like an existing issue with synths[] array which caches >> already loaded synths. I am investigating it now. >> >> [1] https://github.com/bytefire/speakup-decext >> >> Cheers! >> Okash >> _______________________________________________ >> Speakup mailing list >> Speakup@linux-speakup.org >> http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup > > -- > web site: http://www.gregn.net > gpg public key: http://www.gregn.net/pubkey.asc > skype: gregn1 > (authorization required, add me to your contacts list first) > If we haven't been in touch before, e-mail me before adding me to your contacts. > > -- > Free domains: http://www.eu.org/ or mail dns-manager@EU.org > _______________________________________________ > Speakup mailing list > Speakup@linux-speakup.org > http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [patch 0/2] staging: speakup: support more than ttyS* ` Gregory Nowak ` Okash Khawaja @ ` Okash Khawaja ` Gregory Nowak 1 sibling, 1 reply; 27+ messages in thread From: Okash Khawaja @ UTC (permalink / raw) To: Speakup is a screen review system for Linux. Hi all and Greg, I could compile acntpc on local machine which inlcudes these changes. But I didn't investigate this further because of the changes being made to this patch set. I will update the repo with latest changes and also make sure that acntpc compilation is fixed. Thanks, Okash On Tue, Jun 13, 2017 at 09:50:35PM -0700, Gregory Nowak wrote: > Okash and list, I tried building the modules from your repo, and am > running into a compilation error. I'll describe what I did. I'm > building on the same machine and in the same environment that I used > for my previous speakup testing. This is on a devuan 1.0 system. > > 1. git clone https://github.com/bytefire/speakup-decext > The repo cloned without issues. > > 2. Since the speakup-decext.txt file still mentions using the 4.10.9 > kernel tree, I used the source I already had built previously, and > just got rid of drivers/staging/speakup. > > 3. Move speakup2.tgz to drivers/staging, and extract it. All went ok. > > 4. cd to the root of the kernel source, and run make modules: > > CHK include/config/kernel.release > CHK include/generated/uapi/linux/version.h > CHK include/generated/utsrelease.h > CHK include/generated/bounds.h > CHK include/generated/timeconst.h > CHK include/generated/asm-offsets.h > CALL scripts/checksyscalls.sh > CC [M] drivers/staging/speakup/speakup_acntpc.o > drivers/staging/speakup/speakup_acntpc.c:313:42: error: expected ) > before int > module_param_hw_named(port, port_forced, int, ioport, 0444); > ^ > scripts/Makefile.build:300: recipe for target > 'drivers/staging/speakup/speakup_acntpc.o' failed > make[3]: *** [drivers/staging/speakup/speakup_acntpc.o] Error 1 > scripts/Makefile.build:553: recipe for target > 'drivers/staging/speakup' failed > make[2]: *** [drivers/staging/speakup] Error 2 > scripts/Makefile.build:553: recipe for target 'drivers/staging' failed > make[1]: *** [drivers/staging] Error 2 > Makefile:988: recipe for target 'drivers' failed > make: *** [drivers] Error 2 > > What I find strange here is that the acntpc driver is for the internal > isa card, so it shouldn't have been effected by the serial changes, > correct? > > I don't need the acntpc module, so I could just remove it from the > config, and go on. However, others who build a kernel using debian's > default kernel config will have the module included, and will probably > run into this. Thanks. > > Greg > > > On Sat, Jun 10, 2017 at 12:29:29PM +0100, Okash Khawaja wrote: > > On Sat, Jun 10, 2017 at 12:24:10PM +0100, Okash Khawaja wrote: > > > Hi, > > > > > > These patches extend speakup support to ttyS* and lp*. They introduce a > > > new module param dev whose purpose is similar to ser but instead of > > > taking serial port number as argument, it takes strings like ttyS0 or > > > ttyUSB0. First patch just adds functionality to convert such strings > > > into dev_t. Second patch makes use of that functionlity. > > > > I have updated the speakup-decext repo [1] to latest, including bns > > migration and support for more than ttyS*. Please do test with 'dev' > > module param. > > > > One thing I noticed in my testing is that when loading with incorrect > > 'dev' value several times in a row, it eventually succeeds in loading. > > That seems like an existing issue with synths[] array which caches > > already loaded synths. I am investigating it now. > > > > [1] https://github.com/bytefire/speakup-decext > > > > Cheers! > > Okash > > _______________________________________________ > > Speakup mailing list > > Speakup@linux-speakup.org > > http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup > > -- > web site: http://www.gregn.net > gpg public key: http://www.gregn.net/pubkey.asc > skype: gregn1 > (authorization required, add me to your contacts list first) > If we haven't been in touch before, e-mail me before adding me to your contacts. > > -- > Free domains: http://www.eu.org/ or mail dns-manager@EU.org > _______________________________________________ > Speakup mailing list > Speakup@linux-speakup.org > http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [patch 0/2] staging: speakup: support more than ttyS* ` Okash Khawaja @ ` Gregory Nowak ` Test repo updated Okash Khawaja 0 siblings, 1 reply; 27+ messages in thread From: Gregory Nowak @ UTC (permalink / raw) To: Speakup is a screen review system for Linux. Ok, perhaps I should have tried with a fresh kernel source, or a version higher than 4.10.9. I'll try again once the speakup-decext repo is updated with the latest changes. Thanks. Greg On Sun, Jun 18, 2017 at 10:53:24AM +0100, Okash Khawaja wrote: > Hi all and Greg, > > I could compile acntpc on local machine which inlcudes these changes. > But I didn't investigate this further because of the changes being made > to this patch set. I will update the repo with latest changes and also > make sure that acntpc compilation is fixed. > > Thanks, > Okash > -- web site: http://www.gregn.net gpg public key: http://www.gregn.net/pubkey.asc skype: gregn1 (authorization required, add me to your contacts list first) If we haven't been in touch before, e-mail me before adding me to your contacts. -- Free domains: http://www.eu.org/ or mail dns-manager@EU.org ^ permalink raw reply [flat|nested] 27+ messages in thread
* Test repo updated ` Gregory Nowak @ ` Okash Khawaja ` Gregory Nowak ` Gregory Nowak 0 siblings, 2 replies; 27+ messages in thread From: Okash Khawaja @ UTC (permalink / raw) To: Speakup is a screen review system for Linux. Hi, I've updated the test repo [1] upto the latest patch. This includes support for ttyUSB* and lp*. Greg, I've tested it with 4.10.9 and made sure acntpc compiles. Thanks, Okash [1] https://github.com/bytefire/speakup-decext On Sun, Jun 18, 2017 at 04:45:18PM -0700, Gregory Nowak wrote: > Ok, perhaps I should have tried with a fresh kernel source, or a version > higher than 4.10.9. I'll try again once the speakup-decext repo is > updated with the latest changes. Thanks. > > Greg > > > On Sun, Jun 18, 2017 at 10:53:24AM +0100, Okash Khawaja wrote: > > Hi all and Greg, > > > > I could compile acntpc on local machine which inlcudes these changes. > > But I didn't investigate this further because of the changes being made > > to this patch set. I will update the repo with latest changes and also > > make sure that acntpc compilation is fixed. > > > > Thanks, > > Okash > > > > > -- > web site: http://www.gregn.net > gpg public key: http://www.gregn.net/pubkey.asc > skype: gregn1 > (authorization required, add me to your contacts list first) > If we haven't been in touch before, e-mail me before adding me to your contacts. > > -- > Free domains: http://www.eu.org/ or mail dns-manager@EU.org > _______________________________________________ > Speakup mailing list > Speakup@linux-speakup.org > http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Test repo updated ` Test repo updated Okash Khawaja @ ` Gregory Nowak ` Okash Khawaja ` Gregory Nowak 1 sibling, 1 reply; 27+ messages in thread From: Gregory Nowak @ UTC (permalink / raw) To: Speakup is a screen review system for Linux. Thanks, much appreciated. I should be able to get to it during the weekend, and will report back once I do. Greg On Wed, Jun 21, 2017 at 09:11:13AM +0100, Okash Khawaja wrote: > Hi, > > I've updated the test repo [1] upto the latest patch. This includes > support for ttyUSB* and lp*. > > Greg, I've tested it with 4.10.9 and made sure acntpc compiles. > > Thanks, > Okash > > [1] https://github.com/bytefire/speakup-decext > > On Sun, Jun 18, 2017 at 04:45:18PM -0700, Gregory Nowak wrote: > > Ok, perhaps I should have tried with a fresh kernel source, or a version > > higher than 4.10.9. I'll try again once the speakup-decext repo is > > updated with the latest changes. Thanks. > > > > Greg > > > > > > On Sun, Jun 18, 2017 at 10:53:24AM +0100, Okash Khawaja wrote: > > > Hi all and Greg, > > > > > > I could compile acntpc on local machine which inlcudes these changes. > > > But I didn't investigate this further because of the changes being made > > > to this patch set. I will update the repo with latest changes and also > > > make sure that acntpc compilation is fixed. > > > > > > Thanks, > > > Okash > > > > > > > > > -- > > web site: http://www.gregn.net > > gpg public key: http://www.gregn.net/pubkey.asc > > skype: gregn1 > > (authorization required, add me to your contacts list first) > > If we haven't been in touch before, e-mail me before adding me to your contacts. > > > > -- > > Free domains: http://www.eu.org/ or mail dns-manager@EU.org > > _______________________________________________ > > Speakup mailing list > > Speakup@linux-speakup.org > > http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup > _______________________________________________ > Speakup mailing list > Speakup@linux-speakup.org > http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup -- web site: http://www.gregn.net gpg public key: http://www.gregn.net/pubkey.asc skype: gregn1 (authorization required, add me to your contacts list first) If we haven't been in touch before, e-mail me before adding me to your contacts. -- Free domains: http://www.eu.org/ or mail dns-manager@EU.org ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Test repo updated ` Gregory Nowak @ ` Okash Khawaja ` Gregory Nowak 0 siblings, 1 reply; 27+ messages in thread From: Okash Khawaja @ UTC (permalink / raw) To: Speakup is a screen review system for Linux. Cc: Speakup is a screen review system for Linux. Please note that tty-export.patch has been updated. > On 21 Jun 2017, at 23:23, Gregory Nowak <greg@gregn.net> wrote: > > Thanks, much appreciated. I should be able to get to it during the > weekend, and will report back once I do. > > Greg > > >> On Wed, Jun 21, 2017 at 09:11:13AM +0100, Okash Khawaja wrote: >> Hi, >> >> I've updated the test repo [1] upto the latest patch. This includes >> support for ttyUSB* and lp*. >> >> Greg, I've tested it with 4.10.9 and made sure acntpc compiles. >> >> Thanks, >> Okash >> >> [1] https://github.com/bytefire/speakup-decext >> >>> On Sun, Jun 18, 2017 at 04:45:18PM -0700, Gregory Nowak wrote: >>> Ok, perhaps I should have tried with a fresh kernel source, or a version >>> higher than 4.10.9. I'll try again once the speakup-decext repo is >>> updated with the latest changes. Thanks. >>> >>> Greg >>> >>> >>>> On Sun, Jun 18, 2017 at 10:53:24AM +0100, Okash Khawaja wrote: >>>> Hi all and Greg, >>>> >>>> I could compile acntpc on local machine which inlcudes these changes. >>>> But I didn't investigate this further because of the changes being made >>>> to this patch set. I will update the repo with latest changes and also >>>> make sure that acntpc compilation is fixed. >>>> >>>> Thanks, >>>> Okash >>> >>> >>> -- >>> web site: http://www.gregn.net >>> gpg public key: http://www.gregn.net/pubkey.asc >>> skype: gregn1 >>> (authorization required, add me to your contacts list first) >>> If we haven't been in touch before, e-mail me before adding me to your contacts. >>> >>> -- >>> Free domains: http://www.eu.org/ or mail dns-manager@EU.org >>> _______________________________________________ >>> Speakup mailing list >>> Speakup@linux-speakup.org >>> http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup >> _______________________________________________ >> Speakup mailing list >> Speakup@linux-speakup.org >> http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup > > -- > web site: http://www.gregn.net > gpg public key: http://www.gregn.net/pubkey.asc > skype: gregn1 > (authorization required, add me to your contacts list first) > If we haven't been in touch before, e-mail me before adding me to your contacts. > > -- > Free domains: http://www.eu.org/ or mail dns-manager@EU.org > _______________________________________________ > Speakup mailing list > Speakup@linux-speakup.org > http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Test repo updated ` Okash Khawaja @ ` Gregory Nowak 0 siblings, 0 replies; 27+ messages in thread From: Gregory Nowak @ UTC (permalink / raw) To: Speakup is a screen review system for Linux. Ok. I just replaced drivers/staging/speakup last time. I'll start with a fresh source tree. Greg On Wed, Jun 21, 2017 at 11:37:13PM +0100, Okash Khawaja wrote: > Please note that tty-export.patch has been updated. > > > On 21 Jun 2017, at 23:23, Gregory Nowak <greg@gregn.net> wrote: > > > > Thanks, much appreciated. I should be able to get to it during the > > weekend, and will report back once I do. > > > > Greg > > > > > >> On Wed, Jun 21, 2017 at 09:11:13AM +0100, Okash Khawaja wrote: > >> Hi, > >> > >> I've updated the test repo [1] upto the latest patch. This includes > >> support for ttyUSB* and lp*. > >> > >> Greg, I've tested it with 4.10.9 and made sure acntpc compiles. > >> > >> Thanks, > >> Okash > >> > >> [1] https://github.com/bytefire/speakup-decext > >> > >>> On Sun, Jun 18, 2017 at 04:45:18PM -0700, Gregory Nowak wrote: > >>> Ok, perhaps I should have tried with a fresh kernel source, or a version > >>> higher than 4.10.9. I'll try again once the speakup-decext repo is > >>> updated with the latest changes. Thanks. > >>> > >>> Greg > >>> > >>> > >>>> On Sun, Jun 18, 2017 at 10:53:24AM +0100, Okash Khawaja wrote: > >>>> Hi all and Greg, > >>>> > >>>> I could compile acntpc on local machine which inlcudes these changes. > >>>> But I didn't investigate this further because of the changes being made > >>>> to this patch set. I will update the repo with latest changes and also > >>>> make sure that acntpc compilation is fixed. > >>>> > >>>> Thanks, > >>>> Okash > >>> > >>> > >>> -- > >>> web site: http://www.gregn.net > >>> gpg public key: http://www.gregn.net/pubkey.asc > >>> skype: gregn1 > >>> (authorization required, add me to your contacts list first) > >>> If we haven't been in touch before, e-mail me before adding me to your contacts. > >>> > >>> -- > >>> Free domains: http://www.eu.org/ or mail dns-manager@EU.org > >>> _______________________________________________ > >>> Speakup mailing list > >>> Speakup@linux-speakup.org > >>> http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup > >> _______________________________________________ > >> Speakup mailing list > >> Speakup@linux-speakup.org > >> http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup > > > > -- > > web site: http://www.gregn.net > > gpg public key: http://www.gregn.net/pubkey.asc > > skype: gregn1 > > (authorization required, add me to your contacts list first) > > If we haven't been in touch before, e-mail me before adding me to your contacts. > > > > -- > > Free domains: http://www.eu.org/ or mail dns-manager@EU.org > > _______________________________________________ > > Speakup mailing list > > Speakup@linux-speakup.org > > http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup > _______________________________________________ > Speakup mailing list > Speakup@linux-speakup.org > http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup -- web site: http://www.gregn.net gpg public key: http://www.gregn.net/pubkey.asc skype: gregn1 (authorization required, add me to your contacts list first) If we haven't been in touch before, e-mail me before adding me to your contacts. -- Free domains: http://www.eu.org/ or mail dns-manager@EU.org ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Test repo updated ` Test repo updated Okash Khawaja ` Gregory Nowak @ ` Gregory Nowak ` Samuel Thibault ` Samuel Thibault 1 sibling, 2 replies; 27+ messages in thread From: Gregory Nowak @ UTC (permalink / raw) To: speakup Okash and list, the first good news is that acntpc does indeed compile. The second good news is that the bns driver works fine just like it did before using dev=ttyS0, and dev=ttyUSB0. The bad news is that the bns driver doesn't work using dev=lp0 with the braille blazer (blazer) connected to the parallel port using a bidirectional cable, and set to speak whatever comes in through the parallel port. When I booted up, the modules ppdev, parport, and parport_pc were already loaded. When I loaded speakup_bns, I got this: modprobe: ERROR: could not insert 'speakup_bns': No such device The dmesg output showed: [ 381.404108] speakup_bns: module is from the staging directory, the quality is unknown, you have been warned. [ 381.405251] synth probe [ 381.405260] bns: device probe failed At that point, I noticed that /dev/lp0 was missing. I fixed that by modprobe lp, and tried speakup_bns again with the same results as before. I then tried echoing data to /dev/lp0: echo hello >/dev/lp0 and: echo "hello" >/dev/lp0 both just came back with the prompt, and no speech from the blazer. Trying: cat /dev/lp0 came back with input/output error, which I expected. Leaving everything connected and setup exactly as it was, I rebooted into windows, and setup the windows screenreader to use the bns driver through the parallel port. This resulted in speech from the blazer. I just realized as I type this that I didn't enable echo's escape processing, and try issuing a \n or a \r\n. The blazer almost certainly needs one of those to speak what was just sent to it. I'll try that, and will report back if the results are different. Also, I believe the bns driver expects to read stuff back from the device before it loads. It obviously won't be able to read anything back when using the parallel port. I assume this was taken into account? Finally, I also have a usb to parallel converter here. Just to see what happens, I hooked it up, and it showed up as /dev/usb/lp0 using the usblp module. Echoing the same things as before to that produced the same results; shell prompt with no speech from the blazer. Using cat however just sat there with no input coming, which isn't what I expected. Since I wasn't sure if dev=/dev/usb/lp0 would be processed, I created a softlink linking /dev/usb/lp0 to /dev/lp1, and passed dev=lp1 to the speakup_bns module. The results were exactly the same as with the built-in parallel port. I'll try echoing \n and \r\n to the blazer, and will report back if that produces speech. Is there some way to debug the bns driver to see what it is sending, and getting back? Thanks for reading, and thanks Okash for your work. The serial and usb support works, and that's awesome. It would be nice if the parallel port worked too, but not a huge deal if it doesn't when all is said and done. Greg On WEd, Jun 21, 2017 at 09:11:13AM +0100, Okash Khawaja wrote: > Hi, > > I've updated the test repo [1] upto the latest patch. This includes > support for ttyUSB* and lp*. > > Greg, I've tested it with 4.10.9 and made sure acntpc compiles. > > Thanks, > Okash > > [1] https://github.com/bytefire/speakup-decext > > On Sun, Jun 18, 2017 at 04:45:18PM -0700, Gregory Nowak wrote: > > Ok, perhaps I should have tried with a fresh kernel source, or a version > > higher than 4.10.9. I'll try again once the speakup-decext repo is > > updated with the latest changes. Thanks. > > > > Greg > > > > > > On Sun, Jun 18, 2017 at 10:53:24AM +0100, Okash Khawaja wrote: > > > Hi all and Greg, > > > > > > I could compile acntpc on local machine which inlcudes these changes. > > > But I didn't investigate this further because of the changes being made > > > to this patch set. I will update the repo with latest changes and also > > > make sure that acntpc compilation is fixed. > > > > > > Thanks, > > > Okash > > > > > > > > > -- > > web site: http://www.gregn.net > > gpg public key: http://www.gregn.net/pubkey.asc > > skype: gregn1 > > (authorization required, add me to your contacts list first) > > If we haven't been in touch before, e-mail me before adding me to your contacts. > > > > -- > > Free domains: http://www.eu.org/ or mail dns-manager@EU.org > > _______________________________________________ > > Speakup mailing list > > Speakup@linux-speakup.org > > http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup > _______________________________________________ > Speakup mailing list > Speakup@linux-speakup.org > http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup -- web site: http://www.gregn.net gpg public key: http://www.gregn.net/pubkey.asc skype: gregn1 (authorization required, add me to your contacts list first) If we haven't been in touch before, e-mail me before adding me to your contacts. -- Free domains: http://www.eu.org/ or mail dns-manager@EU.org ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Test repo updated ` Gregory Nowak @ ` Samuel Thibault ` Gregory Nowak ` Okash Khawaja ` Samuel Thibault 1 sibling, 2 replies; 27+ messages in thread From: Samuel Thibault @ UTC (permalink / raw) To: Speakup is a screen review system for Linux. Hello, Gregory Nowak, on lun. 26 juin 2017 15:35:08 -0700, wrote: > Using cat however just sat there with no input coming, which isn't > what I expected. Indeed, that's a bug that should be reported to the USB lp driver maintainer. > Since I wasn't sure if dev=/dev/usb/lp0 would be processed, I created > a softlink linking /dev/usb/lp0 to /dev/lp1, The speakup module does not read /dev, it uses the tty names. Could you tell us the content of /proc/tty/drivers? Perhaps it should then be dev=usb/lp0 > I'll try echoing \n and \r\n to the blazer, and will report back if > that produces speech. Is there some way to debug the bns driver to see > what it is sending, and getting back? In the case at stake, it's not even the bns driver which is reporting the error, but the ttyio code itself. You can try to put printk() calls in the ttyio probe function, to check which path it is following. Samuel ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Test repo updated ` Samuel Thibault @ ` Gregory Nowak ` Samuel Thibault ` Okash Khawaja 1 sibling, 1 reply; 27+ messages in thread From: Gregory Nowak @ UTC (permalink / raw) To: speakup On Tue, Jun 27, 2017 at 12:46:09AM +0200, Samuel Thibault wrote: > Gregory Nowak, on lun. 26 juin 2017 15:35:08 -0700, wrote: > > Using cat however just sat there with no input coming, which isn't > > what I expected. > > Indeed, that's a bug that should be reported to the USB lp driver > maintainer. Are the chips in those converters able to recognize if they're connected to a bidirectional device, and block reads if they aren't? The converter I'm using is ieee1284 capable. If the chip in that converter can't recognize if the connected device is bidirectional or not, then I'm thinking it's better to allow reads in case the device is bidirectional > > > Since I wasn't sure if dev=/dev/usb/lp0 would be processed, I created > > a softlink linking /dev/usb/lp0 to /dev/lp1, > > The speakup module does not read /dev, it uses the tty names. > > Could you tell us the content of /proc/tty/drivers? /dev/tty /dev/tty 5 0 system:/dev/tty /dev/console /dev/console 5 1 system:console /dev/ptmx /dev/ptmx 5 2 system /dev/vc/0 /dev/vc/0 4 0 system:vtmaster serial /dev/ttyS 4 64-95 serial pty_slave /dev/pts 136 0-1048575 pty:slave pty_master /dev/ptm 128 0-1048575 pty:master unknown /dev/tty 4 1-63 console Greg -- web site: http://www.gregn.net gpg public key: http://www.gregn.net/pubkey.asc skype: gregn1 (authorization required, add me to your contacts list first) If we haven't been in touch before, e-mail me before adding me to your contacts. -- Free domains: http://www.eu.org/ or mail dns-manager@EU.org ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Test repo updated ` Gregory Nowak @ ` Samuel Thibault 0 siblings, 0 replies; 27+ messages in thread From: Samuel Thibault @ UTC (permalink / raw) To: Speakup is a screen review system for Linux. Gregory Nowak, on lun. 26 juin 2017 20:55:29 -0700, wrote: > Are the chips in those converters able to recognize if they're > connected to a bidirectional device, and block reads if they aren't? > The converter I'm using is ieee1284 capable. If the chip in that > converter can't recognize if the connected device is bidirectional or > not, then I'm thinking it's better to allow reads in case the device > is bidirectional Ah, yes. I don't know. > > > Since I wasn't sure if dev=/dev/usb/lp0 would be processed, I created > > > a softlink linking /dev/usb/lp0 to /dev/lp1, > > > > The speakup module does not read /dev, it uses the tty names. > > > > Could you tell us the content of /proc/tty/drivers? > > /dev/tty /dev/tty 5 0 system:/dev/tty > /dev/console /dev/console 5 1 system:console > /dev/ptmx /dev/ptmx 5 2 system > /dev/vc/0 /dev/vc/0 4 0 system:vtmaster > serial /dev/ttyS 4 64-95 serial > pty_slave /dev/pts 136 0-1048575 pty:slave > pty_master /dev/ptm 128 0-1048575 pty:master > unknown /dev/tty 4 1-63 console So no lp indeed. No wonder it's not recognized. Samuel ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Test repo updated ` Samuel Thibault ` Gregory Nowak @ ` Okash Khawaja 1 sibling, 0 replies; 27+ messages in thread From: Okash Khawaja @ UTC (permalink / raw) To: Samuel Thibault; +Cc: Speakup is a screen review system for Linux. On Tue, Jun 27, 2017 at 12:46:09AM +0200, Samuel Thibault wrote: > Hello, > > Gregory Nowak, on lun. 26 juin 2017 15:35:08 -0700, wrote: > > Using cat however just sat there with no input coming, which isn't > > what I expected. > > Indeed, that's a bug that should be reported to the USB lp driver > maintainer. > > > Since I wasn't sure if dev=/dev/usb/lp0 would be processed, I created > > a softlink linking /dev/usb/lp0 to /dev/lp1, > > The speakup module does not read /dev, it uses the tty names. > > Could you tell us the content of /proc/tty/drivers? > > Perhaps it should then be dev=usb/lp0 > > > I'll try echoing \n and \r\n to the blazer, and will report back if > > that produces speech. Is there some way to debug the bns driver to see > > what it is sending, and getting back? > > In the case at stake, it's not even the bns driver which is reporting > the error, but the ttyio code itself. You can try to put printk() calls > in the ttyio probe function, to check which path it is following. Yes it's probably from spk_ttyio code failing to find a tty driver for device whose name starts with "lp". spk_ttyio calls into a function in tty which scans tty_drivers list for a driver which deals with lp devices. If no such driver is registered with tty layer - which would be the case if lp doesn't show as tty device, as Samuel pointed out in the other email - then ENODEV is returned. Thanks, Okash ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Test repo updated ` Gregory Nowak ` Samuel Thibault @ ` Samuel Thibault ` Gregory Nowak ` Okash Khawaja 1 sibling, 2 replies; 27+ messages in thread From: Samuel Thibault @ UTC (permalink / raw) To: Speakup is a screen review system for Linux. Gregory Nowak, on lun. 26 juin 2017 15:35:08 -0700, wrote: > [ 381.404108] speakup_bns: module is from the staging directory, the > quality is unknown, you have been warned. > [ 381.405251] synth probe > [ 381.405260] bns: device probe failed > > At that point, I noticed that /dev/lp0 was missing. I fixed that by > modprobe lp, and tried speakup_bns again with the same results as > before. Mmm, Okash, did you have the opportunity to test ttyio with lp? Contrary to what I expected, it seems like it doesn't actually expose a tty layer, it doesn't seem to show up in /proc/tty/drivers, and stty -a < /dev/lp0 fails. So I'm afraid perhaps we can't actually use ttyio for parallel port access, and thus we have to use the parport interface. I'd say that's not a priority, though, and we should focus on making ttyUSB0 work for now. Samuel ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Test repo updated ` Samuel Thibault @ ` Gregory Nowak ` Okash Khawaja 1 sibling, 0 replies; 27+ messages in thread From: Gregory Nowak @ UTC (permalink / raw) To: speakup On Tue, Jun 27, 2017 at 01:07:47AM +0200, Samuel Thibault wrote: > I'd say that's not a priority, though, and we should focus on making > ttyUSB0 work for now. Agreed. Like I said, would be nice, but not a big deal. Greg -- web site: http://www.gregn.net gpg public key: http://www.gregn.net/pubkey.asc skype: gregn1 (authorization required, add me to your contacts list first) If we haven't been in touch before, e-mail me before adding me to your contacts. -- Free domains: http://www.eu.org/ or mail dns-manager@EU.org ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Test repo updated ` Samuel Thibault ` Gregory Nowak @ ` Okash Khawaja ` Samuel Thibault 1 sibling, 1 reply; 27+ messages in thread From: Okash Khawaja @ UTC (permalink / raw) To: Samuel Thibault; +Cc: Speakup is a screen review system for Linux. Hi, On Tue, Jun 27, 2017 at 01:07:47AM +0200, Samuel Thibault wrote: > Gregory Nowak, on lun. 26 juin 2017 15:35:08 -0700, wrote: > > [ 381.404108] speakup_bns: module is from the staging directory, the > > quality is unknown, you have been warned. > > [ 381.405251] synth probe > > [ 381.405260] bns: device probe failed > > > > At that point, I noticed that /dev/lp0 was missing. I fixed that by > > modprobe lp, and tried speakup_bns again with the same results as > > before. > > Mmm, Okash, did you have the opportunity to test ttyio with lp? No I didn't test with lp. But from what you've mentioned below, would you say we remove lp support from the patches until parport is implemented? > Contrary to what I expected, it seems like it doesn't actually expose a > tty layer, it doesn't seem to show up in /proc/tty/drivers, and stty -a > < /dev/lp0 fails. So I'm afraid perhaps we can't actually use ttyio for > parallel port access, and thus we have to use the parport interface. > I'd say that's not a priority, though, and we should focus on making > ttyUSB0 work for now. Thanks, Okash ^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: Test repo updated ` Okash Khawaja @ ` Samuel Thibault 0 siblings, 0 replies; 27+ messages in thread From: Samuel Thibault @ UTC (permalink / raw) To: Okash Khawaja; +Cc: Speakup is a screen review system for Linux. Okash Khawaja, on mar. 27 juin 2017 09:57:13 +0100, wrote: > On Tue, Jun 27, 2017 at 01:07:47AM +0200, Samuel Thibault wrote: > > Gregory Nowak, on lun. 26 juin 2017 15:35:08 -0700, wrote: > > > [ 381.404108] speakup_bns: module is from the staging directory, the > > > quality is unknown, you have been warned. > > > [ 381.405251] synth probe > > > [ 381.405260] bns: device probe failed > > > > > > At that point, I noticed that /dev/lp0 was missing. I fixed that by > > > modprobe lp, and tried speakup_bns again with the same results as > > > before. > > > > Mmm, Okash, did you have the opportunity to test ttyio with lp? > No I didn't test with lp. But from what you've mentioned below, would > you say we remove lp support from the patches until parport is > implemented? Yes :/ Samuel ^ permalink raw reply [flat|nested] 27+ messages in thread
* [patch 0/2] staging: speakup: support more than ttyS* @ okash.khawaja 0 siblings, 0 replies; 27+ messages in thread From: okash.khawaja @ UTC (permalink / raw) To: Greg Kroah-Hartman, Jiri Slaby, Samuel Thibault, linux-kernel Cc: William Hubbs, Chris Brannon, Kirk Reiser, speakup, devel Hi, These patches extend speakup support to ttyUSB* and lp*. They introduce a new module param dev whose function is similar to ser but instead of taking serial port number as argument, it takes strings like ttyS0 or ttyUSB0. First patch just adds functionality to convert such strings into dev_t. Second patch makes use of that functionlity. Thanks, Okash ^ permalink raw reply [flat|nested] 27+ messages in thread
end of thread, other threads:[~ UTC | newest]
Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[patch 0/2] staging: speakup: support more than ttyS* Okash Khawaja
` [patch 1/2] staging: speakup: add function to convert dev name to number Okash Khawaja
` Samuel Thibault
` Okash Khawaja
` Samuel Thibault
` Okash Khawaja
` [patch 2/2] staging: speakup: make ttyio synths use device name Okash Khawaja
` Samuel Thibault
` [patch 0/2] staging: speakup: support more than ttyS* Okash Khawaja
` Gregory Nowak
` Okash Khawaja
` Okash Khawaja
` Gregory Nowak
` Test repo updated Okash Khawaja
` Gregory Nowak
` Okash Khawaja
` Gregory Nowak
` Gregory Nowak
` Samuel Thibault
` Gregory Nowak
` Samuel Thibault
` Okash Khawaja
` Samuel Thibault
` Gregory Nowak
` Okash Khawaja
` Samuel Thibault
[patch 0/2] staging: speakup: support more than ttyS* okash.khawaja
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).