2022-08-23 22:28:22

by Samuel Thibault

[permalink] [raw]
Subject: [patch 1/2] speakup-dummy: Add support for PUNCT variable

This allows to debug the update of the punctuation level.

Signed-off-by: Samuel Thibault <[email protected]>

Index: linux/drivers/accessibility/speakup/speakup_dummy.c
===================================================================
--- linux.orig/drivers/accessibility/speakup/speakup_dummy.c
+++ linux/drivers/accessibility/speakup/speakup_dummy.c
@@ -27,6 +27,7 @@ static struct var_t vars[] = {
{ INFLECTION, .u.n = {"INFLECTION %d\n", 8, 0, 16, 0, 0, NULL } },
{ VOL, .u.n = {"VOL %d\n", 8, 0, 16, 0, 0, NULL } },
{ TONE, .u.n = {"TONE %d\n", 8, 0, 16, 0, 0, NULL } },
+ { PUNCT, .u.n = {"PUNCT %d\n", 0, 0, 3, 0, 0, NULL } },
{ DIRECT, .u.n = {NULL, 0, 0, 1, 0, 0, NULL } },
V_LAST_VAR
};
@@ -42,6 +43,8 @@ static struct kobj_attribute pitch_attri
__ATTR(pitch, 0644, spk_var_show, spk_var_store);
static struct kobj_attribute inflection_attribute =
__ATTR(inflection, 0644, spk_var_show, spk_var_store);
+static struct kobj_attribute punct_attribute =
+ __ATTR(punct, 0644, spk_var_show, spk_var_store);
static struct kobj_attribute rate_attribute =
__ATTR(rate, 0644, spk_var_show, spk_var_store);
static struct kobj_attribute tone_attribute =
@@ -69,6 +72,7 @@ static struct attribute *synth_attrs[] =
&caps_stop_attribute.attr,
&pitch_attribute.attr,
&inflection_attribute.attr,
+ &punct_attribute.attr,
&rate_attribute.attr,
&tone_attribute.attr,
&vol_attribute.attr,


2022-09-01 16:48:39

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [patch 1/2] speakup-dummy: Add support for PUNCT variable

On Wed, Aug 24, 2022 at 12:25:02AM +0200, Samuel Thibault wrote:
> This allows to debug the update of the punctuation level.
>
> Signed-off-by: Samuel Thibault <[email protected]>
>
> Index: linux/drivers/accessibility/speakup/speakup_dummy.c
> ===================================================================
> --- linux.orig/drivers/accessibility/speakup/speakup_dummy.c
> +++ linux/drivers/accessibility/speakup/speakup_dummy.c
> @@ -27,6 +27,7 @@ static struct var_t vars[] = {
> { INFLECTION, .u.n = {"INFLECTION %d\n", 8, 0, 16, 0, 0, NULL } },
> { VOL, .u.n = {"VOL %d\n", 8, 0, 16, 0, 0, NULL } },
> { TONE, .u.n = {"TONE %d\n", 8, 0, 16, 0, 0, NULL } },
> + { PUNCT, .u.n = {"PUNCT %d\n", 0, 0, 3, 0, 0, NULL } },
> { DIRECT, .u.n = {NULL, 0, 0, 1, 0, 0, NULL } },
> V_LAST_VAR
> };
> @@ -42,6 +43,8 @@ static struct kobj_attribute pitch_attri
> __ATTR(pitch, 0644, spk_var_show, spk_var_store);
> static struct kobj_attribute inflection_attribute =
> __ATTR(inflection, 0644, spk_var_show, spk_var_store);
> +static struct kobj_attribute punct_attribute =
> + __ATTR(punct, 0644, spk_var_show, spk_var_store);
> static struct kobj_attribute rate_attribute =
> __ATTR(rate, 0644, spk_var_show, spk_var_store);
> static struct kobj_attribute tone_attribute =
> @@ -69,6 +72,7 @@ static struct attribute *synth_attrs[] =
> &caps_stop_attribute.attr,
> &pitch_attribute.attr,
> &inflection_attribute.attr,
> + &punct_attribute.attr,
> &rate_attribute.attr,
> &tone_attribute.attr,
> &vol_attribute.attr,
>

Don't we also need a Documentation/ABI/ update for this new sysfs file?

Can you send that as a follow-on patch?

thanks,

greg k-h

2022-09-01 16:51:08

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [patch 1/2] speakup-dummy: Add support for PUNCT variable

On Thu, Sep 01, 2022 at 06:10:25PM +0200, Samuel Thibault wrote:
> Hello,
>
> Greg KH, le jeu. 01 sept. 2022 16:59:28 +0200, a ecrit:
> > On Wed, Aug 24, 2022 at 12:25:02AM +0200, Samuel Thibault wrote:
> > > This allows to debug the update of the punctuation level.
> > >
> > > Signed-off-by: Samuel Thibault <[email protected]>
> > >
> > > Index: linux/drivers/accessibility/speakup/speakup_dummy.c
> > > ===================================================================
> > > --- linux.orig/drivers/accessibility/speakup/speakup_dummy.c
> > > +++ linux/drivers/accessibility/speakup/speakup_dummy.c
> > > @@ -27,6 +27,7 @@ static struct var_t vars[] = {
> > > { INFLECTION, .u.n = {"INFLECTION %d\n", 8, 0, 16, 0, 0, NULL } },
> > > { VOL, .u.n = {"VOL %d\n", 8, 0, 16, 0, 0, NULL } },
> > > { TONE, .u.n = {"TONE %d\n", 8, 0, 16, 0, 0, NULL } },
> > > + { PUNCT, .u.n = {"PUNCT %d\n", 0, 0, 3, 0, 0, NULL } },
> > > { DIRECT, .u.n = {NULL, 0, 0, 1, 0, 0, NULL } },
> > > V_LAST_VAR
> > > };
> > > @@ -42,6 +43,8 @@ static struct kobj_attribute pitch_attri
> > > __ATTR(pitch, 0644, spk_var_show, spk_var_store);
> > > static struct kobj_attribute inflection_attribute =
> > > __ATTR(inflection, 0644, spk_var_show, spk_var_store);
> > > +static struct kobj_attribute punct_attribute =
> > > + __ATTR(punct, 0644, spk_var_show, spk_var_store);
> > > static struct kobj_attribute rate_attribute =
> > > __ATTR(rate, 0644, spk_var_show, spk_var_store);
> > > static struct kobj_attribute tone_attribute =
> > > @@ -69,6 +72,7 @@ static struct attribute *synth_attrs[] =
> > > &caps_stop_attribute.attr,
> > > &pitch_attribute.attr,
> > > &inflection_attribute.attr,
> > > + &punct_attribute.attr,
> > > &rate_attribute.attr,
> > > &tone_attribute.attr,
> > > &vol_attribute.attr,
> > >
> >
> > Don't we also need a Documentation/ABI/ update for this new sysfs file?
>
> It is already there actually, because it's the same variables fo various
> syntheses, and this is just adding the support for punct (already known
> in other syntheses) to the dummy synthesis.

Ah, nevermind, thanks!

2022-09-01 17:33:52

by Samuel Thibault

[permalink] [raw]
Subject: Re: [patch 1/2] speakup-dummy: Add support for PUNCT variable

Hello,

Greg KH, le jeu. 01 sept. 2022 16:59:28 +0200, a ecrit:
> On Wed, Aug 24, 2022 at 12:25:02AM +0200, Samuel Thibault wrote:
> > This allows to debug the update of the punctuation level.
> >
> > Signed-off-by: Samuel Thibault <[email protected]>
> >
> > Index: linux/drivers/accessibility/speakup/speakup_dummy.c
> > ===================================================================
> > --- linux.orig/drivers/accessibility/speakup/speakup_dummy.c
> > +++ linux/drivers/accessibility/speakup/speakup_dummy.c
> > @@ -27,6 +27,7 @@ static struct var_t vars[] = {
> > { INFLECTION, .u.n = {"INFLECTION %d\n", 8, 0, 16, 0, 0, NULL } },
> > { VOL, .u.n = {"VOL %d\n", 8, 0, 16, 0, 0, NULL } },
> > { TONE, .u.n = {"TONE %d\n", 8, 0, 16, 0, 0, NULL } },
> > + { PUNCT, .u.n = {"PUNCT %d\n", 0, 0, 3, 0, 0, NULL } },
> > { DIRECT, .u.n = {NULL, 0, 0, 1, 0, 0, NULL } },
> > V_LAST_VAR
> > };
> > @@ -42,6 +43,8 @@ static struct kobj_attribute pitch_attri
> > __ATTR(pitch, 0644, spk_var_show, spk_var_store);
> > static struct kobj_attribute inflection_attribute =
> > __ATTR(inflection, 0644, spk_var_show, spk_var_store);
> > +static struct kobj_attribute punct_attribute =
> > + __ATTR(punct, 0644, spk_var_show, spk_var_store);
> > static struct kobj_attribute rate_attribute =
> > __ATTR(rate, 0644, spk_var_show, spk_var_store);
> > static struct kobj_attribute tone_attribute =
> > @@ -69,6 +72,7 @@ static struct attribute *synth_attrs[] =
> > &caps_stop_attribute.attr,
> > &pitch_attribute.attr,
> > &inflection_attribute.attr,
> > + &punct_attribute.attr,
> > &rate_attribute.attr,
> > &tone_attribute.attr,
> > &vol_attribute.attr,
> >
>
> Don't we also need a Documentation/ABI/ update for this new sysfs file?

It is already there actually, because it's the same variables fo various
syntheses, and this is just adding the support for punct (already known
in other syntheses) to the dummy synthesis.

Samuel