So, where'd the volume controls get to?

Samuel Thibault samuel.thibault at ens-lyon.org
Sat Oct 10 15:36:36 EDT 2020


Hello,

Kirk Reiser, le sam. 10 oct. 2020 14:56:38 -0400, a ecrit:
> So, if you didn't move the controls who did? Curious minds and all
> that.

It seems that it's the introduction of the inflection variable that
changed the values of the var_id_t enum, and these happen to be used by
the default speakupmap.h, thus shifting all meanings...

Would you be able to try the attached patch?

Samuel
-------------- next part --------------
commit d9ef20b2061908f968d21579efd5b28d668f528a
Author: Samuel Thibault <samuel.thibault at ens-lyon.org>
Date:   Sat Oct 10 21:30:45 2020 +0200

    speakup: Fix keymap
    
    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 then 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.
    
    Fixes: d97a9d7aea04 ("staging/speakup: Add inflection synth parameter")
    Reported-by: Kirk Reiser <kirk at reisers.ca>
    Signed-off-by: Samuel Thibault <samuel.thibault at ens-lyon.org>

diff --git a/drivers/accessibility/speakup/spk_types.h b/drivers/accessibility/speakup/spk_types.h
index 7398f1196e10..37163118485a 100644
--- a/drivers/accessibility/speakup/spk_types.h
+++ b/drivers/accessibility/speakup/spk_types.h
@@ -32,6 +32,8 @@ enum {
 	E_NEW_DEFAULT,
 };
 
+/* XXX: add new members after, 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 +44,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
 };
 


More information about the Speakup mailing list