Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3529215rwe; Mon, 29 Aug 2022 13:51:11 -0700 (PDT) X-Google-Smtp-Source: AA6agR481+3MhuVPhpvLFZHmIkzieMgaHg9bIzyQlS6et6RLv45+IP4PfR3wS9UqvC8S20mz54XA X-Received: by 2002:a05:6a00:2292:b0:538:1d03:9818 with SMTP id f18-20020a056a00229200b005381d039818mr8568524pfe.42.1661806271008; Mon, 29 Aug 2022 13:51:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661806271; cv=none; d=google.com; s=arc-20160816; b=WuxjxTIcuTfwSLbJkj//UXobGi6r3O+sKxXY5j430q5SdMMQotuQjn+xBSWbkN7AAA M1JhWFbaEr3hUgJZ/kuOUr4uVj7gIzP0R126rMcs6n4nFG+yWgZZ0pptCYM0oYmDEe9q WquEhkxaW9biib7Febol9zKSJIJ9HYnEcXq7MEt57+mlXsvVdGRa4/JgCTMXceXtwc3H S8nuh8rkh6ZZOoHnGJttaBBHFvYrEvDCNBvhGhYGWJGewyDYUn654S3XzwHWxp2LJ21T r6Zvg06JbyEsXOnRFOysMIkDSjVCz/nkrE/V5FhLC4Jn5ZfPb6XyItw2cxjXcge5OMVC PKYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:content-disposition:mime-version :mail-followup-to:message-id:subject:cc:to:from:date; bh=aUPCN9DxpSLSNuIHbW1QaaHCu/RErcVlmto+lLWF68E=; b=N334ldhKjoVg6SvU+t7D7cymCe5YSL7xktbxIeafGaDGR7weIWQfM+fDcqwWpjFZOL 4NdEfgMRSWThHQCdbKoguqPIM25j76zBgSfI86byCpTldwKEuW5iTzfLXB0eQdF5jfV/ ECUtH0Ge7BnV7xY8kDkTtPXkubuL7PQUdMpjrD7CVZfB6qpLyGfFUU/Sza3l1V/3poSC q8GtmLohXVgT2NlfH5Z5c0dsgBukgGrR1cIv+k+xthh5Rd7ociLoWlWB6Jkp5SOG1b1h DrDcs4iksESxvmKrYjOxj3sLqQ2o1H/FBr43YUlEGxwgtMeuusbaEY54e48rF6tI1LSQ SHoQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m12-20020a170902db0c00b00172b6a88428si10909369plx.24.2022.08.29.13.51.00; Mon, 29 Aug 2022 13:51:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230144AbiH2Ugy (ORCPT + 99 others); Mon, 29 Aug 2022 16:36:54 -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-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: NeoMutt/20170609 (1.8.3) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; static struct var_t vars[] = { + /* DIRECT is put first so that module_param_named can access it easily */ + { DIRECT, .u.n = {NULL, 0, 0, 1, 0, 0, NULL } }, + { CAPS_START, .u.s = {"\x01+3p" } }, { CAPS_STOP, .u.s = {"\x01-3p" } }, { PAUSE, .u.n = {"\x01P" } }, @@ -45,7 +48,6 @@ static struct var_t vars[] = { { PUNCT, .u.n = {"\x01%db", 0, 0, 3, 0, 0, NULL } }, { VOICE, .u.n = {"\x01%do", 0, 0, 7, 0, 0, NULL } }, { FREQUENCY, .u.n = {"\x01%df", 5, 0, 9, 0, 0, NULL } }, - { DIRECT, .u.n = {NULL, 0, 0, 1, 0, 0, NULL } }, V_LAST_VAR }; @@ -449,8 +451,10 @@ static int softsynth_adjust(struct spk_s } module_param_named(start, synth_soft.startup, short, 0444); +module_param_named(direct, vars[0].u.n.default_val, int, 0444); MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded."); +MODULE_PARM_DESC(direct, "Set the direct variable on load."); module_spk_synth(synth_soft);