OSDN Git Service

media: vivid: fix gain when autogain is on
authorHans Verkuil <hverkuil@xs4all.nl>
Fri, 29 Jun 2018 09:40:41 +0000 (05:40 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Wed, 4 Jul 2018 12:18:33 +0000 (08:18 -0400)
commit83a729530a3a8a40dd529c72e4c3fe491d9bce68
tree548cb2ae330084a703bce664ea9213aa3379aa35
parent9f84310d88304bb2f2b154ba740ecc3a6326c175
media: vivid: fix gain when autogain is on

In the vivid driver you want gain to continuous change while autogain
is on. However, dev->jiffies_vid_cap doesn't actually change. It probably
did in the past, but changes in the code caused this to be a fixed value
that is only set when you start streaming.

Replace it by jiffies, which is always changing.

[mchehab@kernel.org: use jiffies_to_msecs() instead of dividing by HZ]

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/vivid/vivid-ctrls.c