From: vojtech@suse.cz (Vojtech Pavlik)
To: Pavel Machek <pavel@suse.cz>
Cc: Henrique de Moraes Holschuh <hmh@debian.org>,
lm-sensors@lm-sensors.org, linux-kernel@vger.kernel.org,
hdaps-devel@lists.sourceforge.net,
Stelian Pop <stelian@popies.net>,
Michael Hanselmann <linux-kernel@hansmi.ch>
Subject: [lm-sensors] Generic interface for accelerometers (AMS, HDAPS,
Date: Wed, 05 Jul 2006 07:34:56 +0000 [thread overview]
Message-ID: <20060705073455.GA6027@suse.cz> (raw)
In-Reply-To: <20060704235717.GD11872@elf.ucw.cz>
On Wed, Jul 05, 2006 at 01:57:17AM +0200, Pavel Machek wrote:
> > Anyway, the input infrastructure is good to emulate a mouse/joystick, but we
> > probably want to support the following generic data channels:
> >
> > 1. Absolute acceleration output stream (either in hardware units, or
> > normalized to G or mG if at all possible) for X, Y, Z. Does the input
> > infrastructure work well for reporting absolute numbers in a reasonably
> > constant rate?
> >
> > This is what HD head unload policy daemons want to know, and the stream
> > usually needs to offer datapoints somewhere between 20Hz and 100Hz
> > without excessive jitter to be useful for more advanced filtering (like
> > masking-off periodic movement such as the one caused by train tracks).
Yes, this is what the input subsystem normally works with - 32-bit
absolute (and relative) numbers at rates around 100 Hz. It's how the
data from joysticks (and mice) look like.
> > 2. As easy-to-use as possible joystick and mouse emulation (for toys and
> > gaming), which probably means auto-calibrating ones when possible
> > and thus making them unsuitable channels for (1) above.
>
> Well, I'd just provide 1. Providing 2 seems like task for some
> userspace filtering library.
Assuming you use the ABS_X, ABS_Y, and ABS_Z for the acceleration (which
is not necessarily ideal), you'll get a joystick emulation automagically
through the input subsystem without any additional coding.
> > 3. Control of accelerometer parameters:
> > 3a. Report of accelerometer type (hdaps, ams, etc) and other metadata
> > (name, location, what it is measuring (system accel, hd-bay
> > accel...))
>
> Well, if your system is accelerating at different speed than hd-bay,
> then your machine is either _way_ too big, or you are in bad trouble.
>
> Ask Dmitry or vojtech, I believe input can provide such metadata. (I
> left most of the quoted text so that vojtech can reply easily).
It currently doesn't. It reports the device ID as a couple of 16-bit
integers, and how the input subsystem sees it. There is currently no way
to get at device-specific data, although this could be reasonably easily
done through sysfs I believe.
> > 3b. Accelerometer polling frequency
Module parameter, changeable via sysfs?
> > 3c. Enable/disable joystick and mouse emulation control
> > etc.
> >
> > And, of course, userspace must be able to easily find the accelerometer
> > outputs and diferentiate them from other joystick/mouse interfaces. This is
> > a task for udev, I suppose.
Yup.
> > It is also very helpful to be able to know when something is using any of
> > the accelerometer output channels, so as to shut it down (or stop talking to
> > it) when it is uneeded.
This is done automatically by the input subsystem. When the last user
close()s any of the related devices, the driver gets notified that it
can stop the hardware.
> > I don't know about AMS, but talking to HDAPS when
> > you don't need to does waste enough system resources and power to actually
> > justify implementing this.
I'd doubt any of the accelerometer implementations would consume much
power or CPU.
> > If we cannot detect automatically when userspace is paying attention to the
> > accelerometer through the input layer, then that means we will need the
> > enable/disable functionality already provided by the device model through
> > sysfs.
> >
> > > Only piece of puzzle missing is marking that input device as "this
> > > accelerometer actually watches the whole device".
> >
> > Well, it is very important to be able to easily find all data and channels
> > pertaining for a given accelerometer, and the accelerometer metadata should
> > indeed give userspace an idea of WHAT it is measuring the acceleration of
--
Vojtech Pavlik
Director SuSE Labs
WARNING: multiple messages have this Message-ID (diff)
From: Vojtech Pavlik <vojtech@suse.cz>
To: Pavel Machek <pavel@suse.cz>
Cc: Henrique de Moraes Holschuh <hmh@debian.org>,
lm-sensors@lm-sensors.org, linux-kernel@vger.kernel.org,
hdaps-devel@lists.sourceforge.net,
Stelian Pop <stelian@popies.net>,
Michael Hanselmann <linux-kernel@hansmi.ch>
Subject: Re: Generic interface for accelerometers (AMS, HDAPS, ...)
Date: Wed, 5 Jul 2006 09:34:56 +0200 [thread overview]
Message-ID: <20060705073455.GA6027@suse.cz> (raw)
In-Reply-To: <20060704235717.GD11872@elf.ucw.cz>
On Wed, Jul 05, 2006 at 01:57:17AM +0200, Pavel Machek wrote:
> > Anyway, the input infrastructure is good to emulate a mouse/joystick, but we
> > probably want to support the following generic data channels:
> >
> > 1. Absolute acceleration output stream (either in hardware units, or
> > normalized to G or mG if at all possible) for X, Y, Z. Does the input
> > infrastructure work well for reporting absolute numbers in a reasonably
> > constant rate?
> >
> > This is what HD head unload policy daemons want to know, and the stream
> > usually needs to offer datapoints somewhere between 20Hz and 100Hz
> > without excessive jitter to be useful for more advanced filtering (like
> > masking-off periodic movement such as the one caused by train tracks).
Yes, this is what the input subsystem normally works with - 32-bit
absolute (and relative) numbers at rates around 100 Hz. It's how the
data from joysticks (and mice) look like.
> > 2. As easy-to-use as possible joystick and mouse emulation (for toys and
> > gaming), which probably means auto-calibrating ones when possible
> > and thus making them unsuitable channels for (1) above.
>
> Well, I'd just provide 1. Providing 2 seems like task for some
> userspace filtering library.
Assuming you use the ABS_X, ABS_Y, and ABS_Z for the acceleration (which
is not necessarily ideal), you'll get a joystick emulation automagically
through the input subsystem without any additional coding.
> > 3. Control of accelerometer parameters:
> > 3a. Report of accelerometer type (hdaps, ams, etc) and other metadata
> > (name, location, what it is measuring (system accel, hd-bay
> > accel...))
>
> Well, if your system is accelerating at different speed than hd-bay,
> then your machine is either _way_ too big, or you are in bad trouble.
>
> Ask Dmitry or vojtech, I believe input can provide such metadata. (I
> left most of the quoted text so that vojtech can reply easily).
It currently doesn't. It reports the device ID as a couple of 16-bit
integers, and how the input subsystem sees it. There is currently no way
to get at device-specific data, although this could be reasonably easily
done through sysfs I believe.
> > 3b. Accelerometer polling frequency
Module parameter, changeable via sysfs?
> > 3c. Enable/disable joystick and mouse emulation control
> > etc.
> >
> > And, of course, userspace must be able to easily find the accelerometer
> > outputs and diferentiate them from other joystick/mouse interfaces. This is
> > a task for udev, I suppose.
Yup.
> > It is also very helpful to be able to know when something is using any of
> > the accelerometer output channels, so as to shut it down (or stop talking to
> > it) when it is uneeded.
This is done automatically by the input subsystem. When the last user
close()s any of the related devices, the driver gets notified that it
can stop the hardware.
> > I don't know about AMS, but talking to HDAPS when
> > you don't need to does waste enough system resources and power to actually
> > justify implementing this.
I'd doubt any of the accelerometer implementations would consume much
power or CPU.
> > If we cannot detect automatically when userspace is paying attention to the
> > accelerometer through the input layer, then that means we will need the
> > enable/disable functionality already provided by the device model through
> > sysfs.
> >
> > > Only piece of puzzle missing is marking that input device as "this
> > > accelerometer actually watches the whole device".
> >
> > Well, it is very important to be able to easily find all data and channels
> > pertaining for a given accelerometer, and the accelerometer metadata should
> > indeed give userspace an idea of WHAT it is measuring the acceleration of
--
Vojtech Pavlik
Director SuSE Labs
next prev parent reply other threads:[~2006-07-05 7:34 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-03 12:48 [lm-sensors] Generic interface for accelerometers (AMS, HDAPS, ...) Henrique de Moraes Holschuh
2006-07-03 12:48 ` Henrique de Moraes Holschuh
2006-07-04 7:59 ` [lm-sensors] Generic interface for accelerometers (AMS, HDAPS, Pavel Machek
2006-07-04 7:59 ` Generic interface for accelerometers (AMS, HDAPS, ...) Pavel Machek
2006-07-04 10:26 ` [lm-sensors] [Hdaps-devel] Generic interface for accelerometers Shem Multinymous
2006-07-04 10:26 ` [Hdaps-devel] Generic interface for accelerometers (AMS, HDAPS, ...) Shem Multinymous
2006-07-04 10:33 ` [lm-sensors] [Hdaps-devel] Generic interface for accelerometers Shem Multinymous
2006-07-04 10:57 ` Pavel Machek
2006-07-04 10:57 ` [Hdaps-devel] Generic interface for accelerometers (AMS, HDAPS, ...) Pavel Machek
2006-07-04 15:02 ` Thomas Tuttle
2006-07-05 3:13 ` [lm-sensors] [Hdaps-devel] Generic interface for accelerometers Dmitry Torokhov
2006-07-05 3:13 ` [Hdaps-devel] Generic interface for accelerometers (AMS, HDAPS, ...) Dmitry Torokhov
2006-07-05 8:00 ` [lm-sensors] [Hdaps-devel] Generic interface for accelerometers Johannes Berg
2006-07-05 8:00 ` [Hdaps-devel] Generic interface for accelerometers (AMS, HDAPS, ...) Johannes Berg
2006-07-05 14:06 ` [lm-sensors] [Hdaps-devel] Generic interface for accelerometers Henrique de Moraes Holschuh
2006-07-05 14:06 ` [Hdaps-devel] Generic interface for accelerometers (AMS, HDAPS, ...) Henrique de Moraes Holschuh
2006-07-04 16:23 ` [lm-sensors] Generic interface for accelerometers (AMS, HDAPS, Henrique de Moraes Holschuh
2006-07-04 16:23 ` Generic interface for accelerometers (AMS, HDAPS, ...) Henrique de Moraes Holschuh
2006-07-04 23:57 ` [lm-sensors] Generic interface for accelerometers (AMS, HDAPS, Pavel Machek
2006-07-04 23:57 ` Generic interface for accelerometers (AMS, HDAPS, ...) Pavel Machek
2006-07-05 7:34 ` Vojtech Pavlik [this message]
2006-07-05 7:34 ` Vojtech Pavlik
2006-07-05 13:58 ` [lm-sensors] Generic interface for accelerometers (AMS, HDAPS, Henrique de Moraes Holschuh
2006-07-05 13:58 ` Generic interface for accelerometers (AMS, HDAPS, ...) Henrique de Moraes Holschuh
2006-07-06 1:12 ` [lm-sensors] Generic interface for accelerometers (AMS, HDAPS, Pavel Machek
2006-07-06 1:12 ` Generic interface for accelerometers (AMS, HDAPS, ...) Pavel Machek
2006-07-05 7:59 ` [lm-sensors] Generic interface for accelerometers (AMS, HDAPS, Jean Delvare
2006-07-05 7:59 ` [lm-sensors] Generic interface for accelerometers (AMS, HDAPS, ...) Jean Delvare
[not found] <fa.GOQkHC8inXir2wbg4bZayOWXzAY@ifi.uio.no>
[not found] ` <fa.qLWuLxQd7Mhcnixy/TLVs/nPwig@ifi.uio.no>
2006-07-05 23:59 ` [lm-sensors] Generic interface for accelerometers (AMS, HDAPS, Robert Hancock
2006-07-06 6:19 ` Vojtech Pavlik
2006-07-07 2:46 ` Henrique de Moraes Holschuh
2006-07-07 5:28 ` Robert Hancock
2006-07-07 9:31 ` Vojtech Pavlik
[not found] <fa.+TBrYxvBPaXCptm9JXDjMT6wk58@ifi.uio.no>
[not found] ` <fa.KtXXXVDoa0Coj62aBgf3NuqbZMo@ifi.uio.no>
2006-07-07 1:40 ` Robert Hancock
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060705073455.GA6027@suse.cz \
--to=vojtech@suse.cz \
--cc=hdaps-devel@lists.sourceforge.net \
--cc=hmh@debian.org \
--cc=linux-kernel@hansmi.ch \
--cc=linux-kernel@vger.kernel.org \
--cc=lm-sensors@lm-sensors.org \
--cc=pavel@suse.cz \
--cc=stelian@popies.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.