)]}'
{
  "commit": "5626b8c75bc13aa3287c18d49e92edc84fa85b2d",
  "tree": "0c913d7ed98ff0f469f305b5042880a270543c20",
  "parents": [
    "de2fb698c6fb1e968a5ed9cc449024f119ad3853"
  ],
  "author": {
    "name": "Hans Verkuil",
    "email": "hans.verkuil@cisco.com",
    "time": "Fri Aug 26 07:53:53 2011 -0300"
  },
  "committer": {
    "name": "Mauro Carvalho Chehab",
    "email": "mchehab@redhat.com",
    "time": "Wed Sep 21 10:48:30 2011 -0300"
  },
  "message": "[media] v4l2-ctrls: implement new volatile autocluster scheme\n\nThe problem tackled in this patch is how to handle volatile autoclusters\ncorrectly. A volatile autocluster is a cluster of related controls where one\ncontrol is the control that toggles between manual and auto mode and the other\ncontrols are the values for the manual mode. For example autogain and gain,\nautoexposure and exposure, etc.\n\nIf the hardware lets you read out the automatically calculated manual values\nwhile in automode, then those manual controls should be marked volatile.\n\ngain value as calculated by the autogain circuitry, then you would mark the\ngain control as volatile (i.e. continuously changing).\n\nThe question in such use cases is what to do when switching from the auto\nmode to the manual mode. Should we switch to the last set manual values or\nshould the volatile values be copied and used as the initial manual values.\n\nFor example: suppose the mode is manual gain and gain is set to 5. Then\nautogain is turned on and the gain is set by the hardware to 2. Finally\nthe user switches back to manual gain. What should the gain be? 2 or 5?\n\nAfter a long discussion the decisions was made to keep the last value as\ncalculated by the auto mode (so 2 in the example above).\n\nThe reason is that webcams that do such things will adapt themselves to\nthe current light conditions and when you switch back to manual mode you\nexpect that you keep the same picture. If you would switch back to old\nmanual values, then that would give you a suddenly different picture,\nwhich is jarring for the user.\n\nAdditionally, this would be difficult to implement in applications that\nstore and restore the control values at application exit and start.\n\nIf you want to keep the old manual values when you switch from auto to\nmanual, then there would have to be a way for applications to get hold\nof those old values while in auto mode, but there isn\u0027t.\n\nSo this patch will do all the heavy lifting in v4l2-ctrls.c: if you go\nfrom auto mode to manual mode and the manual controls are volatile, then\ng_volatile_ctrl will be called to get the current values for the manual\ncontrols before switching to manual mode.\n\nSigned-off-by: Hans Verkuil \u003chans.verkuil@cisco.com\u003e\nAcked-by: Hans de Goede \u003chdegoede@redhat.com\u003e\nSigned-off-by: Mauro Carvalho Chehab \u003cmchehab@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "166762182f8e1df0e9ebd5275ea4585cf17fe2ad",
      "old_mode": 33188,
      "old_path": "drivers/media/video/v4l2-ctrls.c",
      "new_id": "fc8666ae408fd5c0b79f98c6f004e921a065f130",
      "new_mode": 33188,
      "new_path": "drivers/media/video/v4l2-ctrls.c"
    },
    {
      "type": "modify",
      "old_id": "bd6a4a7370dfde0a87cdd7b30410d5caf8fa51da",
      "old_mode": 33188,
      "old_path": "include/media/v4l2-ctrls.h",
      "new_id": "eeb3df637144cd12ed16209ca07836c70364f36c",
      "new_mode": 33188,
      "new_path": "include/media/v4l2-ctrls.h"
    }
  ]
}
