All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] speakup: Fix var_id_t values and thus keymap
@ 2020-10-12 16:06 Samuel Thibault
  2020-11-03 14:31 ` Samuel Thibault
  0 siblings, 1 reply; 4+ messages in thread
From: Samuel Thibault @ 2020-10-12 16:06 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, speakup

commit d97a9d7aea04 ("staging/speakup: Add inflection synth parameter")
introduced a new "inflection" speakup parameter next to "pitch", but
the values of the var_id_t enum are actually used by the keymap tables
so we must not renumber them. The effect was that notably the volume
control shortcut (speakup-1 or 2) was actually changing the inflection.

This moves the INFLECTION value at the end of the var_id_t enum to
fix back the enum values. This also adds a warning about it.

Cc: stable@vger.kernel.org
Reported-by: Kirk Reiser <kirk@reisers.ca>
Reported-by: Gregory Nowak <greg@gregn.net>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Tested-by: Gregory Nowak <greg@gregn.net>
Fixes: d97a9d7aea04 ("staging/speakup: Add inflection synth parameter")
---
 drivers/accessibility/speakup/spk_types.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/accessibility/speakup/spk_types.h b/drivers/accessibility/speakup/spk_types.h
index 7398f1196e10..91fca3033a45 100644
--- a/drivers/accessibility/speakup/spk_types.h
+++ b/drivers/accessibility/speakup/spk_types.h
@@ -32,6 +32,10 @@ enum {
 	E_NEW_DEFAULT,
 };
 
+/*
+ * Note: add new members at the end, speakupmap.h depends on the values of the
+ * enum starting from SPELL_DELAY (see inc_dec_var)
+ */
 enum var_id_t {
 	VERSION = 0, SYNTH, SILENT, SYNTH_DIRECT,
 	KEYMAP, CHARS,
@@ -42,9 +46,9 @@ enum var_id_t {
 	SAY_CONTROL, SAY_WORD_CTL, NO_INTERRUPT, KEY_ECHO,
 	SPELL_DELAY, PUNC_LEVEL, READING_PUNC,
 	ATTRIB_BLEEP, BLEEPS,
-	RATE, PITCH, INFLECTION, VOL, TONE, PUNCT, VOICE, FREQUENCY, LANG,
+	RATE, PITCH, VOL, TONE, PUNCT, VOICE, FREQUENCY, LANG,
 	DIRECT, PAUSE,
-	CAPS_START, CAPS_STOP, CHARTAB,
+	CAPS_START, CAPS_STOP, CHARTAB, INFLECTION,
 	MAXVARS
 };
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] speakup: Fix var_id_t values and thus keymap
  2020-10-12 16:06 [PATCH] speakup: Fix var_id_t values and thus keymap Samuel Thibault
@ 2020-11-03 14:31 ` Samuel Thibault
  2020-11-03 14:41   ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Samuel Thibault @ 2020-11-03 14:31 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, speakup

Ping?

This is a change that should got into 5.10, in the meanwhile the bug
(appeared in 5.8) is very inconvenient for users.

Samuel

Samuel Thibault, le lun. 12 oct. 2020 18:06:46 +0200, a ecrit:
> commit d97a9d7aea04 ("staging/speakup: Add inflection synth parameter")
> introduced a new "inflection" speakup parameter next to "pitch", but
> the values of the var_id_t enum are actually used by the keymap tables
> so we must not renumber them. The effect was that notably the volume
> control shortcut (speakup-1 or 2) was actually changing the inflection.
> 
> This moves the INFLECTION value at the end of the var_id_t enum to
> fix back the enum values. This also adds a warning about it.
> 
> Cc: stable@vger.kernel.org
> Reported-by: Kirk Reiser <kirk@reisers.ca>
> Reported-by: Gregory Nowak <greg@gregn.net>
> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
> Tested-by: Gregory Nowak <greg@gregn.net>
> Fixes: d97a9d7aea04 ("staging/speakup: Add inflection synth parameter")
> ---
>  drivers/accessibility/speakup/spk_types.h | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/accessibility/speakup/spk_types.h b/drivers/accessibility/speakup/spk_types.h
> index 7398f1196e10..91fca3033a45 100644
> --- a/drivers/accessibility/speakup/spk_types.h
> +++ b/drivers/accessibility/speakup/spk_types.h
> @@ -32,6 +32,10 @@ enum {
>  	E_NEW_DEFAULT,
>  };
>  
> +/*
> + * Note: add new members at the end, speakupmap.h depends on the values of the
> + * enum starting from SPELL_DELAY (see inc_dec_var)
> + */
>  enum var_id_t {
>  	VERSION = 0, SYNTH, SILENT, SYNTH_DIRECT,
>  	KEYMAP, CHARS,
> @@ -42,9 +46,9 @@ enum var_id_t {
>  	SAY_CONTROL, SAY_WORD_CTL, NO_INTERRUPT, KEY_ECHO,
>  	SPELL_DELAY, PUNC_LEVEL, READING_PUNC,
>  	ATTRIB_BLEEP, BLEEPS,
> -	RATE, PITCH, INFLECTION, VOL, TONE, PUNCT, VOICE, FREQUENCY, LANG,
> +	RATE, PITCH, VOL, TONE, PUNCT, VOICE, FREQUENCY, LANG,
>  	DIRECT, PAUSE,
> -	CAPS_START, CAPS_STOP, CHARTAB,
> +	CAPS_START, CAPS_STOP, CHARTAB, INFLECTION,
>  	MAXVARS
>  };
>  
> -- 
> 2.20.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] speakup: Fix var_id_t values and thus keymap
  2020-11-03 14:31 ` Samuel Thibault
@ 2020-11-03 14:41   ` Greg KH
  2020-11-03 14:43     ` Samuel Thibault
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2020-11-03 14:41 UTC (permalink / raw)
  To: Samuel Thibault, linux-kernel, speakup

On Tue, Nov 03, 2020 at 03:31:42PM +0100, Samuel Thibault wrote:
> Ping?
> 
> This is a change that should got into 5.10, in the meanwhile the bug
> (appeared in 5.8) is very inconvenient for users.

It's in my to-apply queue, sorry, it's really long at the moment.  Don't
worry, it's not lost...

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] speakup: Fix var_id_t values and thus keymap
  2020-11-03 14:41   ` Greg KH
@ 2020-11-03 14:43     ` Samuel Thibault
  0 siblings, 0 replies; 4+ messages in thread
From: Samuel Thibault @ 2020-11-03 14:43 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel, speakup

Greg KH, le mar. 03 nov. 2020 15:41:19 +0100, a ecrit:
> On Tue, Nov 03, 2020 at 03:31:42PM +0100, Samuel Thibault wrote:
> > This is a change that should got into 5.10, in the meanwhile the bug
> > (appeared in 5.8) is very inconvenient for users.
> 
> It's in my to-apply queue, sorry, it's really long at the moment.

Ok, np, juste making sure!

Thanks,
Samuel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-03 14:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-12 16:06 [PATCH] speakup: Fix var_id_t values and thus keymap Samuel Thibault
2020-11-03 14:31 ` Samuel Thibault
2020-11-03 14:41   ` Greg KH
2020-11-03 14:43     ` Samuel Thibault

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.