summaryrefslogtreecommitdiffstats
path: root/drivers/staging/speakup
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2017-03-22 00:55:31 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-23 14:00:58 +0100
commite1f28c86a22d2c923bcc18abb22874482ce55951 (patch)
tree594628e14482f3ad755ecf726cb6aebb4a956fcb /drivers/staging/speakup
parentc831c583f8d93185928096b6f3e4735c013f1969 (diff)
downloadblackbird-op-linux-e1f28c86a22d2c923bcc18abb22874482ce55951.tar.gz
blackbird-op-linux-e1f28c86a22d2c923bcc18abb22874482ce55951.zip
speakup: Fix spurious space pronunciation on spelling letters
This gathers emitting the caps start string, space, spelled letter string, space, and caps stop string, into one printf, to avoid sending to the synth a space character alone, which the synth would then pronounce. Similarly, emit space along control-letter and letter spelling. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Tested-by: Zahari Yurukov <zahari.yurukov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/speakup')
-rw-r--r--drivers/staging/speakup/main.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c
index f280e22d7e15..b81ca8e09542 100644
--- a/drivers/staging/speakup/main.c
+++ b/drivers/staging/speakup/main.c
@@ -449,20 +449,17 @@ static void speak_char(u16 ch)
pr_info("speak_char: cp == NULL!\n");
return;
}
- synth_buffer_add(SPACE);
if (IS_CHAR(ch, B_CAP)) {
spk_pitch_shift++;
- synth_printf("%s", spk_str_caps_start);
- synth_printf("%s", cp);
- synth_printf("%s", spk_str_caps_stop);
+ synth_printf("%s %s %s",
+ spk_str_caps_start, cp, spk_str_caps_stop);
} else {
if (*cp == '^') {
- synth_printf("%s", spk_msg_get(MSG_CTRL));
cp++;
- }
- synth_printf("%s", cp);
+ synth_printf(" %s%s ", spk_msg_get(MSG_CTRL), cp);
+ } else
+ synth_printf(" %s ", cp);
}
- synth_buffer_add(SPACE);
}
static u16 get_char(struct vc_data *vc, u16 *pos, u_char *attribs)
OpenPOWER on IntegriCloud