Skip to content

Commit d7012df

Browse files
sthibaulgregkh
authored andcommitted
speakup: Fix var_id_t values and thus keymap
commit d97a9d7 ("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. Fixes: d97a9d7 ("staging/speakup: Add inflection synth parameter") Cc: stable@vger.kernel.org Reported-by: Kirk Reiser <kirk@reisers.ca> Reported-by: Gregory Nowak <greg@gregn.net> Tested-by: Gregory Nowak <greg@gregn.net> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Link: https://lore.kernel.org/r/20201012160646.qmdo4eqtj24hpch4@function Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 9d516aa commit d7012df

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

drivers/accessibility/speakup/spk_types.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ enum {
3232
E_NEW_DEFAULT,
3333
};
3434

35+
/*
36+
* Note: add new members at the end, speakupmap.h depends on the values of the
37+
* enum starting from SPELL_DELAY (see inc_dec_var)
38+
*/
3539
enum var_id_t {
3640
VERSION = 0, SYNTH, SILENT, SYNTH_DIRECT,
3741
KEYMAP, CHARS,
@@ -42,9 +46,9 @@ enum var_id_t {
4246
SAY_CONTROL, SAY_WORD_CTL, NO_INTERRUPT, KEY_ECHO,
4347
SPELL_DELAY, PUNC_LEVEL, READING_PUNC,
4448
ATTRIB_BLEEP, BLEEPS,
45-
RATE, PITCH, INFLECTION, VOL, TONE, PUNCT, VOICE, FREQUENCY, LANG,
49+
RATE, PITCH, VOL, TONE, PUNCT, VOICE, FREQUENCY, LANG,
4650
DIRECT, PAUSE,
47-
CAPS_START, CAPS_STOP, CHARTAB,
51+
CAPS_START, CAPS_STOP, CHARTAB, INFLECTION,
4852
MAXVARS
4953
};
5054

0 commit comments

Comments
 (0)