Re: [Linuxwacom-devel] [PATCH] ISDV4: work around Levono X200/X201 pressure issues
On Mon, Apr 04, 2011 at 02:59:45PM -0500, Chris Bagwell wrote: > On Sun, Apr 3, 2011 at 6:35 PM, Peter Hutterer > wrote: > > On Sat, Apr 02, 2011 at 09:14:50AM -0500, ch...@cnpbagwell.com wrote: > >> From: Chris Bagwell > >> > >> As reported on mailing list and bug tracker #3008864, some > >> Levono tablets pressure is not working right. Some people > >> notice as getting max pressure while pressing lightly and > >> others report as pressure curve not working. > >> > >> The basic issue is hardware is reporting maximum pressure of > >> 127 but returning 254 values. This throws off normalization > >> and pressure curves both. > >> > >> Adjust dynamically when higher pressure values are seen so > >> that we do not need to maintain a quirks list of hardware. > >> Kernel driver would need quirks list. > >> > >> Signed-off-by: Chris Bagwell > >> --- > >> > >> This is RFC patch. > >> > >> The concept has been tested by user on mailing list hard coding > >> pressure to 254 but this tries to do it dynamically so it can > >> ship with xf86-input-wacom. > >> > >> Another option is to add list on wiki of problem hardware and > >> explain how to edit config file and for MaxZ to 254 for stylus > >> and eraser. > > > > can we detect this tablet and put a quirk in? any hardware string we can go > > by? > > Since we know its two models of Levono, I suppose we could check > /sys/class/dmi/id/product_name. maybe it's best if we include a default config quirk then. We just need to figure out which MatchFoobar is appropriate here, cause I keep forgetting :) Cheers, Peter > > as-is, this patch is quite iffy. we can't guarantee that other tablets > > have 127 as the correct maximum and are affected by this. Nonetheless, > > growing the pressure range if the reported value is higher than the max > > value seems like a good approach. > > I'm thinking now to simplify it. Instead of trying to be smart, If it > see's unexpected pressure value then print a message to log to suggest > user create config file and set MaxZ option to fix issue. It can > still update MaxZ to keep lon from being spammed to much and to > somewhat auto-recover. > > The bug report was just updated confirming MaxZ config option is a > working solution. > > > > > Cheers, > > Peter > > > >> src/wcmISDV4.c | 17 + > >> 1 files changed, 17 insertions(+), 0 deletions(-) > >> > >> diff --git a/src/wcmISDV4.c b/src/wcmISDV4.c > >> index db0d83e..c81f2d5 100644 > >> --- a/src/wcmISDV4.c > >> +++ b/src/wcmISDV4.c > >> @@ -721,6 +721,23 @@ static int isdv4Parse(InputInfoPtr pInfo, const > >> unsigned char* data, int len) > >> /* pressure */ > >> ds->pressure = coord.pressure; > >> > >> + /* Work around issue with Levono tablets reporting > >> + * max pressure of 127 but returning higher values. > >> + */ > >> + if (coord.pressure > common->wcmMaxZ) > >> + { > >> + /* For sepecific Levono issues, we can jump straight > >> + * to real max pressure. If higher resolution tablets > >> + * have same issue, slowly adjust. > >> + */ > >> + if (common->wcmMaxZ == 127) > >> + common->wcmMaxZ = 254; > >> + else > >> + common->wcmMaxZ = coord.pressure; > >> + DBG(2, priv, "pressure higher than maxZ sent. " > >> + "new maxZ=%d", common->wcmMaxZ); > >> + } > >> + > >> /* buttons */ > >> ds->buttons = coord.tip | (coord.side << 1) | (coord.eraser > >> << 2); > >> > >> -- > >> 1.7.4.2 > > > -- Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev ___ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
Re: [Linuxwacom-devel] [PATCH] ISDV4: work around Levono X200/X201 pressure issues
On Sun, Apr 3, 2011 at 6:35 PM, Peter Hutterer wrote: > On Sat, Apr 02, 2011 at 09:14:50AM -0500, ch...@cnpbagwell.com wrote: >> From: Chris Bagwell >> >> As reported on mailing list and bug tracker #3008864, some >> Levono tablets pressure is not working right. Some people >> notice as getting max pressure while pressing lightly and >> others report as pressure curve not working. >> >> The basic issue is hardware is reporting maximum pressure of >> 127 but returning 254 values. This throws off normalization >> and pressure curves both. >> >> Adjust dynamically when higher pressure values are seen so >> that we do not need to maintain a quirks list of hardware. >> Kernel driver would need quirks list. >> >> Signed-off-by: Chris Bagwell >> --- >> >> This is RFC patch. >> >> The concept has been tested by user on mailing list hard coding >> pressure to 254 but this tries to do it dynamically so it can >> ship with xf86-input-wacom. >> >> Another option is to add list on wiki of problem hardware and >> explain how to edit config file and for MaxZ to 254 for stylus >> and eraser. > > can we detect this tablet and put a quirk in? any hardware string we can go > by? Since we know its two models of Levono, I suppose we could check /sys/class/dmi/id/product_name. > > as-is, this patch is quite iffy. we can't guarantee that other tablets > have 127 as the correct maximum and are affected by this. Nonetheless, > growing the pressure range if the reported value is higher than the max > value seems like a good approach. I'm thinking now to simplify it. Instead of trying to be smart, If it see's unexpected pressure value then print a message to log to suggest user create config file and set MaxZ option to fix issue. It can still update MaxZ to keep lon from being spammed to much and to somewhat auto-recover. The bug report was just updated confirming MaxZ config option is a working solution. > > Cheers, > Peter > >> src/wcmISDV4.c | 17 + >> 1 files changed, 17 insertions(+), 0 deletions(-) >> >> diff --git a/src/wcmISDV4.c b/src/wcmISDV4.c >> index db0d83e..c81f2d5 100644 >> --- a/src/wcmISDV4.c >> +++ b/src/wcmISDV4.c >> @@ -721,6 +721,23 @@ static int isdv4Parse(InputInfoPtr pInfo, const >> unsigned char* data, int len) >> /* pressure */ >> ds->pressure = coord.pressure; >> >> + /* Work around issue with Levono tablets reporting >> + * max pressure of 127 but returning higher values. >> + */ >> + if (coord.pressure > common->wcmMaxZ) >> + { >> + /* For sepecific Levono issues, we can jump straight >> + * to real max pressure. If higher resolution tablets >> + * have same issue, slowly adjust. >> + */ >> + if (common->wcmMaxZ == 127) >> + common->wcmMaxZ = 254; >> + else >> + common->wcmMaxZ = coord.pressure; >> + DBG(2, priv, "pressure higher than maxZ sent. " >> + "new maxZ=%d", common->wcmMaxZ); >> + } >> + >> /* buttons */ >> ds->buttons = coord.tip | (coord.side << 1) | (coord.eraser << >> 2); >> >> -- >> 1.7.4.2 > -- Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev ___ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
Re: [Linuxwacom-devel] [PATCH] ISDV4: work around Levono X200/X201 pressure issues
On Sat, Apr 02, 2011 at 09:14:50AM -0500, ch...@cnpbagwell.com wrote: > From: Chris Bagwell > > As reported on mailing list and bug tracker #3008864, some > Levono tablets pressure is not working right. Some people > notice as getting max pressure while pressing lightly and > others report as pressure curve not working. > > The basic issue is hardware is reporting maximum pressure of > 127 but returning 254 values. This throws off normalization > and pressure curves both. > > Adjust dynamically when higher pressure values are seen so > that we do not need to maintain a quirks list of hardware. > Kernel driver would need quirks list. > > Signed-off-by: Chris Bagwell > --- > > This is RFC patch. > > The concept has been tested by user on mailing list hard coding > pressure to 254 but this tries to do it dynamically so it can > ship with xf86-input-wacom. > > Another option is to add list on wiki of problem hardware and > explain how to edit config file and for MaxZ to 254 for stylus > and eraser. can we detect this tablet and put a quirk in? any hardware string we can go by? as-is, this patch is quite iffy. we can't guarantee that other tablets have 127 as the correct maximum and are affected by this. Nonetheless, growing the pressure range if the reported value is higher than the max value seems like a good approach. Cheers, Peter > src/wcmISDV4.c | 17 + > 1 files changed, 17 insertions(+), 0 deletions(-) > > diff --git a/src/wcmISDV4.c b/src/wcmISDV4.c > index db0d83e..c81f2d5 100644 > --- a/src/wcmISDV4.c > +++ b/src/wcmISDV4.c > @@ -721,6 +721,23 @@ static int isdv4Parse(InputInfoPtr pInfo, const unsigned > char* data, int len) > /* pressure */ > ds->pressure = coord.pressure; > > + /* Work around issue with Levono tablets reporting > + * max pressure of 127 but returning higher values. > + */ > + if (coord.pressure > common->wcmMaxZ) > + { > + /* For sepecific Levono issues, we can jump straight > + * to real max pressure. If higher resolution tablets > + * have same issue, slowly adjust. > + */ > + if (common->wcmMaxZ == 127) > + common->wcmMaxZ = 254; > + else > + common->wcmMaxZ = coord.pressure; > + DBG(2, priv, "pressure higher than maxZ sent. " > + "new maxZ=%d", common->wcmMaxZ); > + } > + > /* buttons */ > ds->buttons = coord.tip | (coord.side << 1) | (coord.eraser << > 2); > > -- > 1.7.4.2 -- Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf ___ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
[Linuxwacom-devel] [PATCH] ISDV4: work around Levono X200/X201 pressure issues
From: Chris Bagwell As reported on mailing list and bug tracker #3008864, some Levono tablets pressure is not working right. Some people notice as getting max pressure while pressing lightly and others report as pressure curve not working. The basic issue is hardware is reporting maximum pressure of 127 but returning 254 values. This throws off normalization and pressure curves both. Adjust dynamically when higher pressure values are seen so that we do not need to maintain a quirks list of hardware. Kernel driver would need quirks list. Signed-off-by: Chris Bagwell --- This is RFC patch. The concept has been tested by user on mailing list hard coding pressure to 254 but this tries to do it dynamically so it can ship with xf86-input-wacom. Another option is to add list on wiki of problem hardware and explain how to edit config file and for MaxZ to 254 for stylus and eraser. src/wcmISDV4.c | 17 + 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/src/wcmISDV4.c b/src/wcmISDV4.c index db0d83e..c81f2d5 100644 --- a/src/wcmISDV4.c +++ b/src/wcmISDV4.c @@ -721,6 +721,23 @@ static int isdv4Parse(InputInfoPtr pInfo, const unsigned char* data, int len) /* pressure */ ds->pressure = coord.pressure; + /* Work around issue with Levono tablets reporting +* max pressure of 127 but returning higher values. +*/ + if (coord.pressure > common->wcmMaxZ) + { + /* For sepecific Levono issues, we can jump straight +* to real max pressure. If higher resolution tablets +* have same issue, slowly adjust. +*/ + if (common->wcmMaxZ == 127) + common->wcmMaxZ = 254; + else + common->wcmMaxZ = coord.pressure; + DBG(2, priv, "pressure higher than maxZ sent. " + "new maxZ=%d", common->wcmMaxZ); + } + /* buttons */ ds->buttons = coord.tip | (coord.side << 1) | (coord.eraser << 2); -- 1.7.4.2 -- Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf ___ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel