Re: [HELP REQUESTED from the community] Was: Staging status of speakup

2019-07-25 Thread John Covici
from zero slowest,
> to nine fastest.
> 
> tone
> Gets or sets the tone of the speech synthesizer. The range for the
> soft driver seems to be 0-2. This seems to make no difference if using
> espeak and the espeakup connector. I'm not sure even if espeakup
> supports different tonalities.
> 
> trigger_time
> Don't know.
> 
> voice
> Gets or sets the voice used by the synthesizer if the synthesizer can
> speak in more than one voice. The range for the soft driver is
> 0-7. Note that while espeak supports multiple voices, this parameter
> will not set the voice when the espeakup connector is used between
> speakup and espeak.
> 
> vol
> Gets or sets the volume of the speech synthesizer. Range is 0-9, with
> zero being the softest, and nine being the loudest.
> 
> Additions, clarifications, and corrections are welcome and
> appreciated.
> 
> 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-mana...@eu.org
> ___
> Speakup mailing list
> spea...@linux-speakup.org
> http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

 John Covici wb2una
 cov...@ccs.covici.com
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [HELP REQUESTED from the community] Was: Staging status of speakup

2019-07-25 Thread John Covici
I think the program is genmap, I  have it in my init sequence, but I
am not sure it does anything at this point.

On Thu, 25 Jul 2019 00:04:07 -0400,
Chris Brannon wrote:
> 
> Gregory Nowak  writes:
> 
> > keymap
> > I believe this is the currently active kernel keymap. I'm not sure of
> > the format, probably what dumpkeys(1) and showkey(1) use. Echoing
> > different values here should allow for remapping speakup's review
> > commands besides remapping the keyboard as a whole.
> 
> AFAIK the Speakup keymap is just for remapping keys to Speakup
> functions.  It's a binary format, not related to dumpkeys etc.  You need
> a special program to compile a textual keymap into something that can be
> loaded into /sys/accessibility/speakup/keymap.  I may have source for
> that lying around here somewhere.  This is "here there be dragons"
> territory.  I think the only specification of the format is in the
> source code.
> 
> -- Chris
> ___
> Speakup mailing list
> spea...@linux-speakup.org
> http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

 John Covici wb2una
 cov...@ccs.covici.com
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: speakup: refactor synths array to use a list

2018-06-11 Thread John Covici
Maybe I can do it, I have a kernel with speakup, using 4.9.43.  Will
the patch fit there?

On Mon, 11 Jun 2018 18:57:03 -0400,
Samuel Thibault wrote:
> 
> [1  ]
> Hello,
> 
> Samuel Thibault, le mer. 06 juin 2018 15:26:28 +0200, a ecrit:
> > I'd also rather see it tested in the real wild before committing. Could
> > somebody on the speakup mailing list test the patch? (which I have
> > re-attached as a file for conveniency).
> 
> Anybody up for testing please?
> 
> If people want to see speakup get mainlined instead of staging, please
> help.
> 
> Samuel
> [2 patch ]
> ---
>  drivers/staging/speakup/spk_types.h |  2 ++
>  drivers/staging/speakup/synth.c | 40 ++---
>  2 files changed, 15 insertions(+), 27 deletions(-)
> 
> diff --git a/drivers/staging/speakup/spk_types.h 
> b/drivers/staging/speakup/spk_types.h
> index 3e082dc3d45c..a2fc72c29894 100644
> --- a/drivers/staging/speakup/spk_types.h
> +++ b/drivers/staging/speakup/spk_types.h
> @@ -160,6 +160,8 @@ struct spk_io_ops {
>  };
>  
>  struct spk_synth {
> + struct list_head node;
> +
>   const char *name;
>   const char *version;
>   const char *long_name;
> diff --git a/drivers/staging/speakup/synth.c b/drivers/staging/speakup/synth.c
> index 7deeb7061018..25f259ee4ffc 100644
> --- a/drivers/staging/speakup/synth.c
> +++ b/drivers/staging/speakup/synth.c
> @@ -18,8 +18,7 @@
>  #include "speakup.h"
>  #include "serialio.h"
>  
> -#define MAXSYNTHS   16  /* Max number of synths in array. */
> -static struct spk_synth *synths[MAXSYNTHS + 1];
> +static LIST_HEAD(synths);
>  struct spk_synth *synth;
>  char spk_pitch_buff[32] = "";
>  static int module_status;
> @@ -355,9 +354,8 @@ struct var_t synth_time_vars[] = {
>  /* called by: speakup_init() */
>  int synth_init(char *synth_name)
>  {
> - int i;
>   int ret = 0;
> - struct spk_synth *synth = NULL;
> + struct spk_synth *tmp, *synth = NULL;
>  
>   if (!synth_name)
>   return 0;
> @@ -371,9 +369,10 @@ int synth_init(char *synth_name)
>  
>   mutex_lock(&spk_mutex);
>   /* First, check if we already have it loaded. */
> - for (i = 0; i < MAXSYNTHS && synths[i]; i++)
> - if (strcmp(synths[i]->name, synth_name) == 0)
> - synth = synths[i];
> + list_for_each_entry(tmp, &synths, node) {
> + if (strcmp(tmp->name, synth_name) == 0)
> + synth = tmp;
> + }
>  
>   /* If we got one, initialize it now. */
>   if (synth)
> @@ -448,29 +447,23 @@ void synth_release(void)
>  /* called by: all_driver_init() */
>  int synth_add(struct spk_synth *in_synth)
>  {
> - int i;
>   int status = 0;
> + struct spk_synth *tmp;
>  
>   mutex_lock(&spk_mutex);
> - for (i = 0; i < MAXSYNTHS && synths[i]; i++)
> - /* synth_remove() is responsible for rotating the array down */
> - if (in_synth == synths[i]) {
> +
> + list_for_each_entry(tmp, &synths, node) {
> + if (tmp == in_synth) {
>   mutex_unlock(&spk_mutex);
>   return 0;
>   }
> - if (i == MAXSYNTHS) {
> - pr_warn("Error: attempting to add a synth past end of array\n");
> - mutex_unlock(&spk_mutex);
> - return -1;
>   }
>  
>   if (in_synth->startup)
>   status = do_synth_init(in_synth);
>  
> - if (!status) {
> - synths[i++] = in_synth;
> - synths[i] = NULL;
> - }
> + if (!status)
> + list_add_tail(&in_synth->node, &synths);
>  
>   mutex_unlock(&spk_mutex);
>   return status;
> @@ -479,17 +472,10 @@ EXPORT_SYMBOL_GPL(synth_add);
>  
>  void synth_remove(struct spk_synth *in_synth)
>  {
> - int i;
> -
>   mutex_lock(&spk_mutex);
>   if (synth == in_synth)
>   synth_release();
> - for (i = 0; synths[i]; i++) {
> - if (in_synth == synths[i])
> - break;
> -     }
> - for ( ; synths[i]; i++) /* compress table */
> - synths[i] = synths[i + 1];
> + list_del(&in_synth->node);
>   module_status = 0;
>   mutex_unlock(&spk_mutex);
>  }
> -- 
> 2.17.1
> [3  ]
> ___
> Speakup mailing list
> spea...@linux-speakup.org
> http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

 John Covici wb2una
 cov...@ccs.covici.com
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel