[MeeGo-dev] [patch] ALS and Proximity Adaptors of sensor framework on Medfield

Yan Leo leo.yan at intel.com
Fri Sep 17 02:07:36 PDT 2010


Hi Timo,
I modified the adaptors as you suggested, and removed the
setStandbyOverride function. All of the sensor drivers on Medfield can
output data correctly when the screen is blanked.

Magnetometer adaptor is also added. It seems that libcompasschain.so is
needed when testing the magnetometer in clientapitest, where can I get
it?

Please check all of them~:)~

Thanks,
Leo Yan


On Thu, 2010-09-16 at 19:35 +0800, Rongas Timo wrote:
> >-----Original Message-----
> >From: Yan Leo [mailto:leo.yan at intel.com] 
> >Sent: Thursday, September 16, 2010 5:55 AM
> >To: Rongas Timo
> >Cc: meego-dev at meego.com
> >Subject: [patch] ALS and Proximity Adaptors of sensor 
> >framework on Medfield
> >
> >Hi Timo,
> >I think we can use the basic input device
> >accelerometer(adaptors/accelerometeradaptor) on Medfield.
> >
> >Here are the patches for ALS and Proximity. Both of them are different
> >from the basic adaptors because of the output format of driver.Please
> >check and give your opinion.
> 
> Hi Leo,
> 
> These look good! I actually think that these can be generalised for use by others as well. If possible, could you do the following modifications please:
> 
> * Rename from mfldXXadaptor to XXadaptor-ascii. If another driver with ascii interface appears, these plugins can probably be patched to support both. We came up with this <pluginname>-<interfacetype>-[<additional detail>] naming scheme a while back, but I haven't written it down anywhere yet.
> 
> * Add LGPL disclaimer (copy from any other file and place your credentials there)
> 
> * Use smaller buffersize. This is an evolving issue, but having a buffer of e.g. 16 samples should be more than enough for proximity and als. Perhaps this gets automatic someday.
> 
> * Use sensordLog<T|D|W|C>() for errors. I would consider being unable to open a driver interface worth a warning. I know, our code might be slacky on this in parts as well, but I can try to prevent any new qDebugs() from seeping in ;)
> 
> * Please use spaces for indent (not tabs)
> 
> * This final point is actually something that should be turned into a configuration option (more of a note than request, my job to implement):
> 
> Can your drivers provide sane data when the display is blanked? In both adaptors, you have overwritten the default setStandbyOverride() to always reject requests to keep sensors on while display is off. I think you should allow (*crossing fingers for users thinking about power saving*) users to keep the sensors on with display off, if it's possible. For various reasons, the "default" als adaptor does not allow display off usage.
> 
> But as said, that should be turned into option, so the same plugin could use different behavior upon different drivers. 
> 
> Providing these as generic plugins for cases where data is read as ascii might need some more stuff (paths etc) to go into config file. But those mods can be done when the need arises.
> 
> Thank you!
> 
> // Timo
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: alsadaptor-ascii.patch
Type: text/x-patch
Size: 9659 bytes
Desc: not available
URL: <http://lists.meego.com/pipermail/meego-dev/attachments/20100917/577baba3/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: magnetometeradaptor-ascii.patch
Type: text/x-patch
Size: 10080 bytes
Desc: not available
URL: <http://lists.meego.com/pipermail/meego-dev/attachments/20100917/577baba3/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: proximityadaptor-ascii.patch
Type: text/x-patch
Size: 9734 bytes
Desc: not available
URL: <http://lists.meego.com/pipermail/meego-dev/attachments/20100917/577baba3/attachment-0002.bin>


More information about the MeeGo-dev mailing list