From nobody Tue Apr 7 09:07:22 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B4F4ECAAD2 for ; Mon, 29 Aug 2022 20:36:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230241AbiH2Ug4 (ORCPT ); Mon, 29 Aug 2022 16:36:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230064AbiH2Ugl (ORCPT ); Mon, 29 Aug 2022 16:36:41 -0400 Received: from sonata.ens-lyon.org (sonata.ens-lyon.org [140.77.166.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C307F9AFF8 for ; Mon, 29 Aug 2022 13:36:28 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id C71A120116; Mon, 29 Aug 2022 22:36:25 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D-uSzOWntrx7; Mon, 29 Aug 2022 22:36:25 +0200 (CEST) Received: from begin (lfbn-bor-1-376-208.w109-215.abo.wanadoo.fr [109.215.91.208]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id C719F200D2; Mon, 29 Aug 2022 22:36:25 +0200 (CEST) Received: from samy by begin with local (Exim 4.96) (envelope-from ) id 1oSlUf-00DEh3-2t; Mon, 29 Aug 2022 22:36:25 +0200 Date: Mon, 29 Aug 2022 22:36:25 +0200 From: Samuel Thibault To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, speakup@linux-speakup.org Subject: speakup_soft: Add direct module parameter Message-ID: <20220829203625.6s6x57miowu4p664@begin> Mail-Followup-To: Samuel Thibault , gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, speakup@linux-speakup.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20170609 (1.8.3) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" For non-english speech synthesis, it is often desirable to make speakup_soft pass text directly. Adding a direct parameter to the speakup_soft module allows to easily set that at boot, rather than setting the sys variable after boot. Signed-off-by: Samuel Thibault --- drivers/accessibility/speakup/speakup_soft.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/drivers/accessibility/speakup/speakup_soft.c +++ b/drivers/accessibility/speakup/speakup_soft.c @@ -34,6 +34,9 @@ static int init_pos; static int misc_registered; =20 static struct var_t vars[] =3D { + /* DIRECT is put first so that module_param_named can access it easily */ + { DIRECT, .u.n =3D {NULL, 0, 0, 1, 0, 0, NULL } }, + { CAPS_START, .u.s =3D {"\x01+3p" } }, { CAPS_STOP, .u.s =3D {"\x01-3p" } }, { PAUSE, .u.n =3D {"\x01P" } }, @@ -45,7 +48,6 @@ static struct var_t vars[] =3D { { PUNCT, .u.n =3D {"\x01%db", 0, 0, 3, 0, 0, NULL } }, { VOICE, .u.n =3D {"\x01%do", 0, 0, 7, 0, 0, NULL } }, { FREQUENCY, .u.n =3D {"\x01%df", 5, 0, 9, 0, 0, NULL } }, - { DIRECT, .u.n =3D {NULL, 0, 0, 1, 0, 0, NULL } }, V_LAST_VAR }; =20 @@ -449,8 +451,10 @@ static int softsynth_adjust(struct spk_s } =20 module_param_named(start, synth_soft.startup, short, 0444); +module_param_named(direct, vars[0].u.n.default_val, int, 0444); =20 MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded."); +MODULE_PARM_DESC(direct, "Set the direct variable on load."); =20 module_spk_synth(synth_soft);